OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #ifndef SkClipStack_DEFINED | 8 #ifndef SkClipStack_DEFINED |
9 #define SkClipStack_DEFINED | 9 #define SkClipStack_DEFINED |
10 | 10 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 fType = kRect_Type; | 222 fType = kRect_Type; |
223 } else { | 223 } else { |
224 fRRect = rrect; | 224 fRRect = rrect; |
225 fType = kRRect_Type; | 225 fType = kRRect_Type; |
226 } | 226 } |
227 this->initCommon(saveCount, op, doAA); | 227 this->initCommon(saveCount, op, doAA); |
228 } | 228 } |
229 | 229 |
230 void initPath(int saveCount, const SkPath& path, SkRegion::Op op, bool d
oAA); | 230 void initPath(int saveCount, const SkPath& path, SkRegion::Op op, bool d
oAA); |
231 | 231 |
232 void setEmpty() { | 232 void setEmpty(); |
233 fType = kEmpty_Type; | |
234 fFiniteBound.setEmpty(); | |
235 fFiniteBoundType = kNormal_BoundsType; | |
236 fIsIntersectionOfRects = false; | |
237 fRect.setEmpty(); | |
238 fRRect.setEmpty(); | |
239 fPath.reset(); | |
240 fGenID = kEmptyGenID; | |
241 SkDEBUGCODE(this->checkEmpty();) | |
242 } | |
243 | 233 |
244 // All Element methods below are only used within SkClipStack.cpp | 234 // All Element methods below are only used within SkClipStack.cpp |
245 inline void checkEmpty() const; | 235 inline void checkEmpty() const; |
246 inline bool canBeIntersectedInPlace(int saveCount, SkRegion::Op op) cons
t; | 236 inline bool canBeIntersectedInPlace(int saveCount, SkRegion::Op op) cons
t; |
247 /* This method checks to see if two rect clips can be safely merged into
one. The issue here | 237 /* This method checks to see if two rect clips can be safely merged into
one. The issue here |
248 is that to be strictly correct all the edges of the resulting rect mus
t have the same | 238 is that to be strictly correct all the edges of the resulting rect mus
t have the same |
249 anti-aliasing. */ | 239 anti-aliasing. */ |
250 bool rectRectIntersectAllowed(const SkRect& newR, bool newAA) const; | 240 bool rectRectIntersectAllowed(const SkRect& newR, bool newAA) const; |
251 /** Determines possible finite bounds for the Element given the previous
element of the | 241 /** Determines possible finite bounds for the Element given the previous
element of the |
252 stack */ | 242 stack */ |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 */ | 438 */ |
449 void restoreTo(int saveCount); | 439 void restoreTo(int saveCount); |
450 | 440 |
451 /** | 441 /** |
452 * Return the next unique generation ID. | 442 * Return the next unique generation ID. |
453 */ | 443 */ |
454 static int32_t GetNextGenID(); | 444 static int32_t GetNextGenID(); |
455 }; | 445 }; |
456 | 446 |
457 #endif | 447 #endif |
OLD | NEW |