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

Unified Diff: gm/bigrrectaaeffect.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/beziereffects.cpp ('k') | gm/constcolorprocessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bigrrectaaeffect.cpp
diff --git a/gm/bigrrectaaeffect.cpp b/gm/bigrrectaaeffect.cpp
index b8529618264676778a3603a589e63c8164f0268f..b3f39a0f2db0df09102bcd3105207e93455773a0 100644
--- a/gm/bigrrectaaeffect.cpp
+++ b/gm/bigrrectaaeffect.cpp
@@ -49,15 +49,9 @@ protected:
SkISize onISize() override { return SkISize::Make(fWidth, fHeight); }
void onDraw(SkCanvas* canvas) override {
- GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
- GrContext* context = rt ? rt->getContext() : nullptr;
- if (!context) {
- skiagm::GM::DrawGpuOnlyMessage(canvas);
- return;
- }
-
- sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt)));
+ GrDrawContext* drawContext = canvas->internal_private_accessTopLayerDrawContext();
if (!drawContext) {
+ skiagm::GM::DrawGpuOnlyMessage(canvas);
return;
}
@@ -90,7 +84,7 @@ protected:
SkASSERT(fp);
if (fp) {
pipelineBuilder.addCoverageFragmentProcessor(fp);
- pipelineBuilder.setRenderTarget(rt);
+ pipelineBuilder.setRenderTarget(drawContext->accessRenderTarget());
SkRect bounds = testBounds;
bounds.offset(SkIntToScalar(x), SkIntToScalar(y));
« no previous file with comments | « gm/beziereffects.cpp ('k') | gm/constcolorprocessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698