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 | 8 |
9 | 9 |
10 | 10 |
11 #ifndef SkGPipePriv_DEFINED | 11 #ifndef SkGPipePriv_DEFINED |
12 #define SkGPipePriv_DEFINED | 12 #define SkGPipePriv_DEFINED |
13 | 13 |
14 #include "SkTypes.h" | 14 #include "SkTypes.h" |
15 | 15 |
16 #define UNIMPLEMENTED | 16 #define UNIMPLEMENTED |
17 | 17 |
18 // these must be contiguous, 0...N-1 | 18 // these must be contiguous, 0...N-1 |
19 enum PaintFlats { | 19 enum PaintFlats { |
20 kColorFilter_PaintFlat, | 20 kColorFilter_PaintFlat, |
21 kDrawLooper_PaintFlat, | 21 kDrawLooper_PaintFlat, |
22 kMaskFilter_PaintFlat, | 22 kMaskFilter_PaintFlat, |
23 kPathEffect_PaintFlat, | 23 kPathEffect_PaintFlat, |
24 kRasterizer_PaintFlat, | 24 kRasterizer_PaintFlat, |
25 kShader_PaintFlat, | 25 kShader_PaintFlat, |
26 kImageFilter_PaintFlat, | 26 kImageFilter_PaintFlat, |
27 kXfermode_PaintFlat, | 27 kXfermode_PaintFlat, |
| 28 kAnnotation_PaintFlat, |
28 | 29 |
29 kLast_PaintFlat = kXfermode_PaintFlat | 30 kLast_PaintFlat = kAnnotation_PaintFlat |
30 }; | 31 }; |
31 #define kCount_PaintFlats (kLast_PaintFlat + 1) | 32 #define kCount_PaintFlats (kLast_PaintFlat + 1) |
32 | 33 |
33 enum DrawOps { | 34 enum DrawOps { |
34 kSkip_DrawOp, // skip an addition N bytes (N == data) | 35 kSkip_DrawOp, // skip an addition N bytes (N == data) |
35 | 36 |
36 // these match Canvas apis | 37 // these match Canvas apis |
37 kClipPath_DrawOp, | 38 kClipPath_DrawOp, |
38 kClipRegion_DrawOp, | 39 kClipRegion_DrawOp, |
39 kClipRect_DrawOp, | 40 kClipRect_DrawOp, |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); | 273 SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); |
273 SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); | 274 SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); |
274 SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); | 275 SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); |
275 | 276 |
276 return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | | 277 return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | |
277 (flags << PAINTOPS_DATA_BITS) | | 278 (flags << PAINTOPS_DATA_BITS) | |
278 data; | 279 data; |
279 } | 280 } |
280 | 281 |
281 #endif | 282 #endif |
OLD | NEW |