aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-08-01 16:13:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-01 20:46:28 +0000
commit369e8b70eedfd151c7f88e50d7f430f4cda5d57e (patch)
tree3e77b9ce2c1f4b604bfa42d211f158140e242d2e /src/gpu/gl
parent0e9605542444a7653359f4fc610f7620df9f6313 (diff)
Fix cleanup on program creation failure
Change-Id: Ibc9b96537f774a3b8a43848b8b626f3f036b07b3 Reviewed-on: https://skia-review.googlesource.com/29561 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLProgram.cpp8
-rw-r--r--src/gpu/gl/GrGLProgram.h4
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.cpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index aa67bed65c..82a8170b50 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -34,13 +34,13 @@ GrGLProgram::GrGLProgram(GrGLGpu* gpu,
const UniformInfoArray& texelBuffers,
const UniformInfoArray& imageStorages,
const VaryingInfoArray& pathProcVaryings,
- GrGLSLPrimitiveProcessor* geometryProcessor,
- GrGLSLXferProcessor* xferProcessor,
+ std::unique_ptr<GrGLSLPrimitiveProcessor> geometryProcessor,
+ std::unique_ptr<GrGLSLXferProcessor> xferProcessor,
const GrGLSLFragProcs& fragmentProcessors)
: fBuiltinUniformHandles(builtinUniforms)
, fProgramID(programID)
- , fGeometryProcessor(geometryProcessor)
- , fXferProcessor(xferProcessor)
+ , fGeometryProcessor(std::move(geometryProcessor))
+ , fXferProcessor(std::move(xferProcessor))
, fFragmentProcessors(fragmentProcessors)
, fDesc(desc)
, fGpu(gpu)
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index ec32c3557d..3a1879239d 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -115,8 +115,8 @@ protected:
const UniformInfoArray& texelBuffers,
const UniformInfoArray& imageStorages,
const VaryingInfoArray&, // used for NVPR only currently
- GrGLSLPrimitiveProcessor* geometryProcessor,
- GrGLSLXferProcessor* xferProcessor,
+ std::unique_ptr<GrGLSLPrimitiveProcessor> geometryProcessor,
+ std::unique_ptr<GrGLSLXferProcessor> xferProcessor,
const GrGLSLFragProcs& fragmentProcessors);
// A helper to loop over effects, set the transforms (via subclass) and bind textures
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index 8172002a4e..b7d31203aa 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -275,7 +275,7 @@ GrGLProgram* GrGLProgramBuilder::createProgram(GrGLuint programID) {
fUniformHandler.fTexelBuffers,
fUniformHandler.fImageStorages,
fVaryingHandler.fPathProcVaryingInfos,
- fGeometryProcessor,
- fXferProcessor,
+ std::move(fGeometryProcessor),
+ std::move(fXferProcessor),
fFragmentProcessors);
}