// create a builder. This will be handed off to effects so they can use it to add
// uniforms, varyings, textures, etc
- SkAutoTDelete<GrGLProgramBuilder> builder(new GrGLProgramBuilder(gpu, args));
-
- GrGLProgramBuilder* pb = builder.get();
+ GrGLProgramBuilder builder(gpu, args);
// TODO: Once all stages can handle taking a float or vec4 and correctly handling them we can
// seed correctly here
GrGLSLExpr4 inputColor;
GrGLSLExpr4 inputCoverage;
- if (!pb->emitAndInstallProcs(&inputColor,
- &inputCoverage,
- gpu->glCaps().maxFragmentTextureUnits())) {
- pb->cleanupFragmentProcessors();
+ if (!builder.emitAndInstallProcs(&inputColor,
+ &inputCoverage,
+ gpu->glCaps().maxFragmentTextureUnits())) {
+ builder.cleanupFragmentProcessors();
return nullptr;
}
- return pb->finalize();
+ return builder.finalize();
}
/////////////////////////////////////////////////////////////////////////////