Index: gm/constcolorprocessor.cpp |
diff --git a/gm/constcolorprocessor.cpp b/gm/constcolorprocessor.cpp |
index cfc03398f60af7241ccdb2e527367776eead0f07..4e0e68d2cbd89d6f380db2cb1bbd3e1192229599 100644 |
--- a/gm/constcolorprocessor.cpp |
+++ b/gm/constcolorprocessor.cpp |
@@ -47,18 +47,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; |
} |
@@ -112,7 +108,9 @@ protected: |
SkAutoTUnref<GrFragmentProcessor> fp(GrConstColorProcessor::Create(color, mode)); |
GrClip clip; |
- GrPipelineBuilder pipelineBuilder(grPaint, rt, clip); |
+ GrPipelineBuilder pipelineBuilder(grPaint, |
+ drawContext->accessRenderTarget(), |
+ clip); |
pipelineBuilder.addColorFragmentProcessor(fp); |
SkAutoTUnref<GrDrawBatch> batch( |