Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: gm/texturedomaineffect.cpp

Issue 1930623003: Clean up test drawContext usage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix typo Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/texdata.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texturedomaineffect.cpp
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index e4a02c15d94e4a258d0f3753c4da5595d1bdb3cf..660748873158c095d4d546fc1d86b0cddf28eb14 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -70,18 +70,14 @@ protected:
}
void onDraw(SkCanvas* canvas) override {
- GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
- if (nullptr == rt) {
- return;
- }
- GrContext* context = rt->getContext();
- if (nullptr == context) {
+ GrDrawContext* drawContext = canvas->internal_private_accessTopLayerDrawContext();
+ if (!drawContext) {
skiagm::GM::DrawGpuOnlyMessage(canvas);
return;
}
- sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
- if (!drawContext) {
+ GrContext* context = canvas->getGrContext();
+ if (!context) {
return;
}
@@ -128,7 +124,7 @@ protected:
continue;
}
const SkMatrix viewMatrix = SkMatrix::MakeTrans(x, y);
- pipelineBuilder.setRenderTarget(rt);
+ pipelineBuilder.setRenderTarget(drawContext->accessRenderTarget());
pipelineBuilder.addColorFragmentProcessor(fp);
SkAutoTUnref<GrDrawBatch> batch(
« no previous file with comments | « gm/texdata.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698