OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef GrClipMaskCache_DEFINED | 8 #ifndef GrClipMaskCache_DEFINED |
9 #define GrClipMaskCache_DEFINED | 9 #define GrClipMaskCache_DEFINED |
10 | 10 |
11 #include "GrContext.h" | 11 #include "GrContext.h" |
12 #include "SkClipStack.h" | 12 #include "SkClipStack.h" |
13 #include "SkTypes.h" | 13 #include "SkTypes.h" |
14 | 14 |
15 class GrTexture; | 15 class GrTexture; |
16 | 16 |
17 /** | 17 /** |
18 * The stencil buffer stores the last clip path - providing a single entry | 18 * The stencil buffer stores the last clip path - providing a single entry |
19 * "cache". This class provides similar functionality for AA clip paths | 19 * "cache". This class provides similar functionality for AA clip paths |
20 */ | 20 */ |
21 class GrClipMaskCache : public SkNoncopyable { | 21 class GrClipMaskCache : SkNoncopyable { |
22 public: | 22 public: |
23 GrClipMaskCache(); | 23 GrClipMaskCache(); |
24 | 24 |
25 ~GrClipMaskCache() { | 25 ~GrClipMaskCache() { |
26 | 26 |
27 while (!fStack.empty()) { | 27 while (!fStack.empty()) { |
28 GrClipStackFrame* temp = (GrClipStackFrame*) fStack.back(); | 28 GrClipStackFrame* temp = (GrClipStackFrame*) fStack.back(); |
29 temp->~GrClipStackFrame(); | 29 temp->~GrClipStackFrame(); |
30 fStack.pop_back(); | 30 fStack.pop_back(); |
31 } | 31 } |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 SkIRect fLastBound; | 226 SkIRect fLastBound; |
227 }; | 227 }; |
228 | 228 |
229 GrContext* fContext; | 229 GrContext* fContext; |
230 SkDeque fStack; | 230 SkDeque fStack; |
231 | 231 |
232 typedef SkNoncopyable INHERITED; | 232 typedef SkNoncopyable INHERITED; |
233 }; | 233 }; |
234 | 234 |
235 #endif // GrClipMaskCache_DEFINED | 235 #endif // GrClipMaskCache_DEFINED |
OLD | NEW |