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

Unified Diff: gm/rrects.cpp

Issue 197433002: support direct writing to top layer (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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/texdata.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rrects.cpp
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index a79ff5462f67d71fe817c864c7eb2d1bae333a6a..6c63af9b30992f086fa8af0a652b28c8c95cb3e3 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -66,12 +66,8 @@ protected:
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
#if SK_SUPPORT_GPU
- SkBaseDevice* device = canvas->getTopDevice();
- GrContext* context = NULL;
- GrRenderTarget* rt = device->accessRenderTarget();
- if (NULL != rt) {
- context = rt->getContext();
- }
+ GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
+ GrContext* context = rt ? rt->getContext() : NULL;
if (kEffect_Type == fType && NULL == context) {
return;
}
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | gm/texdata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698