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