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

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

Issue 1462983002: Record concat as Concat. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix test Created 5 years, 1 month 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 | « no previous file | src/core/SkRecordDraw.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 18 matching lines...) Expand all
29 // types polymorphically. (See SkRecord::Record::{visit,mutate} for an example. ) 29 // types polymorphically. (See SkRecord::Record::{visit,mutate} for an example. )
30 // 30 //
31 // Order doesn't technically matter here, but the compiler can generally generat e better code if 31 // Order doesn't technically matter here, but the compiler can generally generat e better code if
32 // you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0. 32 // you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0.
33 #define SK_RECORD_TYPES(M) \ 33 #define SK_RECORD_TYPES(M) \
34 M(NoOp) \ 34 M(NoOp) \
35 M(Restore) \ 35 M(Restore) \
36 M(Save) \ 36 M(Save) \
37 M(SaveLayer) \ 37 M(SaveLayer) \
38 M(SetMatrix) \ 38 M(SetMatrix) \
39 M(Concat) \
39 M(ClipPath) \ 40 M(ClipPath) \
40 M(ClipRRect) \ 41 M(ClipRRect) \
41 M(ClipRect) \ 42 M(ClipRect) \
42 M(ClipRegion) \ 43 M(ClipRegion) \
43 M(DrawBitmap) \ 44 M(DrawBitmap) \
44 M(DrawBitmapNine) \ 45 M(DrawBitmapNine) \
45 M(DrawBitmapRect) \ 46 M(DrawBitmapRect) \
46 M(DrawBitmapRectFast) \ 47 M(DrawBitmapRectFast) \
47 M(DrawBitmapRectFixedSize) \ 48 M(DrawBitmapRectFixedSize) \
48 M(DrawDrawable) \ 49 M(DrawDrawable) \
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 TypedMatrix matrix); 195 TypedMatrix matrix);
195 RECORD(Save, 0); 196 RECORD(Save, 0);
196 197
197 RECORD(SaveLayer, 0, 198 RECORD(SaveLayer, 0,
198 Optional<SkRect> bounds; 199 Optional<SkRect> bounds;
199 Optional<SkPaint> paint; 200 Optional<SkPaint> paint;
200 SkCanvas::SaveFlags flags); 201 SkCanvas::SaveFlags flags);
201 202
202 RECORD(SetMatrix, 0, 203 RECORD(SetMatrix, 0,
203 TypedMatrix matrix); 204 TypedMatrix matrix);
205 RECORD(Concat, 0,
206 TypedMatrix matrix);
204 207
205 struct RegionOpAndAA { 208 struct RegionOpAndAA {
206 RegionOpAndAA() {} 209 RegionOpAndAA() {}
207 RegionOpAndAA(SkRegion::Op op, bool aa) : op(op), aa(aa) {} 210 RegionOpAndAA(SkRegion::Op op, bool aa) : op(op), aa(aa) {}
208 SkRegion::Op op : 31; // This really only needs to be 3, but there's no win today to do so. 211 SkRegion::Op op : 31; // This really only needs to be 3, but there's no win today to do so.
209 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call t his an unsigned. 212 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call t his an unsigned.
210 }; 213 };
211 static_assert(sizeof(RegionOpAndAA) == 4, "RegionOpAndAASize"); 214 static_assert(sizeof(RegionOpAndAA) == 4, "RegionOpAndAASize");
212 215
213 RECORD(ClipPath, 0, 216 RECORD(ClipPath, 0,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 PODArray<SkColor> colors; 361 PODArray<SkColor> colors;
359 RefBox<SkXfermode> xmode; 362 RefBox<SkXfermode> xmode;
360 PODArray<uint16_t> indices; 363 PODArray<uint16_t> indices;
361 int indexCount); 364 int indexCount);
362 365
363 #undef RECORD 366 #undef RECORD
364 367
365 } // namespace SkRecords 368 } // namespace SkRecords
366 369
367 #endif//SkRecords_DEFINED 370 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698