Index: gm/imagefromyuvtextures.cpp |
diff --git a/gm/imagefromyuvtextures.cpp b/gm/imagefromyuvtextures.cpp |
index c3184be1dd23e43b6061a79ca694d36ad63c6428..a34ec6e5138a50c44d798197db35bb751947ada2 100644 |
--- a/gm/imagefromyuvtextures.cpp |
+++ b/gm/imagefromyuvtextures.cpp |
@@ -123,9 +123,8 @@ protected: |
} |
void onDraw(SkCanvas* canvas) override { |
- GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); |
- GrContext* context; |
- if (!rt || !(context = rt->getContext())) { |
+ GrContext* context = canvas->getGrContext(); |
+ if (!context) { |
skiagm::GM::DrawGpuOnlyMessage(canvas); |
return; |
} |