blob: 4c9833cfc02135910498fe68ee654abb9bafd3f6 [file] [log] [blame]
commit-bot@chromium.orgc4b21e62014-04-11 18:33:31 +00001/*
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.orge3ff5582014-04-01 16:24:06 +00008#ifndef SkRecords_DEFINED
9#define SkRecords_DEFINED
10
11#include "SkCanvas.h"
reed3cb38402015-02-06 08:36:15 -080012#include "SkDrawable.h"
reed026beb52015-06-10 14:23:15 -070013#include "SkPathPriv.h"
reed2347b622014-08-07 12:19:50 -070014#include "SkPicture.h"
reed71c3c762015-06-24 10:29:17 -070015#include "SkRSXform.h"
fmalita00d5c2c2014-08-21 08:53:26 -070016#include "SkTextBlob.h"
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +000017
18namespace SkRecords {
19
20// A list of all the types of canvas calls we can record.
21// Each of these is reified into a struct below.
22//
23// (We're using the macro-of-macro trick here to do several different things with the same list.)
24//
25// We leave this SK_RECORD_TYPES macro defined for use by code that wants to operate on SkRecords
26// types polymorphically. (See SkRecord::Record::{visit,mutate} for an example.)
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +000027//
28// Order doesn't technically matter here, but the compiler can generally generate better code if
29// you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0.
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +000030#define SK_RECORD_TYPES(M) \
31 M(NoOp) \
32 M(Restore) \
33 M(Save) \
34 M(SaveLayer) \
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +000035 M(SetMatrix) \
36 M(ClipPath) \
37 M(ClipRRect) \
38 M(ClipRect) \
39 M(ClipRegion) \
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +000040 M(DrawBitmap) \
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +000041 M(DrawBitmapNine) \
42 M(DrawBitmapRectToRect) \
mtklein42ddcd42014-11-21 08:48:35 -080043 M(DrawBitmapRectToRectBleed) \
reed6be2aa92014-11-18 11:08:05 -080044 M(DrawDrawable) \
piotaixr65151752014-10-16 11:58:39 -070045 M(DrawImage) \
46 M(DrawImageRect) \
reed4c21dc52015-06-25 12:32:03 -070047 M(DrawImageNine) \
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +000048 M(DrawDRRect) \
49 M(DrawOval) \
50 M(DrawPaint) \
51 M(DrawPath) \
dandov963137b2014-08-07 07:49:53 -070052 M(DrawPatch) \
reed2347b622014-08-07 12:19:50 -070053 M(DrawPicture) \
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +000054 M(DrawPoints) \
55 M(DrawPosText) \
56 M(DrawPosTextH) \
mtkleinc551d9f2014-08-20 08:09:46 -070057 M(DrawText) \
58 M(DrawTextOnPath) \
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +000059 M(DrawRRect) \
60 M(DrawRect) \
61 M(DrawSprite) \
mtklein29dfaa82014-09-04 14:12:44 -070062 M(DrawTextBlob) \
reed71c3c762015-06-24 10:29:17 -070063 M(DrawAtlas) \
mtkleinf4078ad2014-08-08 10:05:19 -070064 M(DrawVertices)
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +000065
66// Defines SkRecords::Type, an enum of all record types.
67#define ENUM(T) T##_Type,
68enum Type { SK_RECORD_TYPES(ENUM) };
69#undef ENUM
70
71// Macros to make it easier to define a record for a draw call with 0 args, 1 args, 2 args, etc.
72// These should be clearer when you look at their use below.
73#define RECORD0(T) \
74struct T { \
75 static const Type kType = T##_Type; \
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +000076};
77
mtkleinc845fa02015-06-30 09:49:49 -070078// Instead of requring the exact type A here, we take any type Z which implicitly casts to A.
79// This lets our wrappers like ImmutableBitmap work seamlessly.
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +000080
81#define RECORD1(T, A, a) \
82struct T { \
83 static const Type kType = T##_Type; \
mtklein9db912c2015-05-19 11:11:26 -070084 T() {} \
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +000085 template <typename Z> \
mtkleinc845fa02015-06-30 09:49:49 -070086 T(const Z& a) : a(a) {} \
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +000087 A a; \
88};
89
mtkleinc845fa02015-06-30 09:49:49 -070090#define RECORD2(T, A, a, B, b) \
91struct T { \
92 static const Type kType = T##_Type; \
93 T() {} \
94 template <typename Z, typename Y> \
95 T(const Z& a, const Y& b) : a(a), b(b) {} \
96 A a; B b; \
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +000097};
98
mtkleinc845fa02015-06-30 09:49:49 -070099#define RECORD3(T, A, a, B, b, C, c) \
100struct T { \
101 static const Type kType = T##_Type; \
102 T() {} \
103 template <typename Z, typename Y, typename X> \
104 T(const Z& a, const Y& b, const X& c) : a(a), b(b), c(c) {} \
105 A a; B b; C c; \
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000106};
107
mtkleinc845fa02015-06-30 09:49:49 -0700108#define RECORD4(T, A, a, B, b, C, c, D, d) \
109struct T { \
110 static const Type kType = T##_Type; \
111 T() {} \
112 template <typename Z, typename Y, typename X, typename W> \
113 T(const Z& a, const Y& b, const X& c, const W& d) : a(a), b(b), c(c), d(d) {} \
114 A a; B b; C c; D d; \
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000115};
116
117#define RECORD5(T, A, a, B, b, C, c, D, d, E, e) \
118struct T { \
119 static const Type kType = T##_Type; \
mtklein9db912c2015-05-19 11:11:26 -0700120 T() {} \
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000121 template <typename Z, typename Y, typename X, typename W, typename V> \
mtkleinc845fa02015-06-30 09:49:49 -0700122 T(const Z& a, const Y& b, const X& c, const W& d, const V& e) \
123 : a(a), b(b), c(c), d(d), e(e) {} \
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000124 A a; B b; C c; D d; E e; \
125};
126
mtkleinc845fa02015-06-30 09:49:49 -0700127#define RECORD8(T, A, a, B, b, C, c, D, d, E, e, F, f, G, g, H, h) \
128struct T { \
129 static const Type kType = T##_Type; \
130 T() {} \
131 template <typename Z, typename Y, typename X, typename W, \
132 typename V, typename U, typename S, typename R> \
133 T(const Z& a, const Y& b, const X& c, const W& d, \
134 const V& e, const U& f, const S& g, const R& h) \
135 : a(a), b(b), c(c), d(d), e(e), f(f), g(g), h(h) {} \
136 A a; B b; C c; D d; E e; F f; G g; H h; \
reed71c3c762015-06-24 10:29:17 -0700137};
mtkleinc845fa02015-06-30 09:49:49 -0700138
mtklein9b222a52014-09-18 11:16:31 -0700139#define ACT_AS_PTR(ptr) \
140 operator T*() const { return ptr; } \
141 T* operator->() const { return ptr; }
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +0000142
mtklein53fecfb2014-08-21 09:11:37 -0700143template <typename T>
144class RefBox : SkNoncopyable {
145public:
mtklein9db912c2015-05-19 11:11:26 -0700146 RefBox() {}
mtklein9b222a52014-09-18 11:16:31 -0700147 RefBox(T* obj) : fObj(SkSafeRef(obj)) {}
148 ~RefBox() { SkSafeUnref(fObj); }
mtklein53fecfb2014-08-21 09:11:37 -0700149
150 ACT_AS_PTR(fObj);
151
152private:
153 T* fObj;
154};
155
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000156// An Optional doesn't own the pointer's memory, but may need to destroy non-POD data.
157template <typename T>
158class Optional : SkNoncopyable {
159public:
mtklein9db912c2015-05-19 11:11:26 -0700160 Optional() : fPtr(nullptr) {}
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000161 Optional(T* ptr) : fPtr(ptr) {}
162 ~Optional() { if (fPtr) fPtr->~T(); }
163
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +0000164 ACT_AS_PTR(fPtr);
165private:
166 T* fPtr;
167};
168
169// Like Optional, but ptr must not be NULL.
170template <typename T>
171class Adopted : SkNoncopyable {
172public:
173 Adopted(T* ptr) : fPtr(ptr) { SkASSERT(fPtr); }
commit-bot@chromium.orgf0ae5e42014-04-24 15:33:48 +0000174 Adopted(Adopted* source) {
175 // Transfer ownership from source to this.
176 fPtr = source->fPtr;
177 source->fPtr = NULL;
178 }
179 ~Adopted() { if (fPtr) fPtr->~T(); }
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +0000180
181 ACT_AS_PTR(fPtr);
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000182private:
183 T* fPtr;
184};
185
186// PODArray doesn't own the pointer's memory, and we assume the data is POD.
187template <typename T>
commit-bot@chromium.orgf0ae5e42014-04-24 15:33:48 +0000188class PODArray {
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000189public:
mtklein9db912c2015-05-19 11:11:26 -0700190 PODArray() {}
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000191 PODArray(T* ptr) : fPtr(ptr) {}
commit-bot@chromium.orgf0ae5e42014-04-24 15:33:48 +0000192 // Default copy and assign.
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000193
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +0000194 ACT_AS_PTR(fPtr);
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000195private:
196 T* fPtr;
197};
198
commit-bot@chromium.org16307bd2014-04-22 18:32:58 +0000199#undef ACT_AS_PTR
200
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000201// Like SkBitmap, but deep copies pixels if they're not immutable.
202// Using this, we guarantee the immutability of all bitmaps we record.
mtkleinf55c3142014-12-11 12:43:04 -0800203class ImmutableBitmap : SkNoncopyable {
204public:
mtklein9db912c2015-05-19 11:11:26 -0700205 ImmutableBitmap() {}
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000206 explicit ImmutableBitmap(const SkBitmap& bitmap) {
207 if (bitmap.isImmutable()) {
mtkleinf55c3142014-12-11 12:43:04 -0800208 fBitmap = bitmap;
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000209 } else {
mtkleinf55c3142014-12-11 12:43:04 -0800210 bitmap.copyTo(&fBitmap);
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000211 }
mtkleinf55c3142014-12-11 12:43:04 -0800212 fBitmap.setImmutable();
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000213 }
mtkleinf55c3142014-12-11 12:43:04 -0800214
215 int width() const { return fBitmap.width(); }
216 int height() const { return fBitmap.height(); }
217
218 // While the pixels are immutable, SkBitmap itself is not thread-safe, so return a copy.
219 SkBitmap shallowCopy() const { return fBitmap; }
220private:
221 SkBitmap fBitmap;
mtkleinaf579032014-12-01 11:03:37 -0800222};
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000223
mtkleinaf579032014-12-01 11:03:37 -0800224// SkPath::getBounds() isn't thread safe unless we precache the bounds in a singlethreaded context.
mtklein14ed0fd2015-01-20 13:47:19 -0800225// SkPath::cheapComputeDirection() is similar.
226// Recording is a convenient time to cache these, or we can delay it to between record and playback.
227struct PreCachedPath : public SkPath {
mtklein9db912c2015-05-19 11:11:26 -0700228 PreCachedPath() {}
mtklein14ed0fd2015-01-20 13:47:19 -0800229 explicit PreCachedPath(const SkPath& path) : SkPath(path) {
mtkleinaf579032014-12-01 11:03:37 -0800230 this->updateBoundsCache();
mtklein256cc892015-06-15 12:27:20 -0700231#if 0 // Disabled to see if we ever really race on this. It costs time, chromium:496982.
reed026beb52015-06-10 14:23:15 -0700232 SkPathPriv::FirstDirection junk;
233 (void)SkPathPriv::CheapComputeFirstDirection(*this, &junk);
mtklein256cc892015-06-15 12:27:20 -0700234#endif
mtkleinaf579032014-12-01 11:03:37 -0800235 }
236};
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000237
mtkleinaf579032014-12-01 11:03:37 -0800238// Like SkPath::getBounds(), SkMatrix::getType() isn't thread safe unless we precache it.
239// This may not cover all SkMatrices used by the picture (e.g. some could be hiding in a shader).
240struct TypedMatrix : public SkMatrix {
mtklein9db912c2015-05-19 11:11:26 -0700241 TypedMatrix() {}
mtkleinaf579032014-12-01 11:03:37 -0800242 explicit TypedMatrix(const SkMatrix& matrix) : SkMatrix(matrix) {
243 (void)this->getType();
244 }
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000245};
246
commit-bot@chromium.org88c3e272014-04-22 16:57:20 +0000247RECORD0(NoOp);
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000248
mtkleinaf579032014-12-01 11:03:37 -0800249RECORD2(Restore, SkIRect, devBounds, TypedMatrix, matrix);
Florin Malita5f6102d2014-06-30 10:13:28 -0400250RECORD0(Save);
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000251RECORD3(SaveLayer, Optional<SkRect>, bounds, Optional<SkPaint>, paint, SkCanvas::SaveFlags, flags);
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000252
mtkleinaf579032014-12-01 11:03:37 -0800253RECORD1(SetMatrix, TypedMatrix, matrix);
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000254
mtkleincdeeb092014-11-20 09:14:28 -0800255struct RegionOpAndAA {
mtklein9db912c2015-05-19 11:11:26 -0700256 RegionOpAndAA() {}
mtkleincdeeb092014-11-20 09:14:28 -0800257 RegionOpAndAA(SkRegion::Op op, bool aa) : op(op), aa(aa) {}
258 SkRegion::Op op : 31; // This really only needs to be 3, but there's no win today to do so.
259 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call this an unsigned.
260};
261SK_COMPILE_ASSERT(sizeof(RegionOpAndAA) == 4, RegionOpAndAASize);
262
mtklein14ed0fd2015-01-20 13:47:19 -0800263RECORD3(ClipPath, SkIRect, devBounds, PreCachedPath, path, RegionOpAndAA, opAA);
264RECORD3(ClipRRect, SkIRect, devBounds, SkRRect, rrect, RegionOpAndAA, opAA);
265RECORD3(ClipRect, SkIRect, devBounds, SkRect, rect, RegionOpAndAA, opAA);
266RECORD3(ClipRegion, SkIRect, devBounds, SkRegion, region, SkRegion::Op, op);
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000267
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000268// While not strictly required, if you have an SkPaint, it's fastest to put it first.
269RECORD4(DrawBitmap, Optional<SkPaint>, paint,
270 ImmutableBitmap, bitmap,
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000271 SkScalar, left,
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000272 SkScalar, top);
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000273RECORD4(DrawBitmapNine, Optional<SkPaint>, paint,
274 ImmutableBitmap, bitmap,
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000275 SkIRect, center,
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000276 SkRect, dst);
mtklein42ddcd42014-11-21 08:48:35 -0800277RECORD4(DrawBitmapRectToRect, Optional<SkPaint>, paint,
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000278 ImmutableBitmap, bitmap,
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000279 Optional<SkRect>, src,
mtklein42ddcd42014-11-21 08:48:35 -0800280 SkRect, dst);
281RECORD4(DrawBitmapRectToRectBleed, Optional<SkPaint>, paint,
282 ImmutableBitmap, bitmap,
283 Optional<SkRect>, src,
284 SkRect, dst);
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000285RECORD3(DrawDRRect, SkPaint, paint, SkRRect, outer, SkRRect, inner);
reed6be2aa92014-11-18 11:08:05 -0800286RECORD2(DrawDrawable, SkRect, worstCaseBounds, int32_t, index);
piotaixr65151752014-10-16 11:58:39 -0700287RECORD4(DrawImage, Optional<SkPaint>, paint,
288 RefBox<const SkImage>, image,
289 SkScalar, left,
290 SkScalar, top);
291RECORD4(DrawImageRect, Optional<SkPaint>, paint,
292 RefBox<const SkImage>, image,
293 Optional<SkRect>, src,
294 SkRect, dst);
reed4c21dc52015-06-25 12:32:03 -0700295RECORD4(DrawImageNine, Optional<SkPaint>, paint,
296 RefBox<const SkImage>, image,
297 SkIRect, center,
298 SkRect, dst);
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000299RECORD2(DrawOval, SkPaint, paint, SkRect, oval);
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000300RECORD1(DrawPaint, SkPaint, paint);
mtklein14ed0fd2015-01-20 13:47:19 -0800301RECORD2(DrawPath, SkPaint, paint, PreCachedPath, path);
mtklein53fecfb2014-08-21 09:11:37 -0700302RECORD3(DrawPicture, Optional<SkPaint>, paint,
303 RefBox<const SkPicture>, picture,
mtkleinaf579032014-12-01 11:03:37 -0800304 TypedMatrix, matrix);
mtklein42ddcd42014-11-21 08:48:35 -0800305RECORD4(DrawPoints, SkPaint, paint, SkCanvas::PointMode, mode, unsigned, count, SkPoint*, pts);
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000306RECORD4(DrawPosText, SkPaint, paint,
307 PODArray<char>, text,
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000308 size_t, byteLength,
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000309 PODArray<SkPoint>, pos);
310RECORD5(DrawPosTextH, SkPaint, paint,
311 PODArray<char>, text,
mtklein42ddcd42014-11-21 08:48:35 -0800312 unsigned, byteLength,
313 SkScalar, y,
314 PODArray<SkScalar>, xpos);
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000315RECORD2(DrawRRect, SkPaint, paint, SkRRect, rrect);
316RECORD2(DrawRect, SkPaint, paint, SkRect, rect);
317RECORD4(DrawSprite, Optional<SkPaint>, paint, ImmutableBitmap, bitmap, int, left, int, top);
318RECORD5(DrawText, SkPaint, paint,
319 PODArray<char>, text,
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000320 size_t, byteLength,
321 SkScalar, x,
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000322 SkScalar, y);
fmalita00d5c2c2014-08-21 08:53:26 -0700323RECORD4(DrawTextBlob, SkPaint, paint,
mtklein53fecfb2014-08-21 09:11:37 -0700324 RefBox<const SkTextBlob>, blob,
fmalita00d5c2c2014-08-21 08:53:26 -0700325 SkScalar, x,
326 SkScalar, y);
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000327RECORD5(DrawTextOnPath, SkPaint, paint,
328 PODArray<char>, text,
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000329 size_t, byteLength,
mtklein14ed0fd2015-01-20 13:47:19 -0800330 PreCachedPath, path,
mtkleinaf579032014-12-01 11:03:37 -0800331 TypedMatrix, matrix);
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000332
mtklein9b222a52014-09-18 11:16:31 -0700333RECORD5(DrawPatch, SkPaint, paint,
334 PODArray<SkPoint>, cubics,
335 PODArray<SkColor>, colors,
336 PODArray<SkPoint>, texCoords,
337 RefBox<SkXfermode>, xmode);
338
reed71c3c762015-06-24 10:29:17 -0700339RECORD8(DrawAtlas, Optional<SkPaint>, paint,
340 RefBox<const SkImage>, atlas,
341 PODArray<SkRSXform>, xforms,
342 PODArray<SkRect>, texs,
343 PODArray<SkColor>, colors,
344 int, count,
345 SkXfermode::Mode, mode,
346 Optional<SkRect>, cull);
347
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000348// This guy is so ugly we just write it manually.
349struct DrawVertices {
350 static const Type kType = DrawVertices_Type;
351
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000352 DrawVertices(const SkPaint& paint,
353 SkCanvas::VertexMode vmode,
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000354 int vertexCount,
355 SkPoint* vertices,
356 SkPoint* texs,
357 SkColor* colors,
358 SkXfermode* xmode,
359 uint16_t* indices,
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000360 int indexCount)
361 : paint(paint)
362 , vmode(vmode)
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000363 , vertexCount(vertexCount)
364 , vertices(vertices)
365 , texs(texs)
366 , colors(colors)
367 , xmode(SkSafeRef(xmode))
368 , indices(indices)
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000369 , indexCount(indexCount) {}
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000370
commit-bot@chromium.org37f6e622014-05-07 22:59:38 +0000371 SkPaint paint;
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000372 SkCanvas::VertexMode vmode;
373 int vertexCount;
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000374 PODArray<SkPoint> vertices;
375 PODArray<SkPoint> texs;
376 PODArray<SkColor> colors;
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000377 SkAutoTUnref<SkXfermode> xmode;
commit-bot@chromium.org653d5182014-04-15 14:27:14 +0000378 PODArray<uint16_t> indices;
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000379 int indexCount;
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000380};
mtklein6cfa73a2014-08-13 13:33:49 -0700381
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000382#undef RECORD0
383#undef RECORD1
384#undef RECORD2
385#undef RECORD3
386#undef RECORD4
387#undef RECORD5
reed71c3c762015-06-24 10:29:17 -0700388#undef RECORD8
commit-bot@chromium.orge3ff5582014-04-01 16:24:06 +0000389
390} // namespace SkRecords
391
392#endif//SkRecords_DEFINED