aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp4
-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
-rw-r--r--src/gpu/glsl/GrGLSLProgramBuilder.cpp4
-rw-r--r--src/gpu/glsl/GrGLSLProgramBuilder.h4
-rw-r--r--src/gpu/vk/GrVkPipelineState.cpp8
-rw-r--r--src/gpu/vk/GrVkPipelineState.h4
-rw-r--r--src/gpu/vk/GrVkPipelineStateBuilder.cpp4
9 files changed, 22 insertions, 22 deletions
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index eb6f49f7ad..ac22a8c0ef 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -176,7 +176,7 @@ void GrGLConvolutionEffect::GenKey(const GrProcessor& processor, const GrShaderC
}
///////////////////////////////////////////////////////////////////////////////
-static void fill_in_1D_guassian_kernel(float* kernel, int width, float gaussianSigma, int radius) {
+static void fill_in_1D_gaussian_kernel(float* kernel, int width, float gaussianSigma, int radius) {
const float denom = 1.0f / (2.0f * gaussianSigma * gaussianSigma);
float sum = 0.0f;
@@ -212,7 +212,7 @@ GrGaussianConvolutionFragmentProcessor::GrGaussianConvolutionFragmentProcessor(
this->addTextureSampler(&fTextureSampler);
SkASSERT(radius <= kMaxKernelRadius);
- fill_in_1D_guassian_kernel(fKernel, this->width(), gaussianSigma, this->radius());
+ fill_in_1D_gaussian_kernel(fKernel, this->width(), gaussianSigma, this->radius());
memcpy(fBounds, bounds, sizeof(fBounds));
}
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);
}
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.cpp b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
index a3c20c3dd1..bb3dc4f0a9 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.cpp
@@ -95,7 +95,7 @@ void GrGLSLProgramBuilder::emitAndInstallPrimProc(const GrPrimitiveProcessor& pr
fVS.codeAppendf("// Primitive Processor %s\n", proc.name());
SkASSERT(!fGeometryProcessor);
- fGeometryProcessor = proc.createGLSLInstance(*this->shaderCaps());
+ fGeometryProcessor.reset(proc.createGLSLInstance(*this->shaderCaps()));
SkSTArray<4, SamplerHandle> texSamplers(proc.numTextureSamplers());
SkSTArray<2, TexelBufferHandle> texelBuffers(proc.numBuffers());
@@ -207,7 +207,7 @@ void GrGLSLProgramBuilder::emitAndInstallXferProc(const SkString& colorIn,
SkASSERT(!fXferProcessor);
const GrXferProcessor& xp = fPipeline.getXferProcessor();
- fXferProcessor = xp.createGLSLInstance();
+ fXferProcessor.reset(xp.createGLSLInstance());
// Enable dual source secondary output if we have one
if (xp.hasSecondaryOutput()) {
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h
index dfdbd8242f..0457e71058 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.h
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.h
@@ -104,8 +104,8 @@ public:
BuiltinUniformHandles fUniformHandles;
- GrGLSLPrimitiveProcessor* fGeometryProcessor;
- GrGLSLXferProcessor* fXferProcessor;
+ std::unique_ptr<GrGLSLPrimitiveProcessor> fGeometryProcessor;
+ std::unique_ptr<GrGLSLXferProcessor> fXferProcessor;
GrGLSLFragProcs fFragmentProcessors;
protected:
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp
index 083d225ff8..ee2413547f 100644
--- a/src/gpu/vk/GrVkPipelineState.cpp
+++ b/src/gpu/vk/GrVkPipelineState.cpp
@@ -40,8 +40,8 @@ GrVkPipelineState::GrVkPipelineState(GrVkGpu* gpu,
uint32_t fragmentUniformSize,
uint32_t numSamplers,
uint32_t numTexelBuffers,
- GrGLSLPrimitiveProcessor* geometryProcessor,
- GrGLSLXferProcessor* xferProcessor,
+ std::unique_ptr<GrGLSLPrimitiveProcessor> geometryProcessor,
+ std::unique_ptr<GrGLSLXferProcessor> xferProcessor,
const GrGLSLFragProcs& fragmentProcessors)
: fPipeline(pipeline)
, fPipelineLayout(layout)
@@ -51,8 +51,8 @@ GrVkPipelineState::GrVkPipelineState(GrVkGpu* gpu,
, fSamplerDSHandle(samplerDSHandle)
, fTexelBufferDSHandle(texelBufferDSHandle)
, fBuiltinUniformHandles(builtinUniformHandles)
- , fGeometryProcessor(geometryProcessor)
- , fXferProcessor(xferProcessor)
+ , fGeometryProcessor(std::move(geometryProcessor))
+ , fXferProcessor(std::move(xferProcessor))
, fFragmentProcessors(fragmentProcessors)
, fDesc(desc)
, fDataManager(uniforms, geometryUniformSize, fragmentUniformSize) {
diff --git a/src/gpu/vk/GrVkPipelineState.h b/src/gpu/vk/GrVkPipelineState.h
index a5d334613e..2794b99d22 100644
--- a/src/gpu/vk/GrVkPipelineState.h
+++ b/src/gpu/vk/GrVkPipelineState.h
@@ -100,8 +100,8 @@ private:
uint32_t fragmentUniformSize,
uint32_t numSamplers,
uint32_t numTexelBuffers,
- GrGLSLPrimitiveProcessor* geometryProcessor,
- GrGLSLXferProcessor* xferProcessor,
+ std::unique_ptr<GrGLSLPrimitiveProcessor> geometryProcessor,
+ std::unique_ptr<GrGLSLXferProcessor> xferProcessor,
const GrGLSLFragProcs& fragmentProcessors);
void writeUniformBuffers(const GrVkGpu* gpu);
diff --git a/src/gpu/vk/GrVkPipelineStateBuilder.cpp b/src/gpu/vk/GrVkPipelineStateBuilder.cpp
index a3528dc77f..9b9b070073 100644
--- a/src/gpu/vk/GrVkPipelineStateBuilder.cpp
+++ b/src/gpu/vk/GrVkPipelineStateBuilder.cpp
@@ -204,8 +204,8 @@ GrVkPipelineState* GrVkPipelineStateBuilder::finalize(const GrStencilSettings& s
fUniformHandler.fCurrentFragmentUBOOffset,
(uint32_t)fUniformHandler.numSamplers(),
(uint32_t)fUniformHandler.numTexelBuffers(),
- fGeometryProcessor,
- fXferProcessor,
+ std::move(fGeometryProcessor),
+ std::move(fXferProcessor),
fFragmentProcessors);
}