TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1582933002
Review URL: https://codereview.chromium.org/
1582933002
#if SK_SUPPORT_GPU
GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
context = rt ? rt->getContext() : nullptr;
- SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(rt));
- if (!drawContext) {
- return;
+ SkAutoTUnref<GrDrawContext> drawContext;
+ if (kEffect_Type == fType) {
+ if (!context) {
+ skiagm::GM::DrawGpuOnlyMessage(canvas);
+ return;
+ }
+
+ drawContext.reset(context->drawContext(rt));
+ if (!drawContext) {
+ return;
+ }
}
#endif
if (kEffect_Type == fType && nullptr == context) {