Remove assertion when texture matrix is unused
authorbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 20 Jul 2012 16:17:03 +0000 (16:17 +0000)
committerbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 20 Jul 2012 16:17:03 +0000 (16:17 +0000)
Review URL: http://codereview.appspot.com/6420054/

git-svn-id: http://skia.googlecode.com/svn/trunk@4693 2bbb7eff-a529-9590-31e7-b0007b416f81

src/gpu/SkGpuDevice.cpp
src/gpu/gl/GrGLProgram.cpp

index 18f2ff5..32d5883 100644 (file)
@@ -514,9 +514,6 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev,
         GrSamplerState* colorSampler = grPaint->textureSampler(kColorFilterTextureIdx);
         GrTexture* texture = act->set(dev, colorTransformTable, colorSampler);
 
-        // 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 {
index 52a4bd3..8c1f4f7 100644 (file)
@@ -1032,7 +1032,8 @@ void GrGLProgram::getUniformLocationsAndInitCache(const GrGLShaderBuilder& build
                 tex_matrix_name(s, &texMName);
                 GL_CALL_RET(locations.fTextureMatrixUni,
                             GetUniformLocation(fProgramID, texMName.c_str()));
-                GrAssert(kUnusedUniform != locations.fTextureMatrixUni);
+                //color filter table effect does not consumer coords gen'ed by matrix.
+                //GrAssert(kUnusedUniform != locations.fTextureMatrixUni);
             }
 
             if (kUseUniform == locations.fSamplerUni) {