Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: src/core/SkRecords.h

Issue 468193003: Start tracking the CTM while filling the BBH in SkRecordDraw. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkRecorder.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 operator const SkBitmap& () const { return fBitmap; } 192 operator const SkBitmap& () const { return fBitmap; }
193 193
194 private: 194 private:
195 SkBitmap fBitmap; 195 SkBitmap fBitmap;
196 }; 196 };
197 197
198 RECORD0(NoOp); 198 RECORD0(NoOp);
199 199
200 RECORD0(Restore); 200 RECORD1(Restore, SkMatrix, matrix);
201 RECORD0(Save); 201 RECORD0(Save);
202 RECORD3(SaveLayer, Optional<SkRect>, bounds, Optional<SkPaint>, paint, SkCanvas: :SaveFlags, flags); 202 RECORD3(SaveLayer, Optional<SkRect>, bounds, Optional<SkPaint>, paint, SkCanvas: :SaveFlags, flags);
203 203
204 RECORD1(PushCull, SkRect, rect); 204 RECORD1(PushCull, SkRect, rect);
205 RECORD0(PopCull); 205 RECORD0(PopCull);
206 206
207 RECORD1(Concat, SkMatrix, matrix); 207 RECORD1(Concat, SkMatrix, matrix);
208 RECORD1(SetMatrix, SkMatrix, matrix); 208 RECORD1(SetMatrix, SkMatrix, matrix);
209 209
210 RECORD3(ClipPath, SkPath, path, SkRegion::Op, op, bool, doAA); 210 RECORD3(ClipPath, SkPath, path, SkRegion::Op, op, bool, doAA);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 SkPaint paint; 284 SkPaint paint;
285 SkCanvas::VertexMode vmode; 285 SkCanvas::VertexMode vmode;
286 int vertexCount; 286 int vertexCount;
287 PODArray<SkPoint> vertices; 287 PODArray<SkPoint> vertices;
288 PODArray<SkPoint> texs; 288 PODArray<SkPoint> texs;
289 PODArray<SkColor> colors; 289 PODArray<SkColor> colors;
290 SkAutoTUnref<SkXfermode> xmode; 290 SkAutoTUnref<SkXfermode> xmode;
291 PODArray<uint16_t> indices; 291 PODArray<uint16_t> indices;
292 int indexCount; 292 int indexCount;
293 }; 293 };
294 294
295 struct DrawPatch { 295 struct DrawPatch {
296 static const Type kType = DrawPatch_Type; 296 static const Type kType = DrawPatch_Type;
297 297
298 DrawPatch(const SkPaint& paint, SkPoint cubics[12], SkColor colors[4], 298 DrawPatch(const SkPaint& paint, SkPoint cubics[12], SkColor colors[4],
299 SkPoint texCoords[4], SkXfermode* xmode) 299 SkPoint texCoords[4], SkXfermode* xmode)
300 : paint(paint) 300 : paint(paint)
301 , cubics(cubics) 301 , cubics(cubics)
302 , colors(colors) 302 , colors(colors)
303 , texCoords(texCoords) 303 , texCoords(texCoords)
304 , xmode(SkSafeRef(xmode)) { } 304 , xmode(SkSafeRef(xmode)) { }
305 305
306 SkPaint paint; 306 SkPaint paint;
307 PODArray<SkPoint> cubics; 307 PODArray<SkPoint> cubics;
308 PODArray<SkColor> colors; 308 PODArray<SkColor> colors;
309 PODArray<SkPoint> texCoords; 309 PODArray<SkPoint> texCoords;
310 SkAutoTUnref<SkXfermode> xmode; 310 SkAutoTUnref<SkXfermode> xmode;
311 }; 311 };
312 312
313 #undef RECORD0 313 #undef RECORD0
314 #undef RECORD1 314 #undef RECORD1
315 #undef RECORD2 315 #undef RECORD2
316 #undef RECORD3 316 #undef RECORD3
317 #undef RECORD4 317 #undef RECORD4
318 #undef RECORD5 318 #undef RECORD5
319 319
320 } // namespace SkRecords 320 } // namespace SkRecords
321 321
322 #endif//SkRecords_DEFINED 322 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkRecorder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698