Revert "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"

This reverts commit 8e7432b7f98dd592e529a0c8bb038d73ebfb0478.

Reason for revert: <INSERT REASONING HERE>

external/skia/bench/../tools/android/SkAndroidSDKCanvas.h:103:36: error: C++ requires a type specifier for all declarations
    void onClipRect(const SkRect&, ClipOp, ClipEdgeStyle) override;

Original change's description:
> remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS
> 
> 
> switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone
> 
> BUG=skia:
> 
> Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d
> Reviewed-on: https://skia-review.googlesource.com/5714
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=reed@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: If26ea91d7464615e43c1d3d2f726e337ff56b55c
Reviewed-on: https://skia-review.googlesource.com/5721
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp
index 13e6024..548f5b7 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -167,10 +167,10 @@
     for (ElementList::Iter iter(reducedClip.elements()); iter.get(); iter.next()) {
         const Element* element = iter.get();
 
-        SkClipOp op = element->getOp();
+        SkCanvas::ClipOp op = element->getOp();
         bool invert = element->isInverseFilled();
         bool needsStencil = invert ||
-                            kIntersect_SkClipOp == op || kReverseDifference_SkClipOp == op;
+                            SkCanvas::kIntersect_Op == op || SkCanvas::kReverseDifference_Op == op;
 
         if (PathNeedsSWRenderer(context, hasUserStencilSettings,
                                 renderTargetContext, translate, element, nullptr, needsStencil)) {
@@ -191,7 +191,7 @@
     SkSTArray<kMaxAnalyticElements, sk_sp<GrFragmentProcessor>> fps;
     ElementList::Iter iter(elements);
     while (iter.get()) {
-        SkClipOp op = iter.get()->getOp();
+        SkCanvas::ClipOp op = iter.get()->getOp();
         bool invert;
         bool skip = false;
         switch (op) {
@@ -449,14 +449,14 @@
 
     for (ElementList::Iter iter(reducedClip.elements()); iter.get(); iter.next()) {
         const Element* element = iter.get();
-        SkClipOp op = element->getOp();
+        SkCanvas::ClipOp op = element->getOp();
 
-        if (kIntersect_SkClipOp == op || kReverseDifference_SkClipOp == op) {
+        if (SkCanvas::kIntersect_Op == op || SkCanvas::kReverseDifference_Op == op) {
             // Intersect and reverse difference require modifying pixels outside of the geometry
             // that is being "drawn". In both cases we erase all the pixels outside of the geometry
             // but leave the pixels inside the geometry alone. For reverse difference we invert all
             // the pixels before clearing the ones outside the geometry.
-            if (kReverseDifference_SkClipOp == op) {
+            if (SkCanvas::kReverseDifference_Op == op) {
                 SkRect temp = SkRect::Make(reducedClip.ibounds());
                 // invert the entire scene
                 helper.drawRect(temp, SkRegion::kXOR_Op, false, 0xFF);
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index c5d764d..a82048b 100644
--- a/src/gpu/GrReducedClip.cpp
+++ b/src/gpu/GrReducedClip.cpp
@@ -75,7 +75,7 @@
         fHasIBounds = true;
 
         // Implement the clip with an AA rect element.
-        fElements.addToHead(stackBounds, kReplace_SkClipOp, true/*doAA*/);
+        fElements.addToHead(stackBounds, SkCanvas::kReplace_Op, true/*doAA*/);
         fElementsGenID = stack.getTopmostGenID();
         fRequiresAA = true;
 
@@ -147,7 +147,7 @@
         bool isFlip = false; // does this op just flip the in/out state of every point in the bounds
 
         switch (element->getOp()) {
-            case kDifference_SkClipOp:
+            case SkCanvas::kDifference_Op:
                 // check if the shape subtracted either contains the entire bounds (and makes
                 // the clip empty) or is outside the bounds and therefore can be skipped.
                 if (element->isInverseFilled()) {
@@ -173,7 +173,7 @@
                     emsmallens = true;
                 }
                 break;
-            case kIntersect_SkClipOp:
+            case SkCanvas::kIntersect_Op:
                 // check if the shape intersected contains the entire bounds and therefore can
                 // be skipped or it is outside the entire bounds and therefore makes the clip
                 // empty.
@@ -206,7 +206,7 @@
                     emsmallens = true;
                 }
                 break;
-            case kUnion_SkClipOp:
+            case SkCanvas::kUnion_Op:
                 // If the union-ed shape contains the entire bounds then after this element
                 // the bounds is entirely inside the clip. If the union-ed shape is outside the
                 // bounds then this op can be skipped.
@@ -229,7 +229,7 @@
                     embiggens = true;
                 }
                 break;
-            case kXOR_SkClipOp:
+            case SkCanvas::kXOR_Op:
                 // If the bounds is entirely inside the shape being xor-ed then the effect is
                 // to flip the inside/outside state of every point in the bounds. We may be
                 // able to take advantage of this in the forward pass. If the xor-ed shape
@@ -251,7 +251,7 @@
                     emsmallens = embiggens = true;
                 }
                 break;
-            case kReverseDifference_SkClipOp:
+            case SkCanvas::kReverseDifference_Op:
                 // When the bounds is entirely within the rev-diff shape then this behaves like xor
                 // and reverses every point inside the bounds. If the shape is completely outside
                 // the bounds then we know after this element is applied that the bounds will be
@@ -276,7 +276,7 @@
                 }
                 break;
 
-            case kReplace_SkClipOp:
+            case SkCanvas::kReplace_Op:
                 // Replace will always terminate our walk. We will either begin the forward walk
                 // at the replace op or detect here than the shape is either completely inside
                 // or completely outside the bounds. In this latter case it can be skipped by
@@ -326,9 +326,9 @@
 
             // if it is a flip, change it to a bounds-filling rect
             if (isFlip) {
-                SkASSERT(kXOR_SkClipOp == element->getOp() ||
-                         kReverseDifference_SkClipOp == element->getOp());
-                fElements.addToHead(SkRect::Make(fIBounds), kReverseDifference_SkClipOp, false);
+                SkASSERT(SkCanvas::kXOR_Op == element->getOp() ||
+                         SkCanvas::kReverseDifference_Op == element->getOp());
+                fElements.addToHead(SkRect::Make(fIBounds), SkCanvas::kReverseDifference_Op, false);
             } else {
                 Element* newElement = fElements.addToHead(*element);
                 if (newElement->isAA()) {
@@ -337,11 +337,11 @@
                 // Intersecting an inverse shape is the same as differencing the non-inverse shape.
                 // Replacing with an inverse shape is the same as setting initialState=kAllIn and
                 // differencing the non-inverse shape.
-                bool isReplace = kReplace_SkClipOp == newElement->getOp();
+                bool isReplace = SkCanvas::kReplace_Op == newElement->getOp();
                 if (newElement->isInverseFilled() &&
-                    (kIntersect_SkClipOp == newElement->getOp() || isReplace)) {
+                    (SkCanvas::kIntersect_Op == newElement->getOp() || isReplace)) {
                     newElement->invertShapeFillType();
-                    newElement->setOp(kDifference_SkClipOp);
+                    newElement->setOp(SkCanvas::kDifference_Op);
                     if (isReplace) {
                         SkASSERT(InitialTriState::kAllOut == initialTriState);
                         initialTriState = InitialTriState::kAllIn;
@@ -360,36 +360,36 @@
         while (element) {
             bool skippable = false;
             switch (element->getOp()) {
-                case kDifference_SkClipOp:
+                case SkCanvas::kDifference_Op:
                     // subtracting from the empty set yields the empty set.
                     skippable = InitialTriState::kAllOut == initialTriState;
                     break;
-                case kIntersect_SkClipOp:
+                case SkCanvas::kIntersect_Op:
                     // intersecting with the empty set yields the empty set
                     if (InitialTriState::kAllOut == initialTriState) {
                         skippable = true;
                     } else {
                         // We can clear to zero and then simply draw the clip element.
                         initialTriState = InitialTriState::kAllOut;
-                        element->setOp(kReplace_SkClipOp);
+                        element->setOp(SkCanvas::kReplace_Op);
                     }
                     break;
-                case kUnion_SkClipOp:
+                case SkCanvas::kUnion_Op:
                     if (InitialTriState::kAllIn == initialTriState) {
                         // unioning the infinite plane with anything is a no-op.
                         skippable = true;
                     } else {
                         // unioning the empty set with a shape is the shape.
-                        element->setOp(kReplace_SkClipOp);
+                        element->setOp(SkCanvas::kReplace_Op);
                     }
                     break;
-                case kXOR_SkClipOp:
+                case SkCanvas::kXOR_Op:
                     if (InitialTriState::kAllOut == initialTriState) {
                         // xor could be changed to diff in the kAllIn case, not sure it's a win.
-                        element->setOp(kReplace_SkClipOp);
+                        element->setOp(SkCanvas::kReplace_Op);
                     }
                     break;
-                case kReverseDifference_SkClipOp:
+                case SkCanvas::kReverseDifference_Op:
                     if (InitialTriState::kAllIn == initialTriState) {
                         // subtracting the whole plane will yield the empty set.
                         skippable = true;
@@ -402,11 +402,11 @@
                         if (skippable) {
                             initialTriState = InitialTriState::kAllIn;
                         } else {
-                            element->setOp(kReplace_SkClipOp);
+                            element->setOp(SkCanvas::kReplace_Op);
                         }
                     }
                     break;
-                case kReplace_SkClipOp:
+                case SkCanvas::kReplace_Op:
                     skippable = false; // we would have skipped it in the backwards walk if we
                                        // could've.
                     break;
@@ -431,12 +431,12 @@
     fInitialState = static_cast<GrReducedClip::InitialState>(initialTriState);
 }
 
-static bool element_is_pure_subtract(SkClipOp op) {
+static bool element_is_pure_subtract(SkCanvas::ClipOp op) {
     SkASSERT(op >= 0);
-    return op <= kIntersect_SkClipOp;
+    return op <= SkCanvas::kIntersect_Op;
 
-    GR_STATIC_ASSERT(0 == kDifference_SkClipOp);
-    GR_STATIC_ASSERT(1 == kIntersect_SkClipOp);
+    GR_STATIC_ASSERT(0 == SkCanvas::kDifference_Op);
+    GR_STATIC_ASSERT(1 == SkCanvas::kIntersect_Op);
 }
 
 void GrReducedClip::addInteriorWindowRectangles(int maxWindowRectangles) {
@@ -446,7 +446,7 @@
     ElementList::Iter iter(fElements, ElementList::Iter::kTail_IterStart);
     for (; iter.get() && element_is_pure_subtract(iter.get()->getOp()); iter.prev()) {
         const Element* element = iter.get();
-        if (kDifference_SkClipOp != element->getOp()) {
+        if (SkCanvas::kDifference_Op != element->getOp()) {
             continue;
         }