aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrDitherEffect.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-07-31 11:18:22 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-31 15:44:32 +0000
commitf57c0d67611186ba74179b53b421e64b63a579c7 (patch)
tree6e9cdae25bdc158bcd1a0b667bc95bb8185182f8 /src/gpu/effects/GrDitherEffect.cpp
parent45b0f15688c1c508204143a3239e0691abd14032 (diff)
automatically generate clone() methods for SkSL fragment processors
Bug: skia: Change-Id: Ib7b90f20d2b1558aad14f38f95c7c884e654c96d Reviewed-on: https://skia-review.googlesource.com/28620 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/effects/GrDitherEffect.cpp')
-rw-r--r--src/gpu/effects/GrDitherEffect.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp
index 38e4c77564..3b70493338 100644
--- a/src/gpu/effects/GrDitherEffect.cpp
+++ b/src/gpu/effects/GrDitherEffect.cpp
@@ -57,6 +57,13 @@ bool GrDitherEffect::onIsEqual(const GrFragmentProcessor& other) const {
if (fRangeType != that.fRangeType) return false;
return true;
}
+GrDitherEffect::GrDitherEffect(const GrDitherEffect& src)
+ : INHERITED(src.optimizationFlags()), fRangeType(src.fRangeType) {
+ this->initClassID<GrDitherEffect>();
+}
+sk_sp<GrFragmentProcessor> GrDitherEffect::clone() const {
+ return sk_sp<GrFragmentProcessor>(new GrDitherEffect(*this));
+}
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDitherEffect);
#if GR_TEST_UTILS
sk_sp<GrFragmentProcessor> GrDitherEffect::TestCreate(GrProcessorTestData* testData) {