Index: src/gpu/GrReducedClip.cpp |
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp |
index da42e8cff87c098c4827705aa83ca579a202d4b7..2b6583e3e328f2a5454620a3c2ae68b3a992c7de 100644 |
--- a/src/gpu/GrReducedClip.cpp |
+++ b/src/gpu/GrReducedClip.cpp |
@@ -355,7 +355,13 @@ void reduced_stack_walker(const SkClipStack& stack, |
break; |
case SkRegion::kIntersect_Op: |
// intersecting with the empty set yields the empty set |
- skippable = kAllOut_InitialState == *initialState; |
+ if (kAllOut_InitialState == *initialState) { |
+ skippable = true; |
+ } else { |
+ // We can clear to zero and then simply draw the clip element. |
+ *initialState = kAllOut_InitialState; |
+ element->setOp(SkRegion::kReplace_Op); |
+ } |
break; |
case SkRegion::kUnion_Op: |
if (kAllIn_InitialState == *initialState) { |