aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-16 15:06:57 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-16 15:06:57 +0000
commit0d944821934145055f293fc717418d25208b9836 (patch)
treec1d831622031578108682035899a052569f41489 /src/gpu
parent51ee8f1fd2553c576c4173ec701253e933115777 (diff)
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
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/SkGpuDevice.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index e3ce2dccdf..14e4ff9672 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -546,6 +546,7 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev,
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 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev,
} 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 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev,
colorSampler->reset();
colorSampler->setCustomStage(SkNEW_ARGS(GrColorTableEffect, (texture)))->unref();
- } else {
- grPaint->resetColorFilter();
}
return true;
}