aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/bleed.cpp
diff options
context:
space:
mode:
authorGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-16 20:42:15 +0000
committerGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-16 20:42:15 +0000
commit62b50b7bb8395f9bc281a4d0ed20acc4813f1445 (patch)
tree5af9e93540690a23e482c36632bbf4effaec5da7 /gm/bleed.cpp
parent1cf02a8adffd096dff0eecabc1d3ee66ec18f911 (diff)
Have GMs read the GrContext via a setter/getter rather than a global.
GetGr's current global state makes things rather tricky to run GPU GMs in parallel (DM). This API change will let me feed the right GrContext to the right GM in DM. I'm not planning on changing the status quo in GM-the-tool: the new getters and setters still just return the same global. BUG=skia:1590 R=bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/23567032 git-svn-id: http://skia.googlecode.com/svn/trunk@11306 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/bleed.cpp')
-rw-r--r--gm/bleed.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/gm/bleed.cpp b/gm/bleed.cpp
index 2b2d8497cf..dc7e96fbb1 100644
--- a/gm/bleed.cpp
+++ b/gm/bleed.cpp
@@ -12,10 +12,6 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
-
-namespace skiagm {
-extern GrContext* GetGr();
-};
#endif
// Create a black&white checked texture with a 1-pixel red ring
@@ -175,7 +171,7 @@ protected:
#if SK_SUPPORT_GPU
- GrContext* ctx = skiagm::GetGr();
+ GrContext* ctx = GM::GetGr(canvas);
int oldMaxTextureSize = 0;
if (NULL != ctx) {
// shrink the max texture size so all our textures can be reasonably sized