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

Unified Diff: gm/image.cpp

Issue 23567032: Have GMs read the GrContext via a setter/getter rather than a global. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: use Brian's suggestion Created 7 years, 3 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/gmmain.cpp ('k') | gm/texdata.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/image.cpp
diff --git a/gm/image.cpp b/gm/image.cpp
index 3ed85f9bab7ca4653e6297ddec73e3d59c61b849..6dada0d9492c14c93fe4e275c810d363d9e0cf39 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -13,10 +13,6 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
-
-namespace skiagm {
-extern GrContext* GetGr();
-};
#endif
static SkData* fileToData(const char path[]) {
@@ -193,7 +189,7 @@ protected:
SkAutoTUnref<SkSurface> surf2(SkSurface::NewPicture(info.fWidth, info.fHeight));
SkAutoTUnref<SkSurface> surf3(SkSurface::NewPicture(info.fWidth, info.fHeight));
#if SK_SUPPORT_GPU
- GrContext* ctx = skiagm::GetGr();
+ GrContext* ctx = GM::GetGr(canvas);
SkAutoTUnref<SkSurface> surf4(SkSurface::NewRenderTarget(ctx, info, 0));
#endif
« no previous file with comments | « gm/gmmain.cpp ('k') | gm/texdata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698