diff options
author | Brian Salomon <bsalomon@google.com> | 2017-07-28 07:34:05 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-28 11:54:47 +0000 |
commit | 3f6f965a5a65415c65fe9e64eb41896c66da771d (patch) | |
tree | 1de139167492fd077527517356bbf1f3298a9800 /src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp | |
parent | 71603cca8ec779bb3ad5ad18a3dc69e97910fb7c (diff) |
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>
Diffstat (limited to 'src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp')
-rw-r--r-- | src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp index 6d51cf9ed1..ebe86dd8f7 100644 --- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp +++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp @@ -217,7 +217,20 @@ GrGaussianConvolutionFragmentProcessor::GrGaussianConvolutionFragmentProcessor( 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 { |