OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkAtomics.h" | 8 #include "SkAtomics.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkClipStack.h" | 10 #include "SkClipStack.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 // that aren't set are whatever isn't set in the previous | 230 // that aren't set are whatever isn't set in the previous |
231 // clip and whatever this clip carves out | 231 // clip and whatever this clip carves out |
232 fFiniteBound.join(prevFinite); | 232 fFiniteBound.join(prevFinite); |
233 fFiniteBoundType = kInsideOut_BoundsType; | 233 fFiniteBoundType = kInsideOut_BoundsType; |
234 break; | 234 break; |
235 case kPrev_InvCur_FillCombo: | 235 case kPrev_InvCur_FillCombo: |
236 // In this case everything outside of this clip's bound | 236 // In this case everything outside of this clip's bound |
237 // is erased, so the only pixels that can remain set | 237 // is erased, so the only pixels that can remain set |
238 // occur w/in the intersection of the two finite bounds | 238 // occur w/in the intersection of the two finite bounds |
239 if (!fFiniteBound.intersect(prevFinite)) { | 239 if (!fFiniteBound.intersect(prevFinite)) { |
240 this->setEmpty(); | 240 fFiniteBound.setEmpty(); |
241 } else { | 241 fGenID = kEmptyGenID; |
242 fFiniteBoundType = kNormal_BoundsType; | |
243 } | 242 } |
| 243 fFiniteBoundType = kNormal_BoundsType; |
244 break; | 244 break; |
245 case kPrev_Cur_FillCombo: | 245 case kPrev_Cur_FillCombo: |
246 // The most conservative result bound is that of the | 246 // The most conservative result bound is that of the |
247 // prior clip. This could be wildly incorrect if the | 247 // prior clip. This could be wildly incorrect if the |
248 // second clip either exactly matches the first clip | 248 // second clip either exactly matches the first clip |
249 // (which should yield the empty set) or reduces the | 249 // (which should yield the empty set) or reduces the |
250 // size of the prior bound (e.g., if the second clip | 250 // size of the prior bound (e.g., if the second clip |
251 // exactly matched the bottom half of the prior clip). | 251 // exactly matched the bottom half of the prior clip). |
252 // We ignore these two possibilities. | 252 // We ignore these two possibilities. |
253 fFiniteBound = prevFinite; | 253 fFiniteBound = prevFinite; |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 | 911 |
912 void SkClipStack::dump() const { | 912 void SkClipStack::dump() const { |
913 B2TIter iter(*this); | 913 B2TIter iter(*this); |
914 const Element* e; | 914 const Element* e; |
915 while ((e = iter.next())) { | 915 while ((e = iter.next())) { |
916 e->dump(); | 916 e->dump(); |
917 SkDebugf("\n"); | 917 SkDebugf("\n"); |
918 } | 918 } |
919 } | 919 } |
920 #endif | 920 #endif |
OLD | NEW |