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

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: initialize fGr to NULL 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
« gm/gmmain.cpp ('K') | « 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..406f21cdd6a0dbfa067ed035763816014a008696 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 = this->getGr();
if (ctx && target) {
SkPMColor gTextureData[(2 * S) * (2 * S)];
static const int stride = 2 * S;
« gm/gmmain.cpp ('K') | « gm/image.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698