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

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

Issue 224723026: Add push/pop cull to SkRecord. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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/record/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 #ifndef SkRecords_DEFINED 1 #ifndef SkRecords_DEFINED
2 #define SkRecords_DEFINED 2 #define SkRecords_DEFINED
3 3
4 #include "SkCanvas.h" 4 #include "SkCanvas.h"
5 5
6 namespace SkRecords { 6 namespace SkRecords {
7 7
8 // A list of all the types of canvas calls we can record. 8 // A list of all the types of canvas calls we can record.
9 // Each of these is reified into a struct below. 9 // Each of these is reified into a struct below.
10 // 10 //
(...skipping 21 matching lines...) Expand all
32 M(DrawPaint) \ 32 M(DrawPaint) \
33 M(DrawPath) \ 33 M(DrawPath) \
34 M(DrawPoints) \ 34 M(DrawPoints) \
35 M(DrawPosText) \ 35 M(DrawPosText) \
36 M(DrawPosTextH) \ 36 M(DrawPosTextH) \
37 M(DrawRRect) \ 37 M(DrawRRect) \
38 M(DrawRect) \ 38 M(DrawRect) \
39 M(DrawSprite) \ 39 M(DrawSprite) \
40 M(DrawText) \ 40 M(DrawText) \
41 M(DrawTextOnPath) \ 41 M(DrawTextOnPath) \
42 M(DrawVertices) 42 M(DrawVertices) \
43 M(PushCull) \
44 M(PopCull)
43 45
44 // Defines SkRecords::Type, an enum of all record types. 46 // Defines SkRecords::Type, an enum of all record types.
45 #define ENUM(T) T##_Type, 47 #define ENUM(T) T##_Type,
46 enum Type { SK_RECORD_TYPES(ENUM) }; 48 enum Type { SK_RECORD_TYPES(ENUM) };
47 #undef ENUM 49 #undef ENUM
48 50
49 // Macros to make it easier to define a record for a draw call with 0 args, 1 ar gs, 2 args, etc. 51 // Macros to make it easier to define a record for a draw call with 0 args, 1 ar gs, 2 args, etc.
50 // These should be clearer when you look at their use below. 52 // These should be clearer when you look at their use below.
51 #define RECORD0(T) \ 53 #define RECORD0(T) \
52 struct T { \ 54 struct T { \
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 }; 120 };
119 121
120 // Pointers here represent either an optional value or an array if accompanied b y a count. 122 // Pointers here represent either an optional value or an array if accompanied b y a count.
121 // None of these records manages the lifetimes of pointers, except for DrawVerti ces handling its 123 // None of these records manages the lifetimes of pointers, except for DrawVerti ces handling its
122 // Xfermode specially. 124 // Xfermode specially.
123 125
124 RECORD0(Restore); 126 RECORD0(Restore);
125 RECORD1(Save, SkCanvas::SaveFlags, flags); 127 RECORD1(Save, SkCanvas::SaveFlags, flags);
126 RECORD3(SaveLayer, SkRect*, bounds, SkPaint*, paint, SkCanvas::SaveFlags, flags) ; 128 RECORD3(SaveLayer, SkRect*, bounds, SkPaint*, paint, SkCanvas::SaveFlags, flags) ;
127 129
130 RECORD1(PushCull, SkRect, rect);
131 RECORD0(PopCull);
132
128 RECORD1(Concat, SkMatrix, matrix); 133 RECORD1(Concat, SkMatrix, matrix);
129 RECORD1(SetMatrix, SkMatrix, matrix); 134 RECORD1(SetMatrix, SkMatrix, matrix);
130 135
131 RECORD3(ClipPath, SkPath, path, SkRegion::Op, op, bool, doAA); 136 RECORD3(ClipPath, SkPath, path, SkRegion::Op, op, bool, doAA);
132 RECORD3(ClipRRect, SkRRect, rrect, SkRegion::Op, op, bool, doAA); 137 RECORD3(ClipRRect, SkRRect, rrect, SkRegion::Op, op, bool, doAA);
133 RECORD3(ClipRect, SkRect, rect, SkRegion::Op, op, bool, doAA); 138 RECORD3(ClipRect, SkRect, rect, SkRegion::Op, op, bool, doAA);
134 RECORD2(ClipRegion, SkRegion, region, SkRegion::Op, op); 139 RECORD2(ClipRegion, SkRegion, region, SkRegion::Op, op);
135 140
136 RECORD1(Clear, SkColor, color); 141 RECORD1(Clear, SkColor, color);
137 RECORD4(DrawBitmap, ImmutableBitmap, bitmap, SkScalar, left, SkScalar, top, SkPa int*, paint); 142 RECORD4(DrawBitmap, ImmutableBitmap, bitmap, SkScalar, left, SkScalar, top, SkPa int*, paint);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 #undef RECORD0 205 #undef RECORD0
201 #undef RECORD1 206 #undef RECORD1
202 #undef RECORD2 207 #undef RECORD2
203 #undef RECORD3 208 #undef RECORD3
204 #undef RECORD4 209 #undef RECORD4
205 #undef RECORD5 210 #undef RECORD5
206 211
207 } // namespace SkRecords 212 } // namespace SkRecords
208 213
209 #endif//SkRecords_DEFINED 214 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « src/record/SkRecorder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698