Some cleanup on the way to getting rid of fSwizzle and fModulate on GrGLShaderBuilder.
LGTM + 1 question & 1 comment change request https://codereview.appspot.com/6497046/diff/2001/src/gpu/gl/GrGLSL.cpp File src/gpu/gl/GrGLSL.cpp (right): https://codereview.appspot.com/6497046/diff/2001/src/gpu/gl/GrGLSL.cpp#newcod... src/gpu/gl/GrGLSL.cpp:117: } else { // Both defaults are kOnes https://codereview.appspot.com/6497046/diff/2001/src/gpu/gl/GrGLSL.cpp#newcod... src/gpu/gl/GrGLSL.cpp:144: Why not remove the default<i> params and just always assume they are zero? https://codereview.appspot.com/6497046/diff/2001/src/gpu/gl/GrGLSL.h File src/gpu/gl/GrGLSL.h (right): https://codereview.appspot.com/6497046/diff/2001/src/gpu/gl/GrGLSL.h#newcode150 src/gpu/gl/GrGLSL.h:150: * The result is always a vec4. The inputs may be expressions, not just identifier names. Either in which _case_ params -> default<i>
https://codereview.appspot.com/6497046/diff/2001/src/gpu/gl/GrGLSL.cpp File src/gpu/gl/GrGLSL.cpp (right): https://codereview.appspot.com/6497046/diff/2001/src/gpu/gl/GrGLSL.cpp#newcod... src/gpu/gl/GrGLSL.cpp:117: } else { On 2012/08/29 10:47:27, robertphillips wrote: > // Both defaults are kOnes Done. https://codereview.appspot.com/6497046/diff/2001/src/gpu/gl/GrGLSL.cpp#newcod... src/gpu/gl/GrGLSL.cpp:144: On 2012/08/29 10:47:27, robertphillips wrote: > Why not remove the default<i> params and just always assume they are zero? I was thinking that a caller might not want this function to silently work when an input is empty/null if that is an unexpected condition. https://codereview.appspot.com/6497046/diff/2001/src/gpu/gl/GrGLSL.h File src/gpu/gl/GrGLSL.h (right): https://codereview.appspot.com/6497046/diff/2001/src/gpu/gl/GrGLSL.h#newcode150 src/gpu/gl/GrGLSL.h:150: * The result is always a vec4. The inputs may be expressions, not just identifier names. Either On 2012/08/29 10:47:27, robertphillips wrote: > in which _case_ > params -> default<i> Done.
Closed with r5332.