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
diff --git a/gpu/src/GrGLIRect.h b/gpu/src/GrGLIRect.h
index 5e3dfa6..e94fa21 100644
--- a/gpu/src/GrGLIRect.h
+++ b/gpu/src/GrGLIRect.h
@@ -23,17 +23,17 @@
     GrGLsizei fWidth;
     GrGLsizei fHeight;
 
-    void pushToGLViewport() const {
-        GR_GL(Viewport(fLeft, fBottom, fWidth, fHeight));
+    void pushToGLViewport(const GrGLInterface* gl) const {
+        GR_GL_CALL(gl, Viewport(fLeft, fBottom, fWidth, fHeight));
     }
 
-    void pushToGLScissor() const {
-        GR_GL(Scissor(fLeft, fBottom, fWidth, fHeight));
+    void pushToGLScissor(const GrGLInterface* gl) const {
+        GR_GL_CALL(gl, Scissor(fLeft, fBottom, fWidth, fHeight));
     }
 
-    void setFromGLViewport() {
+    void setFromGLViewport(const GrGLInterface* gl) {
         GR_STATIC_ASSERT(sizeof(GrGLIRect) == 4*sizeof(GrGLint));
-        GR_GL_GetIntegerv(GR_GL_VIEWPORT, (GrGLint*) this);
+        GR_GL_GetIntegerv(gl, GR_GL_VIEWPORT, (GrGLint*) this);
     }
 
     // sometimes we have a GrIRect from the client that we