Move stuff from protected to private in GrGpuGL

Review URL: http://codereview.appspot.com/6295044/



git-svn-id: http://skia.googlecode.com/svn/trunk@4161 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index f19981a..5830348 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -55,36 +55,8 @@
 
     bool programUnitTest();
 
+
 protected:
-
-    enum TriState {
-        kNo_TriState,
-        kYes_TriState,
-        kUnknown_TriState
-    };
-
-    struct {
-        size_t                  fVertexOffset;
-        GrVertexLayout          fVertexLayout;
-        const GrVertexBuffer*   fVertexBuffer;
-        const GrIndexBuffer*    fIndexBuffer;
-        bool                    fArrayPtrsDirty;
-    } fHWGeometryState;
-
-    enum UnpremulConversion {
-        kUpOnWrite_DownOnRead_UnpremulConversion,
-        kDownOnWrite_UpOnRead_UnpremulConversion
-    } fUnpremulConversion;
-
-    // last scissor / viewport scissor state seen by the GL.
-    struct {
-        bool        fScissorEnabled;
-        GrGLIRect   fScissorRect;
-        GrGLIRect   fViewportRect;
-    } fHWBounds;
-
-    const GrGLCaps& glCaps() const { return fGLContextInfo.caps(); }
-
     // GrGpu overrides
     virtual void onResetContext() SK_OVERRIDE;
 
@@ -146,6 +118,9 @@
                                int vertexCount,
                                int indexCount) SK_OVERRIDE;
 
+private:
+
+    const GrGLCaps& glCaps() const { return fGLContextInfo.caps(); }
 
     // binds texture unit in GL
     void setTextureUnit(int unitIdx);
@@ -182,7 +157,6 @@
 
     static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff);
 
-private:
     // for readability of function impls
     typedef GrGLProgram::ProgramDesc ProgramDesc;
     typedef ProgramDesc::StageDesc   StageDesc;
@@ -318,12 +292,36 @@
     // GL program-related state
     ProgramCache*               fProgramCache;
     CachedData*                 fProgramData;
+    GrGLProgram                 fCurrentProgram;
+
+    ///////////////////////////////////////////////////////////////////////////
+    ///@name Caching of GL State
+    ///@{
+    int                         fHWActiveTextureUnitIdx;
     GrGLuint                    fHWProgramID;
     GrColor                     fHWConstAttribColor;
     GrColor                     fHWConstAttribCoverage;
-    GrGLProgram                 fCurrentProgram;
 
-    int fActiveTextureUnitIdx;
+    // last scissor / viewport scissor state seen by the GL.
+    struct {
+        bool        fScissorEnabled;
+        GrGLIRect   fScissorRect;
+        GrGLIRect   fViewportRect;
+    } fHWBounds;
+
+    enum TriState {
+        kNo_TriState,
+        kYes_TriState,
+        kUnknown_TriState
+    };
+
+    struct {
+        size_t                  fVertexOffset;
+        GrVertexLayout          fVertexLayout;
+        const GrVertexBuffer*   fVertexBuffer;
+        const GrIndexBuffer*    fIndexBuffer;
+        bool                    fArrayPtrsDirty;
+    } fHWGeometryState;
 
     struct {
         GrBlendCoeff    fSrcCoeff;
@@ -371,11 +369,17 @@
     TriState                fHWDitherEnabled;
     GrRenderTarget*         fHWBoundRenderTarget;
     GrTexture*              fHWBoundTextures[GrDrawState::kNumStages];
+    ///@}
 
     // we record what stencil format worked last time to hopefully exit early
     // from our loop that tries stencil formats and calls check fb status.
     int fLastSuccessfulStencilFmtIdx;
 
+    enum UnpremulConversion {
+        kUpOnWrite_DownOnRead_UnpremulConversion,
+        kDownOnWrite_UpOnRead_UnpremulConversion
+    } fUnpremulConversion;
+
     enum CanPreserveUnpremulRoundtrip {
         kUnknown_CanPreserveUnpremulRoundtrip,
         kNo_CanPreserveUnpremulRoundtrip,