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 SkPictureFlat_DEFINED | 8 #ifndef SkPictureFlat_DEFINED |
9 #define SkPictureFlat_DEFINED | 9 #define SkPictureFlat_DEFINED |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 LAST_DRAWTYPE_ENUM = END_COMMENT_GROUP | 71 LAST_DRAWTYPE_ENUM = END_COMMENT_GROUP |
72 }; | 72 }; |
73 | 73 |
74 // In the 'match' method, this constant will match any flavor of DRAW_BITMAP* | 74 // In the 'match' method, this constant will match any flavor of DRAW_BITMAP* |
75 static const int kDRAW_BITMAP_FLAVOR = LAST_DRAWTYPE_ENUM+1; | 75 static const int kDRAW_BITMAP_FLAVOR = LAST_DRAWTYPE_ENUM+1; |
76 | 76 |
77 enum DrawVertexFlags { | 77 enum DrawVertexFlags { |
78 DRAW_VERTICES_HAS_TEXS = 0x01, | 78 DRAW_VERTICES_HAS_TEXS = 0x01, |
79 DRAW_VERTICES_HAS_COLORS = 0x02, | 79 DRAW_VERTICES_HAS_COLORS = 0x02, |
80 DRAW_VERTICES_HAS_INDICES = 0x04 | 80 DRAW_VERTICES_HAS_INDICES = 0x04, |
| 81 DRAW_VERTICES_HAS_XFER = 0x08, |
81 }; | 82 }; |
82 | 83 |
83 /////////////////////////////////////////////////////////////////////////////// | 84 /////////////////////////////////////////////////////////////////////////////// |
84 // clipparams are packed in 5 bits | 85 // clipparams are packed in 5 bits |
85 // doAA:1 | regionOp:4 | 86 // doAA:1 | regionOp:4 |
86 | 87 |
87 static inline uint32_t ClipParams_pack(SkRegion::Op op, bool doAA) { | 88 static inline uint32_t ClipParams_pack(SkRegion::Op op, bool doAA) { |
88 unsigned doAABit = doAA ? 1 : 0; | 89 unsigned doAABit = doAA ? 1 : 0; |
89 return (doAABit << 4) | op; | 90 return (doAABit << 4) | op; |
90 } | 91 } |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 static void flattenRegion(SkOrderedWriteBuffer& buffer, const void* obj) { | 674 static void flattenRegion(SkOrderedWriteBuffer& buffer, const void* obj) { |
674 buffer.getWriter32()->writeRegion(*(SkRegion*)obj); | 675 buffer.getWriter32()->writeRegion(*(SkRegion*)obj); |
675 } | 676 } |
676 | 677 |
677 static void unflattenRegion(SkOrderedReadBuffer& buffer, void* obj) { | 678 static void unflattenRegion(SkOrderedReadBuffer& buffer, void* obj) { |
678 buffer.getReader32()->readRegion((SkRegion*)obj); | 679 buffer.getReader32()->readRegion((SkRegion*)obj); |
679 } | 680 } |
680 }; | 681 }; |
681 | 682 |
682 #endif | 683 #endif |
OLD | NEW |