diff options
author | egdaniel <egdaniel@google.com> | 2016-01-20 07:53:51 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-20 07:53:51 -0800 |
commit | c1e710140b652509822a42872c4d4dd058393582 (patch) | |
tree | e0486600f1825c34192eb5b9b235c12828ca01cd | |
parent | 2b39ffc9d225419b6122e8d31da2ab9c797301c6 (diff) |
Make GrGLProgramBuilder a local stack variable in CreateProgram
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1604313002
Review URL: https://codereview.chromium.org/1604313002
-rw-r--r-- | src/gpu/gl/builders/GrGLProgramBuilder.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp index 4a1b2e9ac5..18d1917289 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(); } ///////////////////////////////////////////////////////////////////////////// |