From f0784bde753feaff601f703089872fc1af265328 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Fri, 1 Nov 2013 16:25:59 +0000 Subject: 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 --- src/gpu/GrReducedClip.cpp | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) (limited to 'src/gpu/GrReducedClip.cpp') diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp index 8480e041b8..a5f4519ea7 100644 --- a/src/gpu/GrReducedClip.cpp +++ b/src/gpu/GrReducedClip.cpp @@ -17,7 +17,6 @@ namespace GrReducedClip { void reduced_stack_walker(const SkClipStack& stack, const SkRect& queryBounds, ElementList* result, - int32_t* resultGenID, InitialState* initialState, bool* requiresAA); @@ -31,17 +30,11 @@ take a rect in case the caller knows a bound on what is to be drawn through this 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 @@ void ReduceClipStack(const SkClipStack& stack, 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 @@ void ReduceClipStack(const SkClipStack& stack, // 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 @@ void reduced_stack_walker(const SkClipStack& stack, 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 @@ void reduced_stack_walker(const SkClipStack& stack, if (NULL != requiresAA) { *requiresAA = numAAElements > 0; } - - if (0 == result->count()) { - if (*initialState == kAllIn_InitialState) { - *resultGenID = SkClipStack::kWideOpenGenID; - } else { - *resultGenID = SkClipStack::kEmptyGenID; - } - } } } // namespace GrReducedClip -- cgit v1.2.3