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

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

Issue 835813002: Clean up dead clear() code in SkRecord. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clearer? Created 5 years, 11 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/SkRecordDraw.cpp ('k') | tests/PictureBBHTest.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 17 matching lines...) Expand all
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(SetMatrix) \ 33 M(SetMatrix) \
34 M(ClipPath) \ 34 M(ClipPath) \
35 M(ClipRRect) \ 35 M(ClipRRect) \
36 M(ClipRect) \ 36 M(ClipRect) \
37 M(ClipRegion) \ 37 M(ClipRegion) \
38 M(Clear) \
39 M(BeginCommentGroup) \ 38 M(BeginCommentGroup) \
40 M(AddComment) \ 39 M(AddComment) \
41 M(EndCommentGroup) \ 40 M(EndCommentGroup) \
42 M(DrawBitmap) \ 41 M(DrawBitmap) \
43 M(DrawBitmapNine) \ 42 M(DrawBitmapNine) \
44 M(DrawBitmapRectToRect) \ 43 M(DrawBitmapRectToRect) \
45 M(DrawBitmapRectToRectBleed) \ 44 M(DrawBitmapRectToRectBleed) \
46 M(DrawDrawable) \ 45 M(DrawDrawable) \
47 M(DrawImage) \ 46 M(DrawImage) \
48 M(DrawImageRect) \ 47 M(DrawImageRect) \
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 SkRegion::Op op : 31; // This really only needs to be 3, but there's no win today to do so. 228 SkRegion::Op op : 31; // This really only needs to be 3, but there's no win today to do so.
230 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call t his an unsigned. 229 unsigned aa : 1; // MSVC won't pack an enum with an bool, so we call t his an unsigned.
231 }; 230 };
232 SK_COMPILE_ASSERT(sizeof(RegionOpAndAA) == 4, RegionOpAndAASize); 231 SK_COMPILE_ASSERT(sizeof(RegionOpAndAA) == 4, RegionOpAndAASize);
233 232
234 RECORD3(ClipPath, SkIRect, devBounds, BoundedPath, path, RegionOpAndAA, opAA); 233 RECORD3(ClipPath, SkIRect, devBounds, BoundedPath, path, RegionOpAndAA, opAA);
235 RECORD3(ClipRRect, SkIRect, devBounds, SkRRect, rrect, RegionOpAndAA, opAA); 234 RECORD3(ClipRRect, SkIRect, devBounds, SkRRect, rrect, RegionOpAndAA, opAA);
236 RECORD3(ClipRect, SkIRect, devBounds, SkRect, rect, RegionOpAndAA, opAA); 235 RECORD3(ClipRect, SkIRect, devBounds, SkRect, rect, RegionOpAndAA, opAA);
237 RECORD3(ClipRegion, SkIRect, devBounds, SkRegion, region, SkRegion::Op, op); 236 RECORD3(ClipRegion, SkIRect, devBounds, SkRegion, region, SkRegion::Op, op);
238 237
239 // Picture version 37 was last to record this op-code; clear is now non-virtual
240 RECORD1(Clear, SkColor, color);
241
242 RECORD1(BeginCommentGroup, PODArray<char>, description); 238 RECORD1(BeginCommentGroup, PODArray<char>, description);
243 RECORD2(AddComment, PODArray<char>, key, PODArray<char>, value); 239 RECORD2(AddComment, PODArray<char>, key, PODArray<char>, value);
244 RECORD0(EndCommentGroup); 240 RECORD0(EndCommentGroup);
245 241
246 // While not strictly required, if you have an SkPaint, it's fastest to put it f irst. 242 // While not strictly required, if you have an SkPaint, it's fastest to put it f irst.
247 RECORD4(DrawBitmap, Optional<SkPaint>, paint, 243 RECORD4(DrawBitmap, Optional<SkPaint>, paint,
248 ImmutableBitmap, bitmap, 244 ImmutableBitmap, bitmap,
249 SkScalar, left, 245 SkScalar, left,
250 SkScalar, top); 246 SkScalar, top);
251 RECORD4(DrawBitmapNine, Optional<SkPaint>, paint, 247 RECORD4(DrawBitmapNine, Optional<SkPaint>, paint,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 #undef RECORD0 343 #undef RECORD0
348 #undef RECORD1 344 #undef RECORD1
349 #undef RECORD2 345 #undef RECORD2
350 #undef RECORD3 346 #undef RECORD3
351 #undef RECORD4 347 #undef RECORD4
352 #undef RECORD5 348 #undef RECORD5
353 349
354 } // namespace SkRecords 350 } // namespace SkRecords
355 351
356 #endif//SkRecords_DEFINED 352 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | tests/PictureBBHTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698