aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-19 13:28:54 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-19 13:28:54 +0000
commit0b77d6892b067ad402c9678b0226bff70599fbe2 (patch)
treec3659ba65d516bedf2d3a021f2b9f4be94d3f04b /samplecode
parent098660020cf06ef9a95934b9635ab6996145b3e2 (diff)
Make GrGLInterface a per-GrContext refcounted object rather than a global
Review URL: http://codereview.appspot.com/4901046/ git-svn-id: http://skia.googlecode.com/svn/trunk@2140 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleApp.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index c523ad8f98..3805ca6607 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -153,10 +153,12 @@ public:
desc.fWidth = SkScalarRound(win->width());
desc.fHeight = SkScalarRound(win->height());
desc.fConfig = kRGBA_8888_GrPixelConfig;
- GR_GL_GetIntegerv(GR_GL_STENCIL_BITS, &desc.fStencilBits);
- GR_GL_GetIntegerv(GR_GL_SAMPLES, &desc.fSampleCnt);
+ const GrGLInterface* gl = GrGLGetDefaultGLInterface();
+ GrAssert(NULL != gl);
+ GR_GL_GetIntegerv(gl, GR_GL_STENCIL_BITS, &desc.fStencilBits);
+ GR_GL_GetIntegerv(gl, GR_GL_SAMPLES, &desc.fSampleCnt);
GrGLint buffer;
- GR_GL_GetIntegerv(GR_GL_FRAMEBUFFER_BINDING, &buffer);
+ GR_GL_GetIntegerv(gl, GR_GL_FRAMEBUFFER_BINDING, &buffer);
desc.fPlatformRenderTarget = buffer;
SkSafeUnref(fGrRenderTarget);