| 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 "GrNoncopyable.h" | |
| 13 #include "SkClipStack.h" | 12 #include "SkClipStack.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 GrNoncopyable { | 21 class GrClipMaskCache : public 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 // texture coords for the geometry drawn with this mask. | 226 // texture coords for the geometry drawn with this mask. |
| 227 GrAutoScratchTexture fLastMask; | 227 GrAutoScratchTexture fLastMask; |
| 228 // fLastBound stores the bounding box of the clip mask in clip-stack spa
ce. This rect is | 228 // fLastBound stores the bounding box of the clip mask in clip-stack spa
ce. This rect is |
| 229 // used by GrClipMaskManager to position a rect and compute texture coor
ds for the mask. | 229 // used by GrClipMaskManager to position a rect and compute texture coor
ds for the mask. |
| 230 SkIRect fLastBound; | 230 SkIRect fLastBound; |
| 231 }; | 231 }; |
| 232 | 232 |
| 233 GrContext* fContext; | 233 GrContext* fContext; |
| 234 SkDeque fStack; | 234 SkDeque fStack; |
| 235 | 235 |
| 236 typedef GrNoncopyable INHERITED; | 236 typedef SkNoncopyable INHERITED; |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 #endif // GrClipMaskCache_DEFINED | 239 #endif // GrClipMaskCache_DEFINED |
| OLD | NEW |