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

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

Issue 1220733006: Add support for drawBitmapRect() to SkMiniRecorder. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 5 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/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 /* 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 23 matching lines...) Expand all
34 M(SaveLayer) \ 34 M(SaveLayer) \
35 M(SetMatrix) \ 35 M(SetMatrix) \
36 M(ClipPath) \ 36 M(ClipPath) \
37 M(ClipRRect) \ 37 M(ClipRRect) \
38 M(ClipRect) \ 38 M(ClipRect) \
39 M(ClipRegion) \ 39 M(ClipRegion) \
40 M(DrawBitmap) \ 40 M(DrawBitmap) \
41 M(DrawBitmapNine) \ 41 M(DrawBitmapNine) \
42 M(DrawBitmapRectToRect) \ 42 M(DrawBitmapRectToRect) \
43 M(DrawBitmapRectToRectBleed) \ 43 M(DrawBitmapRectToRectBleed) \
44 M(DrawBitmapRectToRectFixedSize) \
44 M(DrawDrawable) \ 45 M(DrawDrawable) \
45 M(DrawImage) \ 46 M(DrawImage) \
46 M(DrawImageRect) \ 47 M(DrawImageRect) \
47 M(DrawImageNine) \ 48 M(DrawImageNine) \
48 M(DrawDRRect) \ 49 M(DrawDRRect) \
49 M(DrawOval) \ 50 M(DrawOval) \
50 M(DrawPaint) \ 51 M(DrawPaint) \
51 M(DrawPath) \ 52 M(DrawPath) \
52 M(DrawPatch) \ 53 M(DrawPatch) \
53 M(DrawPicture) \ 54 M(DrawPicture) \
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 }; 126 };
126 127
127 #define RECORD8(T, A, a, B, b, C, c, D, d, E, e, F, f, G, g, H, h) \ 128 #define RECORD8(T, A, a, B, b, C, c, D, d, E, e, F, f, G, g, H, h) \
128 struct T { \ 129 struct T { \
129 static const Type kType = T##_Type; \ 130 static const Type kType = T##_Type; \
130 T() {} \ 131 T() {} \
131 template <typename Z, typename Y, typename X, typename W, typename V, typena me U, typename S, typename R> \ 132 template <typename Z, typename Y, typename X, typename W, typename V, typena me U, typename S, typename R> \
132 T(Z a, Y b, X c, W d, V e, U f, S g, R h) : a(a), b(b), c(c), d(d), e(e), f( f), g(g), h(h) {} \ 133 T(Z a, Y b, X c, W d, V e, U f, S g, R h) : a(a), b(b), c(c), d(d), e(e), f( f), g(g), h(h) {} \
133 A a; B b; C c; D d; E e; F f; G g; H h; \ 134 A a; B b; C c; D d; E e; F f; G g; H h; \
134 }; 135 };
135 136
136 #define ACT_AS_PTR(ptr) \ 137 #define ACT_AS_PTR(ptr) \
137 operator T*() const { return ptr; } \ 138 operator T*() const { return ptr; } \
138 T* operator->() const { return ptr; } 139 T* operator->() const { return ptr; }
139 140
140 template <typename T> 141 template <typename T>
141 class RefBox : SkNoncopyable { 142 class RefBox : SkNoncopyable {
142 public: 143 public:
143 RefBox() {} 144 RefBox() {}
144 RefBox(T* obj) : fObj(SkSafeRef(obj)) {} 145 RefBox(T* obj) : fObj(SkSafeRef(obj)) {}
145 ~RefBox() { SkSafeUnref(fObj); } 146 ~RefBox() { SkSafeUnref(fObj); }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 SkIRect, center, 273 SkIRect, center,
273 SkRect, dst); 274 SkRect, dst);
274 RECORD4(DrawBitmapRectToRect, Optional<SkPaint>, paint, 275 RECORD4(DrawBitmapRectToRect, Optional<SkPaint>, paint,
275 ImmutableBitmap, bitmap, 276 ImmutableBitmap, bitmap,
276 Optional<SkRect>, src, 277 Optional<SkRect>, src,
277 SkRect, dst); 278 SkRect, dst);
278 RECORD4(DrawBitmapRectToRectBleed, Optional<SkPaint>, paint, 279 RECORD4(DrawBitmapRectToRectBleed, Optional<SkPaint>, paint,
279 ImmutableBitmap, bitmap, 280 ImmutableBitmap, bitmap,
280 Optional<SkRect>, src, 281 Optional<SkRect>, src,
281 SkRect, dst); 282 SkRect, dst);
283 RECORD5(DrawBitmapRectToRectFixedSize, SkPaint, paint,
284 ImmutableBitmap, bitmap,
285 SkRect, src,
286 SkRect, dst,
287 SkCanvas::DrawBitmapRectFlags, flags);
282 RECORD3(DrawDRRect, SkPaint, paint, SkRRect, outer, SkRRect, inner); 288 RECORD3(DrawDRRect, SkPaint, paint, SkRRect, outer, SkRRect, inner);
283 RECORD2(DrawDrawable, SkRect, worstCaseBounds, int32_t, index); 289 RECORD2(DrawDrawable, SkRect, worstCaseBounds, int32_t, index);
284 RECORD4(DrawImage, Optional<SkPaint>, paint, 290 RECORD4(DrawImage, Optional<SkPaint>, paint,
285 RefBox<const SkImage>, image, 291 RefBox<const SkImage>, image,
286 SkScalar, left, 292 SkScalar, left,
287 SkScalar, top); 293 SkScalar, top);
288 RECORD4(DrawImageRect, Optional<SkPaint>, paint, 294 RECORD4(DrawImageRect, Optional<SkPaint>, paint,
289 RefBox<const SkImage>, image, 295 RefBox<const SkImage>, image,
290 Optional<SkRect>, src, 296 Optional<SkRect>, src,
291 SkRect, dst); 297 SkRect, dst);
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 #undef RECORD1 386 #undef RECORD1
381 #undef RECORD2 387 #undef RECORD2
382 #undef RECORD3 388 #undef RECORD3
383 #undef RECORD4 389 #undef RECORD4
384 #undef RECORD5 390 #undef RECORD5
385 #undef RECORD8 391 #undef RECORD8
386 392
387 } // namespace SkRecords 393 } // namespace SkRecords
388 394
389 #endif//SkRecords_DEFINED 395 #endif//SkRecords_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkRecorder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698