Simplify the boilerplate of cloning a fragment processor.

GrFragmentProcessor now provides an (explicit) copy constructor which
clones all child processors and flags from the passed-in FP. Since we no
longer have flags which propagate up to the root node of the FP tree,
all flags are now safe to copy, since a cloned FP also clones all of its
children.

Change-Id: Ia9f80e0ec540ed1056d25dbb1861a174a1d55f4b
Bug: skia:12299
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437836
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index 64451c6..1b4acae 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -187,10 +187,9 @@
 }
 
 GrConvexPolyEffect::GrConvexPolyEffect(const GrConvexPolyEffect& that)
-        : INHERITED(kGrConvexPolyEffect_ClassID, that.optimizationFlags())
+        : INHERITED(that)
         , fEdgeType(that.fEdgeType)
         , fEdgeCount(that.fEdgeCount) {
-    this->cloneAndRegisterAllChildProcessors(that);
     memcpy(fEdges, that.fEdges, 3 * that.fEdgeCount * sizeof(SkScalar));
 }