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 |
11 #include "SkDeque.h" | 11 #include "SkDeque.h" |
12 #include "SkPath.h" | 12 #include "SkPath.h" |
13 #include "SkRect.h" | 13 #include "SkRect.h" |
14 #include "SkRRect.h" | 14 #include "SkRRect.h" |
15 #include "SkRegion.h" | 15 #include "SkRegion.h" |
16 #include "SkTDArray.h" | |
17 #include "SkTLazy.h" | 16 #include "SkTLazy.h" |
18 | 17 |
19 class SkCanvasClipVisitor; | 18 class SkCanvasClipVisitor; |
20 | 19 |
21 // Because a single save/restore state can have multiple clips, this class | 20 // Because a single save/restore state can have multiple clips, this class |
22 // stores the stack depth (fSaveCount) and clips (fDeque) separately. | 21 // stores the stack depth (fSaveCount) and clips (fDeque) separately. |
23 // Each clip in fDeque stores the stack state to which it belongs | 22 // Each clip in fDeque stores the stack state to which it belongs |
24 // (i.e., the fSaveCount in force when it was added). Restores are thus | 23 // (i.e., the fSaveCount in force when it was added). Restores are thus |
25 // implemented by removing clips from fDeque that have an fSaveCount larger | 24 // implemented by removing clips from fDeque that have an fSaveCount larger |
26 // then the freshly decremented count. | 25 // then the freshly decremented count. |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 */ | 468 */ |
470 void restoreTo(int saveCount); | 469 void restoreTo(int saveCount); |
471 | 470 |
472 /** | 471 /** |
473 * Return the next unique generation ID. | 472 * Return the next unique generation ID. |
474 */ | 473 */ |
475 static int32_t GetNextGenID(); | 474 static int32_t GetNextGenID(); |
476 }; | 475 }; |
477 | 476 |
478 #endif | 477 #endif |
OLD | NEW |