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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 APPEND(DrawImageRect, this->copy(paint), sk_ref_sp(image), this->copy(src),
dst, constraint); | 231 APPEND(DrawImageRect, this->copy(paint), sk_ref_sp(image), this->copy(src),
dst, constraint); |
232 } | 232 } |
233 | 233 |
234 void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center, | 234 void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center, |
235 const SkRect& dst, const SkPaint* paint) { | 235 const SkRect& dst, const SkPaint* paint) { |
236 APPEND(DrawImageNine, this->copy(paint), sk_ref_sp(image), center, dst); | 236 APPEND(DrawImageNine, this->copy(paint), sk_ref_sp(image), center, dst); |
237 } | 237 } |
238 | 238 |
239 void SkRecorder::onDrawImageLattice(const SkImage* image, const Lattice& lattice
, const SkRect& dst, | 239 void SkRecorder::onDrawImageLattice(const SkImage* image, const Lattice& lattice
, const SkRect& dst, |
240 const SkPaint* paint) { | 240 const SkPaint* paint) { |
| 241 int flagCount = lattice.fFlags ? (lattice.fXCount + 1) * (lattice.fYCount +
1) : 0; |
241 APPEND(DrawImageLattice, this->copy(paint), sk_ref_sp(image), | 242 APPEND(DrawImageLattice, this->copy(paint), sk_ref_sp(image), |
242 lattice.fXCount, this->copy(lattice.fXDivs, lattice.fXCount), | 243 lattice.fXCount, this->copy(lattice.fXDivs, lattice.fXCount), |
243 lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount), dst); | 244 lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount), |
| 245 flagCount, this->copy(lattice.fFlags, flagCount), dst); |
244 } | 246 } |
245 | 247 |
246 void SkRecorder::onDrawText(const void* text, size_t byteLength, | 248 void SkRecorder::onDrawText(const void* text, size_t byteLength, |
247 SkScalar x, SkScalar y, const SkPaint& paint) { | 249 SkScalar x, SkScalar y, const SkPaint& paint) { |
248 APPEND(DrawText, | 250 APPEND(DrawText, |
249 paint, this->copy((const char*)text, byteLength), byteLength, x, y); | 251 paint, this->copy((const char*)text, byteLength), byteLength, x, y); |
250 } | 252 } |
251 | 253 |
252 void SkRecorder::onDrawPosText(const void* text, size_t byteLength, | 254 void SkRecorder::onDrawPosText(const void* text, size_t byteLength, |
253 const SkPoint pos[], const SkPaint& paint) { | 255 const SkPoint pos[], const SkPaint& paint) { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 } | 421 } |
420 | 422 |
421 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 423 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
422 INHERITED(onClipRegion, deviceRgn, op); | 424 INHERITED(onClipRegion, deviceRgn, op); |
423 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); | 425 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); |
424 } | 426 } |
425 | 427 |
426 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro
ps&) { | 428 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro
ps&) { |
427 return nullptr; | 429 return nullptr; |
428 } | 430 } |
OLD | NEW |