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 |
11 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
| 12 #include "SkCanvasDrawable.h" |
12 #include "SkPicture.h" | 13 #include "SkPicture.h" |
13 #include "SkTextBlob.h" | 14 #include "SkTextBlob.h" |
14 | 15 |
15 namespace SkRecords { | 16 namespace SkRecords { |
16 | 17 |
17 // A list of all the types of canvas calls we can record. | 18 // A list of all the types of canvas calls we can record. |
18 // Each of these is reified into a struct below. | 19 // Each of these is reified into a struct below. |
19 // | 20 // |
20 // (We're using the macro-of-macro trick here to do several different things wit
h the same list.) | 21 // (We're using the macro-of-macro trick here to do several different things wit
h the same list.) |
21 // | 22 // |
(...skipping 15 matching lines...) Expand all Loading... |
37 M(ClipRect) \ | 38 M(ClipRect) \ |
38 M(ClipRegion) \ | 39 M(ClipRegion) \ |
39 M(Clear) \ | 40 M(Clear) \ |
40 M(BeginCommentGroup) \ | 41 M(BeginCommentGroup) \ |
41 M(AddComment) \ | 42 M(AddComment) \ |
42 M(EndCommentGroup) \ | 43 M(EndCommentGroup) \ |
43 M(DrawBitmap) \ | 44 M(DrawBitmap) \ |
44 M(DrawBitmapMatrix) \ | 45 M(DrawBitmapMatrix) \ |
45 M(DrawBitmapNine) \ | 46 M(DrawBitmapNine) \ |
46 M(DrawBitmapRectToRect) \ | 47 M(DrawBitmapRectToRect) \ |
| 48 M(DrawDrawable) \ |
47 M(DrawImage) \ | 49 M(DrawImage) \ |
48 M(DrawImageRect) \ | 50 M(DrawImageRect) \ |
49 M(DrawDRRect) \ | 51 M(DrawDRRect) \ |
50 M(DrawOval) \ | 52 M(DrawOval) \ |
51 M(DrawPaint) \ | 53 M(DrawPaint) \ |
52 M(DrawPath) \ | 54 M(DrawPath) \ |
53 M(DrawPatch) \ | 55 M(DrawPatch) \ |
54 M(DrawPicture) \ | 56 M(DrawPicture) \ |
55 M(DrawPoints) \ | 57 M(DrawPoints) \ |
56 M(DrawPosText) \ | 58 M(DrawPosText) \ |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 RECORD4(DrawBitmapNine, Optional<SkPaint>, paint, | 231 RECORD4(DrawBitmapNine, Optional<SkPaint>, paint, |
230 ImmutableBitmap, bitmap, | 232 ImmutableBitmap, bitmap, |
231 SkIRect, center, | 233 SkIRect, center, |
232 SkRect, dst); | 234 SkRect, dst); |
233 RECORD5(DrawBitmapRectToRect, Optional<SkPaint>, paint, | 235 RECORD5(DrawBitmapRectToRect, Optional<SkPaint>, paint, |
234 ImmutableBitmap, bitmap, | 236 ImmutableBitmap, bitmap, |
235 Optional<SkRect>, src, | 237 Optional<SkRect>, src, |
236 SkRect, dst, | 238 SkRect, dst, |
237 SkCanvas::DrawBitmapRectFlags, flags); | 239 SkCanvas::DrawBitmapRectFlags, flags); |
238 RECORD3(DrawDRRect, SkPaint, paint, SkRRect, outer, SkRRect, inner); | 240 RECORD3(DrawDRRect, SkPaint, paint, SkRRect, outer, SkRRect, inner); |
| 241 RECORD2(DrawDrawable, SkRect, worstCaseBounds, int32_t, index); |
239 RECORD4(DrawImage, Optional<SkPaint>, paint, | 242 RECORD4(DrawImage, Optional<SkPaint>, paint, |
240 RefBox<const SkImage>, image, | 243 RefBox<const SkImage>, image, |
241 SkScalar, left, | 244 SkScalar, left, |
242 SkScalar, top); | 245 SkScalar, top); |
243 RECORD4(DrawImageRect, Optional<SkPaint>, paint, | 246 RECORD4(DrawImageRect, Optional<SkPaint>, paint, |
244 RefBox<const SkImage>, image, | 247 RefBox<const SkImage>, image, |
245 Optional<SkRect>, src, | 248 Optional<SkRect>, src, |
246 SkRect, dst); | 249 SkRect, dst); |
247 RECORD2(DrawOval, SkPaint, paint, SkRect, oval); | 250 RECORD2(DrawOval, SkPaint, paint, SkRect, oval); |
248 RECORD1(DrawPaint, SkPaint, paint); | 251 RECORD1(DrawPaint, SkPaint, paint); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 #undef RECORD0 | 326 #undef RECORD0 |
324 #undef RECORD1 | 327 #undef RECORD1 |
325 #undef RECORD2 | 328 #undef RECORD2 |
326 #undef RECORD3 | 329 #undef RECORD3 |
327 #undef RECORD4 | 330 #undef RECORD4 |
328 #undef RECORD5 | 331 #undef RECORD5 |
329 | 332 |
330 } // namespace SkRecords | 333 } // namespace SkRecords |
331 | 334 |
332 #endif//SkRecords_DEFINED | 335 #endif//SkRecords_DEFINED |
OLD | NEW |