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

Unified Diff: gm/rectangletexture.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/imagefromyuvtextures.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rectangletexture.cpp
diff --git a/gm/rectangletexture.cpp b/gm/rectangletexture.cpp
index 47390e2e1911e496983cc311e059771f570211c6..099048754ca52716e2fcae9e990a4b4587e6cea7 100644
--- a/gm/rectangletexture.cpp
+++ b/gm/rectangletexture.cpp
@@ -119,9 +119,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/imagefromyuvtextures.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698