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

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

Issue 794263002: Cull pushCull and popCull from Skia. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix debugger Created 6 years 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') | src/utils/SkDumpCanvas.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 12 matching lines...) Expand all
23 // We leave this SK_RECORD_TYPES macro defined for use by code that wants to ope rate on SkRecords 23 // We leave this SK_RECORD_TYPES macro defined for use by code that wants to ope rate on SkRecords
24 // types polymorphically. (See SkRecord::Record::{visit,mutate} for an example. ) 24 // types polymorphically. (See SkRecord::Record::{visit,mutate} for an example. )
25 // 25 //
26 // Order doesn't technically matter here, but the compiler can generally generat e better code if 26 // Order doesn't technically matter here, but the compiler can generally generat e better code if
27 // you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0. 27 // you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0.
28 #define SK_RECORD_TYPES(M) \ 28 #define SK_RECORD_TYPES(M) \
29 M(NoOp) \ 29 M(NoOp) \
30 M(Restore) \ 30 M(Restore) \
31 M(Save) \ 31 M(Save) \
32 M(SaveLayer) \ 32 M(SaveLayer) \
33 M(PushCull) \
34 M(PopCull) \
35 M(SetMatrix) \ 33 M(SetMatrix) \
36 M(ClipPath) \ 34 M(ClipPath) \
37 M(ClipRRect) \ 35 M(ClipRRect) \
38 M(ClipRect) \ 36 M(ClipRect) \
39 M(ClipRegion) \ 37 M(ClipRegion) \
40 M(Clear) \ 38 M(Clear) \
41 M(BeginCommentGroup) \ 39 M(BeginCommentGroup) \
42 M(AddComment) \ 40 M(AddComment) \
43 M(EndCommentGroup) \ 41 M(EndCommentGroup) \
44 M(DrawBitmap) \ 42 M(DrawBitmap) \
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 (void)this->getType(); 207 (void)this->getType();
210 } 208 }
211 }; 209 };
212 210
213 RECORD0(NoOp); 211 RECORD0(NoOp);
214 212
215 RECORD2(Restore, SkIRect, devBounds, TypedMatrix, matrix); 213 RECORD2(Restore, SkIRect, devBounds, TypedMatrix, matrix);
216 RECORD0(Save); 214 RECORD0(Save);
217 RECORD3(SaveLayer, Optional<SkRect>, bounds, Optional<SkPaint>, paint, SkCanvas: :SaveFlags, flags); 215 RECORD3(SaveLayer, Optional<SkRect>, bounds, Optional<SkPaint>, paint, SkCanvas: :SaveFlags, flags);
218 216
219 RECORD1(PushCull, SkRect, rect);
220 RECORD0(PopCull);
221
222 RECORD1(SetMatrix, TypedMatrix, matrix); 217 RECORD1(SetMatrix, TypedMatrix, matrix);
223 218
224 struct RegionOpAndAA { 219 struct RegionOpAndAA {
225 RegionOpAndAA(SkRegion::Op op, bool aa) : op(op), aa(aa) {} 220 RegionOpAndAA(SkRegion::Op op, bool aa) : op(op), aa(aa) {}
226 SkRegion::Op op : 31; // This really only needs to be 3, but there's no win today to do so. 221 SkRegion::Op op : 31; // This really only needs to be 3, but there's no win today to do so.
227 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call t his an unsigned. 222 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call t his an unsigned.
228 }; 223 };
229 SK_COMPILE_ASSERT(sizeof(RegionOpAndAA) == 4, RegionOpAndAASize); 224 SK_COMPILE_ASSERT(sizeof(RegionOpAndAA) == 4, RegionOpAndAASize);
230 225
231 RECORD3(ClipPath, SkIRect, devBounds, BoundedPath, path, RegionOpAndAA, opAA); 226 RECORD3(ClipPath, SkIRect, devBounds, BoundedPath, path, RegionOpAndAA, opAA);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 #undef RECORD0 341 #undef RECORD0
347 #undef RECORD1 342 #undef RECORD1
348 #undef RECORD2 343 #undef RECORD2
349 #undef RECORD3 344 #undef RECORD3
350 #undef RECORD4 345 #undef RECORD4
351 #undef RECORD5 346 #undef RECORD5
352 347
353 } // namespace SkRecords 348 } // namespace SkRecords
354 349
355 #endif//SkRecords_DEFINED 350 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkRecorder.cpp ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698