diff options
author | 2012-07-20 14:23:09 +0000 | |
---|---|---|
committer | 2012-07-20 14:23:09 +0000 | |
commit | 25f3e9bb6362a985bb6ac82c0b28a00d9d00f4e9 (patch) | |
tree | c918f63a7f021dc1991cb3872b24ef720258c32e | |
parent | 300f562dedd02df2f41de443c8b58ab2ceaed0f0 (diff) |
Work around unused matrix uniform assertion for color filter LUT.
Review URL: http://codereview.appspot.com/6420054/
git-svn-id: http://skia.googlecode.com/svn/trunk@4690 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 1ef52fb542..d6e37833fb 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -515,9 +515,10 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev, GrTexture* texture = act->set(dev, colorTransformTable, colorSampler); colorSampler->setCustomStage(SkNEW_ARGS(GrColorTableEffect, (texture)))->unref(); - colorSampler->setFilter(GrSamplerState::kNearest_Filter); - colorSampler->setWrapX(GrSamplerState::kClamp_WrapMode); - colorSampler->setWrapY(GrSamplerState::kClamp_WrapMode); + // 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); } else { grPaint->resetColorFilter(); } |