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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 int flagCount = lattice.fFlags ? (lattice.fXCount + 1) * (lattice.fYCount +
1) : 0; |
242 APPEND(DrawImageLattice, this->copy(paint), sk_ref_sp(image), | 242 APPEND(DrawImageLattice, this->copy(paint), sk_ref_sp(image), |
243 lattice.fXCount, this->copy(lattice.fXDivs, lattice.fXCount), | 243 lattice.fXCount, this->copy(lattice.fXDivs, lattice.fXCount), |
244 lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount), | 244 lattice.fYCount, this->copy(lattice.fYDivs, lattice.fYCount), |
245 flagCount, this->copy(lattice.fFlags, flagCount), dst); | 245 flagCount, this->copy(lattice.fFlags, flagCount), lattice.fBounds, ds
t); |
246 } | 246 } |
247 | 247 |
248 void SkRecorder::onDrawText(const void* text, size_t byteLength, | 248 void SkRecorder::onDrawText(const void* text, size_t byteLength, |
249 SkScalar x, SkScalar y, const SkPaint& paint) { | 249 SkScalar x, SkScalar y, const SkPaint& paint) { |
250 APPEND(DrawText, | 250 APPEND(DrawText, |
251 paint, this->copy((const char*)text, byteLength), byteLength, x, y); | 251 paint, this->copy((const char*)text, byteLength), byteLength, x, y); |
252 } | 252 } |
253 | 253 |
254 void SkRecorder::onDrawPosText(const void* text, size_t byteLength, | 254 void SkRecorder::onDrawPosText(const void* text, size_t byteLength, |
255 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... |
421 } | 421 } |
422 | 422 |
423 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, ClipOp op) { | 423 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, ClipOp op) { |
424 INHERITED(onClipRegion, deviceRgn, op); | 424 INHERITED(onClipRegion, deviceRgn, op); |
425 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); | 425 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); |
426 } | 426 } |
427 | 427 |
428 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro
ps&) { | 428 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro
ps&) { |
429 return nullptr; | 429 return nullptr; |
430 } | 430 } |
OLD | NEW |