Revert "Avoid re-rendering stencil clip for every draw with reducable clip stack"

This reverts commit 92a7d4bf6a371f1f864154be902e8d86938e560b.

Revert "fix mac 10.6 build"

This reverts commit 114cd1a9f2734aaed6914718814364811b78bd7f.

BUG=

Review URL: https://codereview.chromium.org/54543008

git-svn-id: http://skia.googlecode.com/svn/trunk@12087 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index 8480e04..a5f4519 100644
--- a/src/gpu/GrReducedClip.cpp
+++ b/src/gpu/GrReducedClip.cpp
@@ -17,7 +17,6 @@
 void reduced_stack_walker(const SkClipStack& stack,
                           const SkRect& queryBounds,
                           ElementList* result,
-                          int32_t* resultGenID,
                           InitialState* initialState,
                           bool* requiresAA);
 
@@ -31,17 +30,11 @@
 void ReduceClipStack(const SkClipStack& stack,
                      const SkIRect& queryBounds,
                      ElementList* result,
-                     int32_t* resultGenID,
                      InitialState* initialState,
                      SkIRect* tighterBounds,
                      bool* requiresAA) {
     result->reset();
 
-    // The clip established by the element list might be cached based on the last
-    // generation id. When we make early returns, we do not know what was the generation
-    // id that lead to the state. Make a conservative guess.
-    *resultGenID = stack.getTopmostGenID();
-
     if (stack.isWideOpen()) {
         *initialState = kAllIn_InitialState;
         return;
@@ -77,9 +70,7 @@
                 SkRect scalarTighterBounds = SkRect::Make(*tighterBounds);
                 if (scalarTighterBounds == isectRect) {
                     // the round-out didn't add any area outside the clip rect.
-                    if (NULL != requiresAA) {
-                        *requiresAA = false;
-                    }
+                    *requiresAA = false;
                     *initialState = kAllIn_InitialState;
                     return;
                 }
@@ -132,17 +123,12 @@
 
     // Now that we have determined the bounds to use and filtered out the trivial cases, call the
     // helper that actually walks the stack.
-    reduced_stack_walker(stack, scalarBounds, result, resultGenID, initialState, requiresAA);
-
-    // The list that was computed in this function may be cached based on the gen id of the last
-    // element.
-    SkASSERT(SkClipStack::kInvalidGenID != *resultGenID);
+    reduced_stack_walker(stack, scalarBounds, result, initialState, requiresAA);
 }
 
 void reduced_stack_walker(const SkClipStack& stack,
                           const SkRect& queryBounds,
                           ElementList* result,
-                          int32_t* resultGenID,
                           InitialState* initialState,
                           bool* requiresAA) {
 
@@ -326,11 +312,6 @@
                 break;
         }
         if (!skippable) {
-            if (0 == result->count()) {
-                // This will be the last element. Record the stricter genID.
-                *resultGenID = element->getGenID();
-            }
-
             // if it is a flip, change it to a bounds-filling rect
             if (isFlip) {
                 SkASSERT(SkRegion::kXOR_Op == element->getOp() ||
@@ -436,13 +417,5 @@
     if (NULL != requiresAA) {
         *requiresAA = numAAElements > 0;
     }
-
-    if (0 == result->count()) {
-        if (*initialState == kAllIn_InitialState) {
-            *resultGenID = SkClipStack::kWideOpenGenID;
-        } else {
-            *resultGenID = SkClipStack::kEmptyGenID;
-        }
-    }
 }
 } // namespace GrReducedClip