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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 M(DrawDrawable) \ | 61 M(DrawDrawable) \ |
62 M(DrawImage) \ | 62 M(DrawImage) \ |
63 M(DrawImageRect) \ | 63 M(DrawImageRect) \ |
64 M(DrawImageNine) \ | 64 M(DrawImageNine) \ |
65 M(DrawDRRect) \ | 65 M(DrawDRRect) \ |
66 M(DrawOval) \ | 66 M(DrawOval) \ |
67 M(DrawPaint) \ | 67 M(DrawPaint) \ |
68 M(DrawPath) \ | 68 M(DrawPath) \ |
69 M(DrawPatch) \ | 69 M(DrawPatch) \ |
70 M(DrawPicture) \ | 70 M(DrawPicture) \ |
| 71 M(DrawShadowedPicture) \ |
71 M(DrawPoints) \ | 72 M(DrawPoints) \ |
72 M(DrawPosText) \ | 73 M(DrawPosText) \ |
73 M(DrawPosTextH) \ | 74 M(DrawPosTextH) \ |
74 M(DrawText) \ | 75 M(DrawText) \ |
75 M(DrawTextOnPath) \ | 76 M(DrawTextOnPath) \ |
76 M(DrawTextRSXform) \ | 77 M(DrawTextRSXform) \ |
77 M(DrawRRect) \ | 78 M(DrawRRect) \ |
78 M(DrawRect) \ | 79 M(DrawRect) \ |
79 M(DrawTextBlob) \ | 80 M(DrawTextBlob) \ |
80 M(DrawAtlas) \ | 81 M(DrawAtlas) \ |
81 M(DrawVertices) \ | 82 M(DrawVertices) \ |
82 M(DrawAnnotation) | 83 M(DrawAnnotation) |
83 | 84 |
| 85 // setZ is Victor |
| 86 |
84 // Defines SkRecords::Type, an enum of all record types. | 87 // Defines SkRecords::Type, an enum of all record types. |
85 #define ENUM(T) T##_Type, | 88 #define ENUM(T) T##_Type, |
86 enum Type { SK_RECORD_TYPES(ENUM) }; | 89 enum Type { SK_RECORD_TYPES(ENUM) }; |
87 #undef ENUM | 90 #undef ENUM |
88 | 91 |
89 #define ACT_AS_PTR(ptr) \ | 92 #define ACT_AS_PTR(ptr) \ |
90 operator T*() const { return ptr; } \ | 93 operator T*() const { return ptr; } \ |
91 T* operator->() const { return ptr; } | 94 T* operator->() const { return ptr; } |
92 | 95 |
93 template <typename T> | 96 template <typename T> |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 SkIRect devBounds; | 248 SkIRect devBounds; |
246 SkRegion region; | 249 SkRegion region; |
247 SkRegion::Op op); | 250 SkRegion::Op op); |
248 | 251 |
249 // While not strictly required, if you have an SkPaint, it's fastest to put it f
irst. | 252 // While not strictly required, if you have an SkPaint, it's fastest to put it f
irst. |
250 RECORD(DrawBitmap, kDraw_Tag|kHasImage_Tag, | 253 RECORD(DrawBitmap, kDraw_Tag|kHasImage_Tag, |
251 Optional<SkPaint> paint; | 254 Optional<SkPaint> paint; |
252 ImmutableBitmap bitmap; | 255 ImmutableBitmap bitmap; |
253 SkScalar left; | 256 SkScalar left; |
254 SkScalar top); | 257 SkScalar top); |
| 258 //uint8_t zLevel); |
255 RECORD(DrawBitmapNine, kDraw_Tag|kHasImage_Tag, | 259 RECORD(DrawBitmapNine, kDraw_Tag|kHasImage_Tag, |
256 Optional<SkPaint> paint; | 260 Optional<SkPaint> paint; |
257 ImmutableBitmap bitmap; | 261 ImmutableBitmap bitmap; |
258 SkIRect center; | 262 SkIRect center; |
259 SkRect dst); | 263 SkRect dst); |
260 RECORD(DrawBitmapRect, kDraw_Tag|kHasImage_Tag, | 264 RECORD(DrawBitmapRect, kDraw_Tag|kHasImage_Tag, |
261 Optional<SkPaint> paint; | 265 Optional<SkPaint> paint; |
262 ImmutableBitmap bitmap; | 266 ImmutableBitmap bitmap; |
263 Optional<SkRect> src; | 267 Optional<SkRect> src; |
264 SkRect dst); | 268 SkRect dst); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 SkRect oval); | 306 SkRect oval); |
303 RECORD(DrawPaint, kDraw_Tag, | 307 RECORD(DrawPaint, kDraw_Tag, |
304 SkPaint paint); | 308 SkPaint paint); |
305 RECORD(DrawPath, kDraw_Tag, | 309 RECORD(DrawPath, kDraw_Tag, |
306 SkPaint paint; | 310 SkPaint paint; |
307 PreCachedPath path); | 311 PreCachedPath path); |
308 RECORD(DrawPicture, kDraw_Tag, | 312 RECORD(DrawPicture, kDraw_Tag, |
309 Optional<SkPaint> paint; | 313 Optional<SkPaint> paint; |
310 RefBox<const SkPicture> picture; | 314 RefBox<const SkPicture> picture; |
311 TypedMatrix matrix); | 315 TypedMatrix matrix); |
| 316 RECORD(DrawShadowedPicture, kDraw_Tag, |
| 317 Optional<SkPaint> paint; |
| 318 RefBox<const SkPicture> picture; |
| 319 sk_sp<SkLights> lights); |
312 RECORD(DrawPoints, kDraw_Tag, | 320 RECORD(DrawPoints, kDraw_Tag, |
313 SkPaint paint; | 321 SkPaint paint; |
314 SkCanvas::PointMode mode; | 322 SkCanvas::PointMode mode; |
315 unsigned count; | 323 unsigned count; |
316 SkPoint* pts); | 324 SkPoint* pts); |
317 RECORD(DrawPosText, kDraw_Tag|kHasText_Tag, | 325 RECORD(DrawPosText, kDraw_Tag|kHasText_Tag, |
318 SkPaint paint; | 326 SkPaint paint; |
319 PODArray<char> text; | 327 PODArray<char> text; |
320 size_t byteLength; | 328 size_t byteLength; |
321 PODArray<SkPoint> pos); | 329 PODArray<SkPoint> pos); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 int indexCount); | 389 int indexCount); |
382 RECORD(DrawAnnotation, 0, | 390 RECORD(DrawAnnotation, 0, |
383 SkRect rect; | 391 SkRect rect; |
384 SkString key; | 392 SkString key; |
385 RefBox<SkData> value); | 393 RefBox<SkData> value); |
386 #undef RECORD | 394 #undef RECORD |
387 | 395 |
388 } // namespace SkRecords | 396 } // namespace SkRecords |
389 | 397 |
390 #endif//SkRecords_DEFINED | 398 #endif//SkRecords_DEFINED |
OLD | NEW |