Skip flush functions for disabled stages

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



git-svn-id: http://skia.googlecode.com/svn/trunk@2870 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrGpuGLShaders.cpp b/src/gpu/GrGpuGLShaders.cpp
index 5fe90b8..98ac1bf 100644
--- a/src/gpu/GrGpuGLShaders.cpp
+++ b/src/gpu/GrGpuGLShaders.cpp
@@ -718,15 +718,17 @@
     this->flushViewMatrix();
 
     for (int s = 0; s < GrDrawState::kNumStages; ++s) {
-        this->flushTextureMatrix(s);
+        if (this->isStageEnabled(s)) {
+            this->flushTextureMatrix(s);
 
-        this->flushRadial2(s);
+            this->flushRadial2(s);
 
-        this->flushConvolution(s);
+            this->flushConvolution(s);
 
-        this->flushTexelSize(s);
+            this->flushTexelSize(s);
 
-        this->flushTextureDomain(s);
+            this->flushTextureDomain(s);
+        }
     }
     this->flushEdgeAAData();
     resetDirtyFlags();