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
This commit is contained in:
bsalomon@google.com 2012-08-16 15:06:57 +00:00
parent 51ee8f1fd2
commit 0d94482193

View File

@ -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;
}