| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 M(DrawPatch) \ | 51 M(DrawPatch) \ |
| 52 M(DrawPicture) \ | 52 M(DrawPicture) \ |
| 53 M(DrawPoints) \ | 53 M(DrawPoints) \ |
| 54 M(DrawPosText) \ | 54 M(DrawPosText) \ |
| 55 M(DrawPosTextH) \ | 55 M(DrawPosTextH) \ |
| 56 M(DrawText) \ | 56 M(DrawText) \ |
| 57 M(DrawTextOnPath) \ | 57 M(DrawTextOnPath) \ |
| 58 M(DrawRRect) \ | 58 M(DrawRRect) \ |
| 59 M(DrawRect) \ | 59 M(DrawRect) \ |
| 60 M(DrawSprite) \ | 60 M(DrawSprite) \ |
| 61 M(DrawTextBlob) \ | 61 M(DrawTextBlob) \ |
| 62 M(DrawData) \ |
| 62 M(DrawVertices) | 63 M(DrawVertices) |
| 63 | 64 |
| 64 // Defines SkRecords::Type, an enum of all record types. | 65 // Defines SkRecords::Type, an enum of all record types. |
| 65 #define ENUM(T) T##_Type, | 66 #define ENUM(T) T##_Type, |
| 66 enum Type { SK_RECORD_TYPES(ENUM) }; | 67 enum Type { SK_RECORD_TYPES(ENUM) }; |
| 67 #undef ENUM | 68 #undef ENUM |
| 68 | 69 |
| 69 // Macros to make it easier to define a record for a draw call with 0 args, 1 ar
gs, 2 args, etc. | 70 // Macros to make it easier to define a record for a draw call with 0 args, 1 ar
gs, 2 args, etc. |
| 70 // These should be clearer when you look at their use below. | 71 // These should be clearer when you look at their use below. |
| 71 #define RECORD0(T) \ | 72 #define RECORD0(T) \ |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 RECORD4(DrawTextBlob, SkPaint, paint, | 264 RECORD4(DrawTextBlob, SkPaint, paint, |
| 264 RefBox<const SkTextBlob>, blob, | 265 RefBox<const SkTextBlob>, blob, |
| 265 SkScalar, x, | 266 SkScalar, x, |
| 266 SkScalar, y); | 267 SkScalar, y); |
| 267 RECORD5(DrawTextOnPath, SkPaint, paint, | 268 RECORD5(DrawTextOnPath, SkPaint, paint, |
| 268 PODArray<char>, text, | 269 PODArray<char>, text, |
| 269 size_t, byteLength, | 270 size_t, byteLength, |
| 270 SkPath, path, | 271 SkPath, path, |
| 271 Optional<SkMatrix>, matrix); | 272 Optional<SkMatrix>, matrix); |
| 272 | 273 |
| 274 RECORD2(DrawData, PODArray<char>, data, size_t, length); |
| 275 |
| 273 // This guy is so ugly we just write it manually. | 276 // This guy is so ugly we just write it manually. |
| 274 struct DrawVertices { | 277 struct DrawVertices { |
| 275 static const Type kType = DrawVertices_Type; | 278 static const Type kType = DrawVertices_Type; |
| 276 | 279 |
| 277 DrawVertices(const SkPaint& paint, | 280 DrawVertices(const SkPaint& paint, |
| 278 SkCanvas::VertexMode vmode, | 281 SkCanvas::VertexMode vmode, |
| 279 int vertexCount, | 282 int vertexCount, |
| 280 SkPoint* vertices, | 283 SkPoint* vertices, |
| 281 SkPoint* texs, | 284 SkPoint* texs, |
| 282 SkColor* colors, | 285 SkColor* colors, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 #undef RECORD0 | 328 #undef RECORD0 |
| 326 #undef RECORD1 | 329 #undef RECORD1 |
| 327 #undef RECORD2 | 330 #undef RECORD2 |
| 328 #undef RECORD3 | 331 #undef RECORD3 |
| 329 #undef RECORD4 | 332 #undef RECORD4 |
| 330 #undef RECORD5 | 333 #undef RECORD5 |
| 331 | 334 |
| 332 } // namespace SkRecords | 335 } // namespace SkRecords |
| 333 | 336 |
| 334 #endif//SkRecords_DEFINED | 337 #endif//SkRecords_DEFINED |
| OLD | NEW |