OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 SkRecords_DEFINED | 8 #ifndef SkRecords_DEFINED |
9 #define SkRecords_DEFINED | 9 #define SkRecords_DEFINED |
10 | 10 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 RECORD(SetMatrix, 0, | 183 RECORD(SetMatrix, 0, |
184 TypedMatrix matrix); | 184 TypedMatrix matrix); |
185 RECORD(Concat, 0, | 185 RECORD(Concat, 0, |
186 TypedMatrix matrix); | 186 TypedMatrix matrix); |
187 | 187 |
188 RECORD(Translate, 0, | 188 RECORD(Translate, 0, |
189 SkScalar dx; | 189 SkScalar dx; |
190 SkScalar dy); | 190 SkScalar dy); |
191 RECORD(TranslateZ, 0, SkScalar z); | 191 RECORD(TranslateZ, 0, SkScalar z); |
192 | 192 |
193 struct RegionOpAndAA { | 193 struct ClipOpAndAA { |
194 RegionOpAndAA() {} | 194 ClipOpAndAA() {} |
195 RegionOpAndAA(SkRegion::Op op, bool aa) : op(op), aa(aa) {} | 195 ClipOpAndAA(SkCanvas::ClipOp op, bool aa) : op(op), aa(aa) {} |
196 SkRegion::Op op : 31; // This really only needs to be 3, but there's no win
today to do so. | 196 SkCanvas::ClipOp op : 31; // This really only needs to be 3, but there's no
win today to do so. |
197 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call t
his an unsigned. | 197 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we ca
ll this an unsigned. |
198 }; | 198 }; |
199 static_assert(sizeof(RegionOpAndAA) == 4, "RegionOpAndAASize"); | 199 static_assert(sizeof(ClipOpAndAA) == 4, "ClipOpAndAASize"); |
200 | 200 |
201 RECORD(ClipPath, 0, | 201 RECORD(ClipPath, 0, |
202 SkIRect devBounds; | 202 SkIRect devBounds; |
203 PreCachedPath path; | 203 PreCachedPath path; |
204 RegionOpAndAA opAA); | 204 ClipOpAndAA opAA); |
205 RECORD(ClipRRect, 0, | 205 RECORD(ClipRRect, 0, |
206 SkIRect devBounds; | 206 SkIRect devBounds; |
207 SkRRect rrect; | 207 SkRRect rrect; |
208 RegionOpAndAA opAA); | 208 ClipOpAndAA opAA); |
209 RECORD(ClipRect, 0, | 209 RECORD(ClipRect, 0, |
210 SkIRect devBounds; | 210 SkIRect devBounds; |
211 SkRect rect; | 211 SkRect rect; |
212 RegionOpAndAA opAA); | 212 ClipOpAndAA opAA); |
213 RECORD(ClipRegion, 0, | 213 RECORD(ClipRegion, 0, |
214 SkIRect devBounds; | 214 SkIRect devBounds; |
215 SkRegion region; | 215 SkRegion region; |
216 SkRegion::Op op); | 216 SkCanvas::ClipOp op); |
217 | 217 |
218 // While not strictly required, if you have an SkPaint, it's fastest to put it f
irst. | 218 // While not strictly required, if you have an SkPaint, it's fastest to put it f
irst. |
219 RECORD(DrawArc, kDraw_Tag|kHasPaint_Tag, | 219 RECORD(DrawArc, kDraw_Tag|kHasPaint_Tag, |
220 SkPaint paint; | 220 SkPaint paint; |
221 SkRect oval; | 221 SkRect oval; |
222 SkScalar startAngle; | 222 SkScalar startAngle; |
223 SkScalar sweepAngle; | 223 SkScalar sweepAngle; |
224 unsigned useCenter); | 224 unsigned useCenter); |
225 RECORD(DrawDRRect, kDraw_Tag|kHasPaint_Tag, | 225 RECORD(DrawDRRect, kDraw_Tag|kHasPaint_Tag, |
226 SkPaint paint; | 226 SkPaint paint; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 int indexCount); | 348 int indexCount); |
349 RECORD(DrawAnnotation, 0, // TODO: kDraw_Tag, skia:5548 | 349 RECORD(DrawAnnotation, 0, // TODO: kDraw_Tag, skia:5548 |
350 SkRect rect; | 350 SkRect rect; |
351 SkString key; | 351 SkString key; |
352 sk_sp<SkData> value); | 352 sk_sp<SkData> value); |
353 #undef RECORD | 353 #undef RECORD |
354 | 354 |
355 } // namespace SkRecords | 355 } // namespace SkRecords |
356 | 356 |
357 #endif//SkRecords_DEFINED | 357 #endif//SkRecords_DEFINED |
OLD | NEW |