Index: gm/yuvtorgbeffect.cpp |
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp |
index 09c61765fbc0bacaceb6ca1c58cefa5ecc2d4584..40a2f03f27e223f50ed04541b6e9e9f9d9165311 100644 |
--- a/gm/yuvtorgbeffect.cpp |
+++ b/gm/yuvtorgbeffect.cpp |
@@ -69,18 +69,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; |
+ return; |
} |
- sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(rt))); |
- if (!drawContext) { |
+ GrContext* context = canvas->getGrContext(); |
+ if (!context) { |
return; |
} |
@@ -126,7 +122,7 @@ protected: |
if (fp) { |
SkMatrix viewMatrix; |
viewMatrix.setTranslate(x, y); |
- pipelineBuilder.setRenderTarget(rt); |
+ pipelineBuilder.setRenderTarget(drawContext->accessRenderTarget()); |
pipelineBuilder.addColorFragmentProcessor(fp); |
SkAutoTUnref<GrDrawBatch> batch( |
GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, viewMatrix, |