Lines Matching defs:context

112 Result GMSrc::draw(GrDirectContext* context, SkCanvas* canvas) const {
116 skiagm::DrawResult gpuSetupResult = gm->gpuSetup(context, canvas, &msg);
1133 Result BisectSrc::draw(GrDirectContext* context, SkCanvas* canvas) const {
1156 Result result = this->INHERITED::draw(context, &pathFinder);
1405 Result MSKPSrc::draw(GrDirectContext* context, SkCanvas* c) const {
1406 return this->draw(0, context, c);
1502 sk_sp<SkSurface> GPUSink::createDstSurface(GrDirectContext* context, SkISize size) const {
1510 surface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info, fSampleCount,
1514 surface = sk_gpu_test::MakeBackendTextureSurface(context,
1523 surface = sk_gpu_test::MakeBackendRenderTargetSurface(context,
1683 // 2) For the second context, pre-compile the shaders to warm the cache.
1684 // 3) Draw with the second context, ensuring that we get the same result, and no cache misses.
1730 GrDirectContext* context) const {
1736 Result result = src.draw(context, recorder.getCanvas());
1743 SkDeferredDisplayList::ProgramIterator iter(context, ddl.get());
1762 auto context = ctxInfo.directContext();
1763 if (!context) {
1764 return Result::Fatal("Could not create context.");
1767 SkASSERT(context->priv().getGpu());
1769 sk_sp<SkSurface> surface = this->createDstSurface(context, src.size());
1774 Result result = this->ooprDraw(src, surface, context);
1780 context->priv().dumpCacheStats(log);
1781 context->priv().dumpGpuStats(log);
1782 context->priv().dumpContextStats(log);
1808 // same context (this thread and the gpuThread - which will be uploading textures)).
1832 // thread w/o a context.
1875 // bit by which thread possesses the direct context.
1904 // This captures the context destined to be the main gpu context
1909 return Result::Fatal("Could not create context.");
1916 // This captures the context destined to be the utility context. It is in a share group
1917 // with the main context
1922 return Result::Fatal("Cound not create shared context.");
2129 void precompile(skgpu::Context* context) {
2135 context->preCompile(c1);
2140 context->preCompile(c2);
2159 auto [_, context] = factory.getContextInfo(fContextType);
2162 precompile(context.get());
2165 sk_sp<skgpu::Recorder> recorder = context->createRecorder();
2189 context->insertRecording(std::move(recording));
2190 context->submit(skgpu::SyncToCpu::kYes);
2209 Result draw(GrDirectContext* context, SkCanvas* canvas) const override {
2210 return fDraw(context, canvas);
2259 [&](GrDirectContext* context, SkCanvas* canvas) {
2261 return src.draw(context, canvas);
2333 [&](GrDirectContext* context, SkCanvas* canvas) {
2336 Result result = src.draw(context, recorder.beginRecording(SkIntToScalar(size.width()),
2375 [&](GrDirectContext* context, SkCanvas* canvas) {
2377 return src.draw(context, &runtimeBlendCanvas);