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

Unified Diff: gm/imagefromyuvtextures.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/convexpolyeffect.cpp ('k') | gm/rectangletexture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | gm/rectangletexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698