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 GrClipMaskManager_DEFINED | 8 #ifndef GrClipMaskManager_DEFINED |
9 #define GrClipMaskManager_DEFINED | 9 #define GrClipMaskManager_DEFINED |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 class SkPath; | 29 class SkPath; |
30 | 30 |
31 /** | 31 /** |
32 * The clip mask creator handles the generation of the clip mask. If anti | 32 * The clip mask creator handles the generation of the clip mask. If anti |
33 * aliasing is requested it will (in the future) generate a single channel | 33 * aliasing is requested it will (in the future) generate a single channel |
34 * (8bit) mask. If no anti aliasing is requested it will generate a 1-bit | 34 * (8bit) mask. If no anti aliasing is requested it will generate a 1-bit |
35 * mask in the stencil buffer. In the non anti-aliasing case, if the clip | 35 * mask in the stencil buffer. In the non anti-aliasing case, if the clip |
36 * mask can be represented as a rectangle then scissoring is used. In all | 36 * mask can be represented as a rectangle then scissoring is used. In all |
37 * cases scissoring is used to bound the range of the clip mask. | 37 * cases scissoring is used to bound the range of the clip mask. |
38 */ | 38 */ |
39 class GrClipMaskManager : public SkNoncopyable { | 39 class GrClipMaskManager : SkNoncopyable { |
40 public: | 40 public: |
41 GrClipMaskManager() | 41 GrClipMaskManager() |
42 : fGpu(NULL) | 42 : fGpu(NULL) |
43 , fCurrClipMaskType(kNone_ClipMaskType) { | 43 , fCurrClipMaskType(kNone_ClipMaskType) { |
44 } | 44 } |
45 | 45 |
46 /** | 46 /** |
47 * Creates a clip mask if necessary as a stencil buffer or alpha texture | 47 * Creates a clip mask if necessary as a stencil buffer or alpha texture |
48 * and sets the GrGpu's scissor and stencil state. If the return is false | 48 * and sets the GrGpu's scissor and stencil state. If the return is false |
49 * then the draw can be skipped. The AutoRestoreEffects is initialized by | 49 * then the draw can be skipped. The AutoRestoreEffects is initialized by |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 * clipping. | 173 * clipping. |
174 */ | 174 */ |
175 void adjustStencilParams(GrStencilSettings* settings, | 175 void adjustStencilParams(GrStencilSettings* settings, |
176 StencilClipMode mode, | 176 StencilClipMode mode, |
177 int stencilBitCnt); | 177 int stencilBitCnt); |
178 | 178 |
179 typedef SkNoncopyable INHERITED; | 179 typedef SkNoncopyable INHERITED; |
180 }; | 180 }; |
181 | 181 |
182 #endif // GrClipMaskManager_DEFINED | 182 #endif // GrClipMaskManager_DEFINED |
OLD | NEW |