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

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

Issue 452983002: SkRecord: Strip out cull-skipping and y-only drawPosTextH skipping. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove dead code. 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/SkRecordOpts.cpp ('k') | tests/RecordDrawTest.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 // 40 //
41 // Order doesn't technically matter here, but the compiler can generally generat e better code if 41 // Order doesn't technically matter here, but the compiler can generally generat e better code if
42 // you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0. 42 // you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0.
43 #define SK_RECORD_TYPES(M) \ 43 #define SK_RECORD_TYPES(M) \
44 M(NoOp) \ 44 M(NoOp) \
45 M(Restore) \ 45 M(Restore) \
46 M(Save) \ 46 M(Save) \
47 M(SaveLayer) \ 47 M(SaveLayer) \
48 M(PushCull) \ 48 M(PushCull) \
49 M(PopCull) \ 49 M(PopCull) \
50 M(PairedPushCull) /*From SkRecordAnnotateCullingPairs*/ \
51 M(Concat) \ 50 M(Concat) \
52 M(SetMatrix) \ 51 M(SetMatrix) \
53 M(ClipPath) \ 52 M(ClipPath) \
54 M(ClipRRect) \ 53 M(ClipRRect) \
55 M(ClipRect) \ 54 M(ClipRect) \
56 M(ClipRegion) \ 55 M(ClipRegion) \
57 M(Clear) \ 56 M(Clear) \
58 M(DrawBitmap) \ 57 M(DrawBitmap) \
59 M(DrawBitmapMatrix) \ 58 M(DrawBitmapMatrix) \
60 M(DrawBitmapNine) \ 59 M(DrawBitmapNine) \
61 M(DrawBitmapRectToRect) \ 60 M(DrawBitmapRectToRect) \
62 M(DrawDRRect) \ 61 M(DrawDRRect) \
63 M(DrawOval) \ 62 M(DrawOval) \
64 M(DrawPaint) \ 63 M(DrawPaint) \
65 M(DrawPath) \ 64 M(DrawPath) \
66 M(DrawPatch) \ 65 M(DrawPatch) \
67 M(DrawPicture) \ 66 M(DrawPicture) \
68 M(DrawPoints) \ 67 M(DrawPoints) \
69 M(DrawPosText) \ 68 M(DrawPosText) \
70 M(DrawPosTextH) \ 69 M(DrawPosTextH) \
71 M(DrawRRect) \ 70 M(DrawRRect) \
72 M(DrawRect) \ 71 M(DrawRect) \
73 M(DrawSprite) \ 72 M(DrawSprite) \
74 M(DrawText) \ 73 M(DrawText) \
75 M(DrawTextOnPath) \ 74 M(DrawTextOnPath) \
76 M(DrawVertices) \ 75 M(DrawVertices)
77 M(BoundedDrawPosTextH) /*From SkRecordBoundDrawPosTextH*/
78 76
79 // Defines SkRecords::Type, an enum of all record types. 77 // Defines SkRecords::Type, an enum of all record types.
80 #define ENUM(T) T##_Type, 78 #define ENUM(T) T##_Type,
81 enum Type { SK_RECORD_TYPES(ENUM) }; 79 enum Type { SK_RECORD_TYPES(ENUM) };
82 #undef ENUM 80 #undef ENUM
83 81
84 // Macros to make it easier to define a record for a draw call with 0 args, 1 ar gs, 2 args, etc. 82 // Macros to make it easier to define a record for a draw call with 0 args, 1 ar gs, 2 args, etc.
85 // These should be clearer when you look at their use below. 83 // These should be clearer when you look at their use below.
86 #define RECORD0(T) \ 84 #define RECORD0(T) \
87 struct T { \ 85 struct T { \
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 SkCanvas::VertexMode vmode; 288 SkCanvas::VertexMode vmode;
291 int vertexCount; 289 int vertexCount;
292 PODArray<SkPoint> vertices; 290 PODArray<SkPoint> vertices;
293 PODArray<SkPoint> texs; 291 PODArray<SkPoint> texs;
294 PODArray<SkColor> colors; 292 PODArray<SkColor> colors;
295 SkAutoTUnref<SkXfermode> xmode; 293 SkAutoTUnref<SkXfermode> xmode;
296 PODArray<uint16_t> indices; 294 PODArray<uint16_t> indices;
297 int indexCount; 295 int indexCount;
298 }; 296 };
299 297
300 // Records added by optimizations.
301 RECORD2(PairedPushCull, Adopted<PushCull>, base, unsigned, skip);
302 RECORD3(BoundedDrawPosTextH, Adopted<DrawPosTextH>, base, SkScalar, minY, SkScal ar, maxY);
303
304 #undef RECORD0 298 #undef RECORD0
305 #undef RECORD1 299 #undef RECORD1
306 #undef RECORD2 300 #undef RECORD2
307 #undef RECORD3 301 #undef RECORD3
308 #undef RECORD4 302 #undef RECORD4
309 #undef RECORD5 303 #undef RECORD5
310 304
311 } // namespace SkRecords 305 } // namespace SkRecords
312 306
313 #endif//SkRecords_DEFINED 307 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkRecordOpts.cpp ('k') | tests/RecordDrawTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698