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

Side by Side Diff: include/private/SkRecords.h

Issue 2127233002: Added the framework for having canvas/recorder/picture record depth_set's. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: updated tests to be more rigorous about translateZ in playback Created 4 years, 5 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 | « include/core/SkCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | 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 29 matching lines...) Expand all
40 // types polymorphically. (See SkRecord::Record::{visit,mutate} for an example. ) 40 // types polymorphically. (See SkRecord::Record::{visit,mutate} for an example. )
41 // 41 //
42 // Order doesn't technically matter here, but the compiler can generally generat e better code if 42 // Order doesn't technically matter here, but the compiler can generally generat e better code if
43 // you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0. 43 // you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0.
44 #define SK_RECORD_TYPES(M) \ 44 #define SK_RECORD_TYPES(M) \
45 M(NoOp) \ 45 M(NoOp) \
46 M(Restore) \ 46 M(Restore) \
47 M(Save) \ 47 M(Save) \
48 M(SaveLayer) \ 48 M(SaveLayer) \
49 M(SetMatrix) \ 49 M(SetMatrix) \
50 M(TranslateZ) \
50 M(Concat) \ 51 M(Concat) \
51 M(ClipPath) \ 52 M(ClipPath) \
52 M(ClipRRect) \ 53 M(ClipRRect) \
53 M(ClipRect) \ 54 M(ClipRect) \
54 M(ClipRegion) \ 55 M(ClipRegion) \
55 M(DrawBitmap) \ 56 M(DrawBitmap) \
56 M(DrawBitmapNine) \ 57 M(DrawBitmapNine) \
57 M(DrawBitmapRect) \ 58 M(DrawBitmapRect) \
58 M(DrawBitmapRectFast) \ 59 M(DrawBitmapRectFast) \
59 M(DrawBitmapRectFixedSize) \ 60 M(DrawBitmapRectFixedSize) \
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 Optional<SkRect> bounds; 211 Optional<SkRect> bounds;
211 Optional<SkPaint> paint; 212 Optional<SkPaint> paint;
212 RefBox<const SkImageFilter> backdrop; 213 RefBox<const SkImageFilter> backdrop;
213 SkCanvas::SaveLayerFlags saveLayerFlags); 214 SkCanvas::SaveLayerFlags saveLayerFlags);
214 215
215 RECORD(SetMatrix, 0, 216 RECORD(SetMatrix, 0,
216 TypedMatrix matrix); 217 TypedMatrix matrix);
217 RECORD(Concat, 0, 218 RECORD(Concat, 0,
218 TypedMatrix matrix); 219 TypedMatrix matrix);
219 220
221 RECORD(TranslateZ, 0, SkScalar z);
222
220 struct RegionOpAndAA { 223 struct RegionOpAndAA {
221 RegionOpAndAA() {} 224 RegionOpAndAA() {}
222 RegionOpAndAA(SkRegion::Op op, bool aa) : op(op), aa(aa) {} 225 RegionOpAndAA(SkRegion::Op op, bool aa) : op(op), aa(aa) {}
223 SkRegion::Op op : 31; // This really only needs to be 3, but there's no win today to do so. 226 SkRegion::Op op : 31; // This really only needs to be 3, but there's no win today to do so.
224 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call t his an unsigned. 227 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call t his an unsigned.
225 }; 228 };
226 static_assert(sizeof(RegionOpAndAA) == 4, "RegionOpAndAASize"); 229 static_assert(sizeof(RegionOpAndAA) == 4, "RegionOpAndAASize");
227 230
228 RECORD(ClipPath, 0, 231 RECORD(ClipPath, 0,
229 SkIRect devBounds; 232 SkIRect devBounds;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 int indexCount); 374 int indexCount);
372 RECORD(DrawAnnotation, 0, 375 RECORD(DrawAnnotation, 0,
373 SkRect rect; 376 SkRect rect;
374 SkString key; 377 SkString key;
375 RefBox<SkData> value); 378 RefBox<SkData> value);
376 #undef RECORD 379 #undef RECORD
377 380
378 } // namespace SkRecords 381 } // namespace SkRecords
379 382
380 #endif//SkRecords_DEFINED 383 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698