OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #ifndef SkPictureFlat_DEFINED | 7 #ifndef SkPictureFlat_DEFINED |
8 #define SkPictureFlat_DEFINED | 8 #define SkPictureFlat_DEFINED |
9 | 9 |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 DRAW_ATLAS, | 72 DRAW_ATLAS, |
73 DRAW_IMAGE_NINE, | 73 DRAW_IMAGE_NINE, |
74 DRAW_IMAGE_RECT, | 74 DRAW_IMAGE_RECT, |
75 | 75 |
76 SAVE_LAYER_SAVELAYERFLAGS_DEPRECATED_JAN_2016, | 76 SAVE_LAYER_SAVELAYERFLAGS_DEPRECATED_JAN_2016, |
77 SAVE_LAYER_SAVELAYERREC, | 77 SAVE_LAYER_SAVELAYERREC, |
78 | 78 |
79 DRAW_ANNOTATION, | 79 DRAW_ANNOTATION, |
80 DRAW_DRAWABLE, | 80 DRAW_DRAWABLE, |
81 DRAW_DRAWABLE_MATRIX, | 81 DRAW_DRAWABLE_MATRIX, |
| 82 DRAW_TEXT_RSXFORM, |
82 | 83 |
83 LAST_DRAWTYPE_ENUM = DRAW_DRAWABLE_MATRIX, | 84 LAST_DRAWTYPE_ENUM = DRAW_DRAWABLE_MATRIX, |
84 }; | 85 }; |
85 | 86 |
86 // In the 'match' method, this constant will match any flavor of DRAW_BITMAP* | 87 // In the 'match' method, this constant will match any flavor of DRAW_BITMAP* |
87 static const int kDRAW_BITMAP_FLAVOR = LAST_DRAWTYPE_ENUM+1; | 88 static const int kDRAW_BITMAP_FLAVOR = LAST_DRAWTYPE_ENUM+1; |
88 | 89 |
89 enum DrawVertexFlags { | 90 enum DrawVertexFlags { |
90 DRAW_VERTICES_HAS_TEXS = 0x01, | 91 DRAW_VERTICES_HAS_TEXS = 0x01, |
91 DRAW_VERTICES_HAS_COLORS = 0x02, | 92 DRAW_VERTICES_HAS_COLORS = 0x02, |
92 DRAW_VERTICES_HAS_INDICES = 0x04, | 93 DRAW_VERTICES_HAS_INDICES = 0x04, |
93 DRAW_VERTICES_HAS_XFER = 0x08, | 94 DRAW_VERTICES_HAS_XFER = 0x08, |
94 }; | 95 }; |
95 | 96 |
96 enum DrawAtlasFlags { | 97 enum DrawAtlasFlags { |
97 DRAW_ATLAS_HAS_COLORS = 1 << 0, | 98 DRAW_ATLAS_HAS_COLORS = 1 << 0, |
98 DRAW_ATLAS_HAS_CULL = 1 << 1, | 99 DRAW_ATLAS_HAS_CULL = 1 << 1, |
99 }; | 100 }; |
100 | 101 |
| 102 enum DrawTextRSXformFlags { |
| 103 DRAW_TEXT_RSXFORM_HAS_CULL = 1 << 0, |
| 104 }; |
| 105 |
101 enum SaveLayerRecFlatFlags { | 106 enum SaveLayerRecFlatFlags { |
102 SAVELAYERREC_HAS_BOUNDS = 1 << 0, | 107 SAVELAYERREC_HAS_BOUNDS = 1 << 0, |
103 SAVELAYERREC_HAS_PAINT = 1 << 1, | 108 SAVELAYERREC_HAS_PAINT = 1 << 1, |
104 SAVELAYERREC_HAS_BACKDROP = 1 << 2, | 109 SAVELAYERREC_HAS_BACKDROP = 1 << 2, |
105 SAVELAYERREC_HAS_FLAGS = 1 << 3, | 110 SAVELAYERREC_HAS_FLAGS = 1 << 3, |
106 }; | 111 }; |
107 | 112 |
108 /////////////////////////////////////////////////////////////////////////////// | 113 /////////////////////////////////////////////////////////////////////////////// |
109 // clipparams are packed in 5 bits | 114 // clipparams are packed in 5 bits |
110 // doAA:1 | regionOp:4 | 115 // doAA:1 | regionOp:4 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 void setupBuffer(SkReadBuffer& buffer) const { | 161 void setupBuffer(SkReadBuffer& buffer) const { |
157 buffer.setFactoryPlayback(fArray, fCount); | 162 buffer.setFactoryPlayback(fArray, fCount); |
158 } | 163 } |
159 | 164 |
160 private: | 165 private: |
161 int fCount; | 166 int fCount; |
162 SkFlattenable::Factory* fArray; | 167 SkFlattenable::Factory* fArray; |
163 }; | 168 }; |
164 | 169 |
165 #endif | 170 #endif |
OLD | NEW |