Implement clone for 6 additional GrFragmentProcessor subclasses.
GrMagnifierEffect
GrMorphologyEffect
GrBicubicEffect
GrGaussianConvolutionFragmentProcessor
GrMatrixConvolutionEffect
GrTextureDomainEffect
Bug: skia:
Change-Id: I69721b9b95346b365723e5ee21dff2dee8884466
Reviewed-on: https://skia-review.googlesource.com/27900
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index 6d51cf9..ebe86dd 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -217,7 +217,20 @@
memcpy(fBounds, bounds, sizeof(fBounds));
}
-GrGaussianConvolutionFragmentProcessor::~GrGaussianConvolutionFragmentProcessor() {}
+GrGaussianConvolutionFragmentProcessor::GrGaussianConvolutionFragmentProcessor(
+ const GrGaussianConvolutionFragmentProcessor& that)
+ : INHERITED(that.optimizationFlags())
+ , fCoordTransform(that.fCoordTransform)
+ , fTextureSampler(that.fTextureSampler)
+ , fRadius(that.fRadius)
+ , fDirection(that.fDirection)
+ , fMode(that.fMode) {
+ this->initClassID<GrGaussianConvolutionFragmentProcessor>();
+ this->addCoordTransform(&fCoordTransform);
+ this->addTextureSampler(&fTextureSampler);
+ memcpy(fKernel, that.fKernel, that.width() * sizeof(float));
+ memcpy(fBounds, that.fBounds, sizeof(fBounds));
+}
void GrGaussianConvolutionFragmentProcessor::onGetGLSLProcessorKey(const GrShaderCaps& caps,
GrProcessorKeyBuilder* b) const {