Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 1604313002: Make GrGLProgramBuilder a local stack variable in CreateProgram (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index 4a1b2e9ac5a5f16b0f8b4770a836ec3978c06533..18d19172893910bf2b64b381deba89affd1e323b 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -33,23 +33,21 @@ GrGLProgram* GrGLProgramBuilder::CreateProgram(const DrawArgs& args, GrGLGpu* gp
// 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();
}
/////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698