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 "SkImage.h" | 10 #include "SkImage.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 if (image) { | 204 if (image) { |
205 this->onDrawImageNine(image.get(), center, dst, paint); | 205 this->onDrawImageNine(image.get(), center, dst, paint); |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 void SkRecorder::onDrawImage(const SkImage* image, SkScalar left, SkScalar top, | 209 void SkRecorder::onDrawImage(const SkImage* image, SkScalar left, SkScalar top, |
210 const SkPaint* paint) { | 210 const SkPaint* paint) { |
211 APPEND(DrawImage, this->copy(paint), sk_ref_sp(image), left, top); | 211 APPEND(DrawImage, this->copy(paint), sk_ref_sp(image), left, top); |
212 } | 212 } |
213 | 213 |
| 214 void SkRecorder::onDrawImageLattice(const SkImage* image, |
| 215 const Lattice& lattice, |
| 216 const SkRect& dst, |
| 217 const SkPaint* paint) { |
| 218 APPEND(DrawImageLattice, this->copy(paint), sk_ref_sp(image), |
| 219 lattice.fXCount, this->copy(lattice.fXDivs, lattice.fXCount), |
| 220 lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount), dst); |
| 221 } |
| 222 |
| 223 |
214 void SkRecorder::onDrawImageRect(const SkImage* image, const SkRect* src, const
SkRect& dst, | 224 void SkRecorder::onDrawImageRect(const SkImage* image, const SkRect* src, const
SkRect& dst, |
215 const SkPaint* paint, SrcRectConstraint constra
int) { | 225 const SkPaint* paint, SrcRectConstraint constra
int) { |
216 APPEND(DrawImageRect, this->copy(paint), sk_ref_sp(image), this->copy(src),
dst, constraint); | 226 APPEND(DrawImageRect, this->copy(paint), sk_ref_sp(image), this->copy(src),
dst, constraint); |
217 } | 227 } |
218 | 228 |
219 void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center, | 229 void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center, |
220 const SkRect& dst, const SkPaint* paint) { | 230 const SkRect& dst, const SkPaint* paint) { |
221 APPEND(DrawImageNine, this->copy(paint), sk_ref_sp(image), center, dst); | 231 APPEND(DrawImageNine, this->copy(paint), sk_ref_sp(image), center, dst); |
222 } | 232 } |
223 | 233 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 } | 402 } |
393 | 403 |
394 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 404 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
395 INHERITED(onClipRegion, deviceRgn, op); | 405 INHERITED(onClipRegion, deviceRgn, op); |
396 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); | 406 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); |
397 } | 407 } |
398 | 408 |
399 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro
ps&) { | 409 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro
ps&) { |
400 return nullptr; | 410 return nullptr; |
401 } | 411 } |
OLD | NEW |