OLD | NEW |
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 #include "SkBigPicture.h" | 8 #include "SkBigPicture.h" |
9 #include "SkCanvasPriv.h" | 9 #include "SkCanvasPriv.h" |
10 #include "SkPatchUtils.h" | 10 #include "SkPatchUtils.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 } | 148 } |
149 | 149 |
150 void SkRecorder::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { | 150 void SkRecorder::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { |
151 APPEND(DrawRRect, paint, rrect); | 151 APPEND(DrawRRect, paint, rrect); |
152 } | 152 } |
153 | 153 |
154 void SkRecorder::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, const
SkPaint& paint) { | 154 void SkRecorder::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, const
SkPaint& paint) { |
155 APPEND(DrawDRRect, paint, outer, inner); | 155 APPEND(DrawDRRect, paint, outer, inner); |
156 } | 156 } |
157 | 157 |
158 void SkRecorder::onDrawDrawable(SkDrawable* drawable) { | 158 void SkRecorder::onDrawDrawable(SkDrawable* drawable, const SkMatrix* matrix) { |
159 if (!fDrawableList) { | 159 if (!fDrawableList) { |
160 fDrawableList.reset(SkNEW(SkDrawableList)); | 160 fDrawableList.reset(SkNEW(SkDrawableList)); |
161 } | 161 } |
162 fDrawableList->append(drawable); | 162 fDrawableList->append(drawable); |
163 APPEND(DrawDrawable, drawable->getBounds(), fDrawableList->count() - 1); | 163 APPEND(DrawDrawable, this->copy(matrix), drawable->getBounds(), fDrawableLis
t->count() - 1); |
164 } | 164 } |
165 | 165 |
166 void SkRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { | 166 void SkRecorder::onDrawPath(const SkPath& path, const SkPaint& paint) { |
167 TRY_MINIRECORDER(drawPath, path, paint); | 167 TRY_MINIRECORDER(drawPath, path, paint); |
168 APPEND(DrawPath, paint, path); | 168 APPEND(DrawPath, paint, path); |
169 } | 169 } |
170 | 170 |
171 void SkRecorder::onDrawBitmap(const SkBitmap& bitmap, | 171 void SkRecorder::onDrawBitmap(const SkBitmap& bitmap, |
172 SkScalar left, | 172 SkScalar left, |
173 SkScalar top, | 173 SkScalar top, |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 INHERITED(onClipPath, path, op, edgeStyle); | 376 INHERITED(onClipPath, path, op, edgeStyle); |
377 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); | 377 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); |
378 APPEND(ClipPath, this->devBounds(), path, opAA); | 378 APPEND(ClipPath, this->devBounds(), path, opAA); |
379 } | 379 } |
380 | 380 |
381 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 381 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
382 INHERITED(onClipRegion, deviceRgn, op); | 382 INHERITED(onClipRegion, deviceRgn, op); |
383 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); | 383 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); |
384 } | 384 } |
385 | 385 |
OLD | NEW |