minor improvement, remove some conditionals in GrAAConvexPathRenderer

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



git-svn-id: http://skia.googlecode.com/svn/trunk@3316 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 18dd6bf..7350f0f 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -749,6 +749,13 @@
                 return false;
             }
         }
+        if (kColorMatrix_StateBit & s.fFlagBits) {
+            if (memcmp(fColorMatrix,
+                        s.fColorMatrix,
+                        sizeof(fColorMatrix))) {
+                return false;
+            }
+        }
 
         return true;
     }
@@ -765,6 +772,9 @@
                        sizeof(GrSamplerState));
             }
         }
+        if (kColorMatrix_StateBit & s.fFlagBits) {
+            memcpy(this->fColorMatrix, s.fColorMatrix, sizeof(fColorMatrix));
+        }
 
         return *this;
     }
@@ -779,7 +789,6 @@
     DrawFace            fDrawFace; 
     VertexEdgeType      fVertexEdgeType;
     GrStencilSettings   fStencilSettings;
-    float               fColorMatrix[20];       // 5 x 4 matrix
     GrRenderTarget*     fRenderTarget;
     // @}
 
@@ -803,6 +812,8 @@
     // This field must be last; it will not be copied or compared
     // if the corresponding fTexture[] is NULL.
     GrSamplerState      fSamplerStates[kNumStages];
+    // only compared if the color matrix enable flag is set
+    float               fColorMatrix[20];       // 5 x 4 matrix
 
     size_t leadingBytes() const {
         // Can't use offsetof() with non-POD types, so stuck with pointer math.