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

Unified Diff: gm/texdata.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/image.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texdata.cpp
diff --git a/gm/texdata.cpp b/gm/texdata.cpp
index b2c7139d8533159fec241fc60f4c799108b64e4d..8ba0c7741c8eab3b8e877ddca24a7804e851b837 100644
--- a/gm/texdata.cpp
+++ b/gm/texdata.cpp
@@ -18,8 +18,6 @@
namespace skiagm {
-extern GrContext* GetGr();
-
static const int S = 200;
class TexDataGM : public GM {
@@ -40,7 +38,7 @@ protected:
virtual void onDraw(SkCanvas* canvas) {
SkBaseDevice* device = canvas->getTopDevice();
GrRenderTarget* target = device->accessRenderTarget();
- GrContext* ctx = GetGr();
+ GrContext* ctx = GM::GetGr(canvas);
if (ctx && target) {
SkPMColor gTextureData[(2 * S) * (2 * S)];
static const int stride = 2 * S;
« no previous file with comments | « gm/image.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698