commit-bot@chromium.org | c4b21e6 | 2014-04-11 18:33:31 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 8 | #ifndef SkRecords_DEFINED |
| 9 | #define SkRecords_DEFINED |
| 10 | |
| 11 | #include "SkCanvas.h" |
reed | 2347b62 | 2014-08-07 12:19:50 -0700 | [diff] [blame] | 12 | #include "SkPicture.h" |
fmalita | 00d5c2c | 2014-08-21 08:53:26 -0700 | [diff] [blame] | 13 | #include "SkTextBlob.h" |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 14 | |
| 15 | namespace SkRecords { |
| 16 | |
| 17 | // A list of all the types of canvas calls we can record. |
| 18 | // Each of these is reified into a struct below. |
| 19 | // |
| 20 | // (We're using the macro-of-macro trick here to do several different things with the same list.) |
| 21 | // |
| 22 | // We leave this SK_RECORD_TYPES macro defined for use by code that wants to operate on SkRecords |
| 23 | // types polymorphically. (See SkRecord::Record::{visit,mutate} for an example.) |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 24 | // |
| 25 | // Order doesn't technically matter here, but the compiler can generally generate better code if |
| 26 | // you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0. |
commit-bot@chromium.org | 88c3e27 | 2014-04-22 16:57:20 +0000 | [diff] [blame] | 27 | #define SK_RECORD_TYPES(M) \ |
| 28 | M(NoOp) \ |
| 29 | M(Restore) \ |
| 30 | M(Save) \ |
| 31 | M(SaveLayer) \ |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 32 | M(PushCull) \ |
| 33 | M(PopCull) \ |
commit-bot@chromium.org | 88c3e27 | 2014-04-22 16:57:20 +0000 | [diff] [blame] | 34 | M(SetMatrix) \ |
| 35 | M(ClipPath) \ |
| 36 | M(ClipRRect) \ |
| 37 | M(ClipRect) \ |
| 38 | M(ClipRegion) \ |
| 39 | M(Clear) \ |
| 40 | M(DrawBitmap) \ |
| 41 | M(DrawBitmapMatrix) \ |
| 42 | M(DrawBitmapNine) \ |
| 43 | M(DrawBitmapRectToRect) \ |
| 44 | M(DrawDRRect) \ |
| 45 | M(DrawOval) \ |
| 46 | M(DrawPaint) \ |
| 47 | M(DrawPath) \ |
dandov | 963137b | 2014-08-07 07:49:53 -0700 | [diff] [blame] | 48 | M(DrawPatch) \ |
reed | 2347b62 | 2014-08-07 12:19:50 -0700 | [diff] [blame] | 49 | M(DrawPicture) \ |
commit-bot@chromium.org | 88c3e27 | 2014-04-22 16:57:20 +0000 | [diff] [blame] | 50 | M(DrawPoints) \ |
| 51 | M(DrawPosText) \ |
| 52 | M(DrawPosTextH) \ |
mtklein | c551d9f | 2014-08-20 08:09:46 -0700 | [diff] [blame] | 53 | M(DrawText) \ |
| 54 | M(DrawTextOnPath) \ |
commit-bot@chromium.org | 88c3e27 | 2014-04-22 16:57:20 +0000 | [diff] [blame] | 55 | M(DrawRRect) \ |
| 56 | M(DrawRect) \ |
| 57 | M(DrawSprite) \ |
fmalita | 00d5c2c | 2014-08-21 08:53:26 -0700 | [diff] [blame] | 58 | M(DrawTextBlob) \ |
mtklein | f4078ad | 2014-08-08 10:05:19 -0700 | [diff] [blame] | 59 | M(DrawVertices) |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 60 | |
| 61 | // Defines SkRecords::Type, an enum of all record types. |
| 62 | #define ENUM(T) T##_Type, |
| 63 | enum Type { SK_RECORD_TYPES(ENUM) }; |
| 64 | #undef ENUM |
| 65 | |
| 66 | // Macros to make it easier to define a record for a draw call with 0 args, 1 args, 2 args, etc. |
| 67 | // These should be clearer when you look at their use below. |
| 68 | #define RECORD0(T) \ |
| 69 | struct T { \ |
| 70 | static const Type kType = T##_Type; \ |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 71 | }; |
| 72 | |
| 73 | // We try to be flexible about the types the constructors take. Instead of requring the exact type |
| 74 | // A here, we take any type Z which implicitly casts to A. This allows the delay_copy() trick to |
| 75 | // work, allowing the caller to decide whether to pass by value or by const&. |
| 76 | |
| 77 | #define RECORD1(T, A, a) \ |
| 78 | struct T { \ |
| 79 | static const Type kType = T##_Type; \ |
| 80 | template <typename Z> \ |
| 81 | T(Z a) : a(a) {} \ |
| 82 | A a; \ |
| 83 | }; |
| 84 | |
| 85 | #define RECORD2(T, A, a, B, b) \ |
| 86 | struct T { \ |
| 87 | static const Type kType = T##_Type; \ |
| 88 | template <typename Z, typename Y> \ |
| 89 | T(Z a, Y b) : a(a), b(b) {} \ |
| 90 | A a; B b; \ |
| 91 | }; |
| 92 | |
| 93 | #define RECORD3(T, A, a, B, b, C, c) \ |
| 94 | struct T { \ |
| 95 | static const Type kType = T##_Type; \ |
| 96 | template <typename Z, typename Y, typename X> \ |
| 97 | T(Z a, Y b, X c) : a(a), b(b), c(c) {} \ |
| 98 | A a; B b; C c; \ |
| 99 | }; |
| 100 | |
| 101 | #define RECORD4(T, A, a, B, b, C, c, D, d) \ |
| 102 | struct T { \ |
| 103 | static const Type kType = T##_Type; \ |
| 104 | template <typename Z, typename Y, typename X, typename W> \ |
| 105 | T(Z a, Y b, X c, W d) : a(a), b(b), c(c), d(d) {} \ |
| 106 | A a; B b; C c; D d; \ |
| 107 | }; |
| 108 | |
| 109 | #define RECORD5(T, A, a, B, b, C, c, D, d, E, e) \ |
| 110 | struct T { \ |
| 111 | static const Type kType = T##_Type; \ |
| 112 | template <typename Z, typename Y, typename X, typename W, typename V> \ |
| 113 | T(Z a, Y b, X c, W d, V e) : a(a), b(b), c(c), d(d), e(e) {} \ |
| 114 | A a; B b; C c; D d; E e; \ |
| 115 | }; |
| 116 | |
commit-bot@chromium.org | 88c3e27 | 2014-04-22 16:57:20 +0000 | [diff] [blame] | 117 | #define ACT_AS_PTR(ptr) \ |
| 118 | operator T*() { return ptr; } \ |
| 119 | operator const T*() const { return ptr; } \ |
| 120 | T* operator->() { return ptr; } \ |
| 121 | const T* operator->() const { return ptr; } |
| 122 | |
mtklein | 53fecfb | 2014-08-21 09:11:37 -0700 | [diff] [blame^] | 123 | template <typename T> |
| 124 | class RefBox : SkNoncopyable { |
| 125 | public: |
| 126 | RefBox(T* obj) : fObj(SkRef(obj)) {} |
| 127 | ~RefBox() { fObj->unref(); } |
| 128 | |
| 129 | ACT_AS_PTR(fObj); |
| 130 | |
| 131 | private: |
| 132 | T* fObj; |
| 133 | }; |
| 134 | |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 135 | // An Optional doesn't own the pointer's memory, but may need to destroy non-POD data. |
| 136 | template <typename T> |
| 137 | class Optional : SkNoncopyable { |
| 138 | public: |
| 139 | Optional(T* ptr) : fPtr(ptr) {} |
| 140 | ~Optional() { if (fPtr) fPtr->~T(); } |
| 141 | |
commit-bot@chromium.org | 88c3e27 | 2014-04-22 16:57:20 +0000 | [diff] [blame] | 142 | ACT_AS_PTR(fPtr); |
| 143 | private: |
| 144 | T* fPtr; |
| 145 | }; |
| 146 | |
| 147 | // Like Optional, but ptr must not be NULL. |
| 148 | template <typename T> |
| 149 | class Adopted : SkNoncopyable { |
| 150 | public: |
| 151 | Adopted(T* ptr) : fPtr(ptr) { SkASSERT(fPtr); } |
commit-bot@chromium.org | f0ae5e4 | 2014-04-24 15:33:48 +0000 | [diff] [blame] | 152 | Adopted(Adopted* source) { |
| 153 | // Transfer ownership from source to this. |
| 154 | fPtr = source->fPtr; |
| 155 | source->fPtr = NULL; |
| 156 | } |
| 157 | ~Adopted() { if (fPtr) fPtr->~T(); } |
commit-bot@chromium.org | 88c3e27 | 2014-04-22 16:57:20 +0000 | [diff] [blame] | 158 | |
| 159 | ACT_AS_PTR(fPtr); |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 160 | private: |
| 161 | T* fPtr; |
| 162 | }; |
| 163 | |
| 164 | // PODArray doesn't own the pointer's memory, and we assume the data is POD. |
| 165 | template <typename T> |
commit-bot@chromium.org | f0ae5e4 | 2014-04-24 15:33:48 +0000 | [diff] [blame] | 166 | class PODArray { |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 167 | public: |
| 168 | PODArray(T* ptr) : fPtr(ptr) {} |
commit-bot@chromium.org | f0ae5e4 | 2014-04-24 15:33:48 +0000 | [diff] [blame] | 169 | // Default copy and assign. |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 170 | |
commit-bot@chromium.org | 88c3e27 | 2014-04-22 16:57:20 +0000 | [diff] [blame] | 171 | ACT_AS_PTR(fPtr); |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 172 | private: |
| 173 | T* fPtr; |
| 174 | }; |
| 175 | |
commit-bot@chromium.org | 16307bd | 2014-04-22 18:32:58 +0000 | [diff] [blame] | 176 | #undef ACT_AS_PTR |
| 177 | |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 178 | // Like SkBitmap, but deep copies pixels if they're not immutable. |
| 179 | // Using this, we guarantee the immutability of all bitmaps we record. |
| 180 | class ImmutableBitmap { |
| 181 | public: |
| 182 | explicit ImmutableBitmap(const SkBitmap& bitmap) { |
| 183 | if (bitmap.isImmutable()) { |
| 184 | fBitmap = bitmap; |
| 185 | } else { |
| 186 | bitmap.copyTo(&fBitmap); |
| 187 | } |
| 188 | fBitmap.setImmutable(); |
| 189 | } |
| 190 | |
| 191 | operator const SkBitmap& () const { return fBitmap; } |
| 192 | |
| 193 | private: |
| 194 | SkBitmap fBitmap; |
| 195 | }; |
| 196 | |
commit-bot@chromium.org | 88c3e27 | 2014-04-22 16:57:20 +0000 | [diff] [blame] | 197 | RECORD0(NoOp); |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 198 | |
mtklein | a723b57 | 2014-08-15 11:49:49 -0700 | [diff] [blame] | 199 | RECORD2(Restore, SkIRect, devBounds, SkMatrix, matrix); |
Florin Malita | 5f6102d | 2014-06-30 10:13:28 -0400 | [diff] [blame] | 200 | RECORD0(Save); |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 201 | RECORD3(SaveLayer, Optional<SkRect>, bounds, Optional<SkPaint>, paint, SkCanvas::SaveFlags, flags); |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 202 | |
commit-bot@chromium.org | 88c3e27 | 2014-04-22 16:57:20 +0000 | [diff] [blame] | 203 | RECORD1(PushCull, SkRect, rect); |
commit-bot@chromium.org | 03a99b8 | 2014-04-08 15:17:17 +0000 | [diff] [blame] | 204 | RECORD0(PopCull); |
| 205 | |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 206 | RECORD1(SetMatrix, SkMatrix, matrix); |
| 207 | |
mtklein | a723b57 | 2014-08-15 11:49:49 -0700 | [diff] [blame] | 208 | RECORD4(ClipPath, SkIRect, devBounds, SkPath, path, SkRegion::Op, op, bool, doAA); |
| 209 | RECORD4(ClipRRect, SkIRect, devBounds, SkRRect, rrect, SkRegion::Op, op, bool, doAA); |
| 210 | RECORD4(ClipRect, SkIRect, devBounds, SkRect, rect, SkRegion::Op, op, bool, doAA); |
| 211 | RECORD3(ClipRegion, SkIRect, devBounds, SkRegion, region, SkRegion::Op, op); |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 212 | |
| 213 | RECORD1(Clear, SkColor, color); |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 214 | // While not strictly required, if you have an SkPaint, it's fastest to put it first. |
| 215 | RECORD4(DrawBitmap, Optional<SkPaint>, paint, |
| 216 | ImmutableBitmap, bitmap, |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 217 | SkScalar, left, |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 218 | SkScalar, top); |
| 219 | RECORD3(DrawBitmapMatrix, Optional<SkPaint>, paint, ImmutableBitmap, bitmap, SkMatrix, matrix); |
| 220 | RECORD4(DrawBitmapNine, Optional<SkPaint>, paint, |
| 221 | ImmutableBitmap, bitmap, |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 222 | SkIRect, center, |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 223 | SkRect, dst); |
| 224 | RECORD5(DrawBitmapRectToRect, Optional<SkPaint>, paint, |
| 225 | ImmutableBitmap, bitmap, |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 226 | Optional<SkRect>, src, |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 227 | SkRect, dst, |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 228 | SkCanvas::DrawBitmapRectFlags, flags); |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 229 | RECORD3(DrawDRRect, SkPaint, paint, SkRRect, outer, SkRRect, inner); |
| 230 | RECORD2(DrawOval, SkPaint, paint, SkRect, oval); |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 231 | RECORD1(DrawPaint, SkPaint, paint); |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 232 | RECORD2(DrawPath, SkPaint, paint, SkPath, path); |
dandov | b3c9d1c | 2014-08-12 08:34:29 -0700 | [diff] [blame] | 233 | //RECORD2(DrawPatch, SkPaint, paint, SkPatch, patch); |
mtklein | 53fecfb | 2014-08-21 09:11:37 -0700 | [diff] [blame^] | 234 | RECORD3(DrawPicture, Optional<SkPaint>, paint, |
| 235 | RefBox<const SkPicture>, picture, |
| 236 | Optional<SkMatrix>, matrix); |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 237 | RECORD4(DrawPoints, SkPaint, paint, SkCanvas::PointMode, mode, size_t, count, SkPoint*, pts); |
| 238 | RECORD4(DrawPosText, SkPaint, paint, |
| 239 | PODArray<char>, text, |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 240 | size_t, byteLength, |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 241 | PODArray<SkPoint>, pos); |
| 242 | RECORD5(DrawPosTextH, SkPaint, paint, |
| 243 | PODArray<char>, text, |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 244 | size_t, byteLength, |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 245 | PODArray<SkScalar>, xpos, |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 246 | SkScalar, y); |
| 247 | RECORD2(DrawRRect, SkPaint, paint, SkRRect, rrect); |
| 248 | RECORD2(DrawRect, SkPaint, paint, SkRect, rect); |
| 249 | RECORD4(DrawSprite, Optional<SkPaint>, paint, ImmutableBitmap, bitmap, int, left, int, top); |
| 250 | RECORD5(DrawText, SkPaint, paint, |
| 251 | PODArray<char>, text, |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 252 | size_t, byteLength, |
| 253 | SkScalar, x, |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 254 | SkScalar, y); |
fmalita | 00d5c2c | 2014-08-21 08:53:26 -0700 | [diff] [blame] | 255 | RECORD4(DrawTextBlob, SkPaint, paint, |
mtklein | 53fecfb | 2014-08-21 09:11:37 -0700 | [diff] [blame^] | 256 | RefBox<const SkTextBlob>, blob, |
fmalita | 00d5c2c | 2014-08-21 08:53:26 -0700 | [diff] [blame] | 257 | SkScalar, x, |
| 258 | SkScalar, y); |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 259 | RECORD5(DrawTextOnPath, SkPaint, paint, |
| 260 | PODArray<char>, text, |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 261 | size_t, byteLength, |
| 262 | SkPath, path, |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 263 | Optional<SkMatrix>, matrix); |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 264 | |
| 265 | // This guy is so ugly we just write it manually. |
| 266 | struct DrawVertices { |
| 267 | static const Type kType = DrawVertices_Type; |
| 268 | |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 269 | DrawVertices(const SkPaint& paint, |
| 270 | SkCanvas::VertexMode vmode, |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 271 | int vertexCount, |
| 272 | SkPoint* vertices, |
| 273 | SkPoint* texs, |
| 274 | SkColor* colors, |
| 275 | SkXfermode* xmode, |
| 276 | uint16_t* indices, |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 277 | int indexCount) |
| 278 | : paint(paint) |
| 279 | , vmode(vmode) |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 280 | , vertexCount(vertexCount) |
| 281 | , vertices(vertices) |
| 282 | , texs(texs) |
| 283 | , colors(colors) |
| 284 | , xmode(SkSafeRef(xmode)) |
| 285 | , indices(indices) |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 286 | , indexCount(indexCount) {} |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 287 | |
commit-bot@chromium.org | 37f6e62 | 2014-05-07 22:59:38 +0000 | [diff] [blame] | 288 | SkPaint paint; |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 289 | SkCanvas::VertexMode vmode; |
| 290 | int vertexCount; |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 291 | PODArray<SkPoint> vertices; |
| 292 | PODArray<SkPoint> texs; |
| 293 | PODArray<SkColor> colors; |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 294 | SkAutoTUnref<SkXfermode> xmode; |
commit-bot@chromium.org | 653d518 | 2014-04-15 14:27:14 +0000 | [diff] [blame] | 295 | PODArray<uint16_t> indices; |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 296 | int indexCount; |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 297 | }; |
mtklein | 6cfa73a | 2014-08-13 13:33:49 -0700 | [diff] [blame] | 298 | |
dandov | b3c9d1c | 2014-08-12 08:34:29 -0700 | [diff] [blame] | 299 | struct DrawPatch { |
| 300 | static const Type kType = DrawPatch_Type; |
mtklein | 6cfa73a | 2014-08-13 13:33:49 -0700 | [diff] [blame] | 301 | |
dandov | b3c9d1c | 2014-08-12 08:34:29 -0700 | [diff] [blame] | 302 | DrawPatch(const SkPaint& paint, SkPoint cubics[12], SkColor colors[4], |
| 303 | SkPoint texCoords[4], SkXfermode* xmode) |
| 304 | : paint(paint) |
| 305 | , cubics(cubics) |
| 306 | , colors(colors) |
| 307 | , texCoords(texCoords) |
| 308 | , xmode(SkSafeRef(xmode)) { } |
mtklein | 6cfa73a | 2014-08-13 13:33:49 -0700 | [diff] [blame] | 309 | |
dandov | b3c9d1c | 2014-08-12 08:34:29 -0700 | [diff] [blame] | 310 | SkPaint paint; |
| 311 | PODArray<SkPoint> cubics; |
| 312 | PODArray<SkColor> colors; |
| 313 | PODArray<SkPoint> texCoords; |
| 314 | SkAutoTUnref<SkXfermode> xmode; |
| 315 | }; |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 316 | |
commit-bot@chromium.org | e3ff558 | 2014-04-01 16:24:06 +0000 | [diff] [blame] | 317 | #undef RECORD0 |
| 318 | #undef RECORD1 |
| 319 | #undef RECORD2 |
| 320 | #undef RECORD3 |
| 321 | #undef RECORD4 |
| 322 | #undef RECORD5 |
| 323 | |
| 324 | } // namespace SkRecords |
| 325 | |
| 326 | #endif//SkRecords_DEFINED |