Fix uninitialized color filter data on GrPaint

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


git-svn-id: http://skia.googlecode.com/svn/trunk@5125 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index e3ce2dc..14e4ff9 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -546,6 +546,7 @@
     SkXfermode::Mode filterMode;
     SkScalar matrix[20];
     SkBitmap colorTransformTable;
+    grPaint->resetColorFilter();
     if (colorFilter != NULL && colorFilter->asColorMode(&color, &filterMode)) {
         grPaint->fColorMatrixEnabled = false;
         if (!constantColor) {
@@ -554,7 +555,6 @@
         } else {
             SkColor filtered = colorFilter->filterColor(skPaint.getColor());
             grPaint->fColor = SkColor2GrColor(filtered);
-            grPaint->resetColorFilter();
         }
     } else if (colorFilter != NULL && colorFilter->asColorMatrix(matrix)) {
         grPaint->fColorMatrixEnabled = true;
@@ -569,8 +569,6 @@
 
         colorSampler->reset();
         colorSampler->setCustomStage(SkNEW_ARGS(GrColorTableEffect, (texture)))->unref();
-    } else {
-        grPaint->resetColorFilter();
     }
     return true;
 }