Wow! LGTM, G=great. http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGLProgram.cpp File src/gpu/gl/GrGLProgram.cpp (right): http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGLProgram.cpp#ne... src/gpu/gl/GrGLProgram.cpp:101: delete fCustomStage[i]; fCustomStage[i] is refcounted - shouldn't we just SkSafeUnref() it? http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGLProgram.cpp#ne... src/gpu/gl/GrGLProgram.cpp:670: fCustomStage[s] = NULL; Is there some reason these shouldn't already be NULL? If so, should we be using SafeSetNull()? http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGpuGL.h File src/gpu/gl/GrGpuGL.h (right): http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGpuGL.h#newcode312 src/gpu/gl/GrGpuGL.h:312: SkAutoTUnref<GrGLProgram> fCurrentProgram; This renaming by itself wins. http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGpuGL_unittest.cpp File src/gpu/gl/GrGpuGL_unittest.cpp (right): http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGpuGL_unittest.c... src/gpu/gl/GrGpuGL_unittest.cpp:234: ProgramDesc pdesc; Nit: move declaration down to where it's used?
http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGLProgram.cpp File src/gpu/gl/GrGLProgram.cpp (right): http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGLProgram.cpp#ne... src/gpu/gl/GrGLProgram.cpp:101: delete fCustomStage[i]; On 2012/07/16 17:23:16, TomH wrote: > fCustomStage[i] is refcounted - shouldn't we just SkSafeUnref() it? This is GrGLProgramStage which is not ref counted. I'll rename the array to fProgramState. http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGLProgram.cpp#ne... src/gpu/gl/GrGLProgram.cpp:670: fCustomStage[s] = NULL; On 2012/07/16 17:23:16, TomH wrote: > Is there some reason these shouldn't already be NULL? If so, should we be using > SafeSetNull()? They aren't currently initialized in the cons. I was going to do that in a follow up CL. Since they aren't ref-cnted, safesetnull is not necessary. http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGpuGL_unittest.cpp File src/gpu/gl/GrGpuGL_unittest.cpp (right): http://codereview.appspot.com/6409043/diff/8002/src/gpu/gl/GrGpuGL_unittest.c... src/gpu/gl/GrGpuGL_unittest.cpp:234: ProgramDesc pdesc; On 2012/07/16 17:23:16, TomH wrote: > Nit: move declaration down to where it's used? Done.
Closed with r4627.