aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-20 15:09:31 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-20 15:09:31 +0000
commitcbd0ad90307c2d9d1fce0239476fb03dec8eca9b (patch)
tree10bc59cd74c3446da4e137c5338fd1386b6270e6
parent25f3e9bb6362a985bb6ac82c0b28a00d9d00f4e9 (diff)
Fix color filter LUT (install custom stage after reset of sampler). Over the shoulder review by TomH.
git-svn-id: http://skia.googlecode.com/svn/trunk@4691 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/gpu/SkGpuDevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index d6e37833fb..18f2ff52f2 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -514,11 +514,11 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev,
GrSamplerState* colorSampler = grPaint->textureSampler(kColorFilterTextureIdx);
GrTexture* texture = act->set(dev, colorTransformTable, colorSampler);
- colorSampler->setCustomStage(SkNEW_ARGS(GrColorTableEffect, (texture)))->unref();
// reset() sets the sampler's matrix to I. The custom stage doesn't require the matrix.
// The shader generator will omit the matrix if it is I. Once the matrix is moved from the
// sampler state to the custom stage this will no longer be necessary.
colorSampler->reset(GrSamplerState::kClamp_WrapMode, GrSamplerState::kNearest_Filter);
+ colorSampler->setCustomStage(SkNEW_ARGS(GrColorTableEffect, (texture)))->unref();
} else {
grPaint->resetColorFilter();
}