aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-09-30 12:41:42 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-30 12:41:42 -0700
commit71df2d7bc1bbc83ad4cf005f9027df4cb3b88a9b (patch)
tree9113c13e0d2285f1204e0a4bee8d89eb644d16ed /src/pdf
parent9c8a32ff4507481aadf1a190637ee8d55c8dc217 (diff)
Add a src rect to drawImageLattice() API
This will allow us to draw ninepatches directly from an asset texture without having to upload them individually. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2382893002 Review-Url: https://codereview.chromium.org/2382893002
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkPDFCanvas.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pdf/SkPDFCanvas.cpp b/src/pdf/SkPDFCanvas.cpp
index 13fcb55dbf..c7e39259ce 100644
--- a/src/pdf/SkPDFCanvas.cpp
+++ b/src/pdf/SkPDFCanvas.cpp
@@ -77,7 +77,7 @@ void SkPDFCanvas::onDrawImageLattice(const SkImage* image,
const Lattice& lattice,
const SkRect& dst,
const SkPaint* paint) {
- SkLatticeIter iter(image->width(), image->height(), lattice, dst);
+ SkLatticeIter iter(lattice, dst);
SkRect srcR, dstR;
while (iter.next(&srcR, &dstR)) {
this->drawImageRect(image, srcR, dstR, paint);
@@ -88,7 +88,7 @@ void SkPDFCanvas::onDrawBitmapLattice(const SkBitmap& bitmap,
const Lattice& lattice,
const SkRect& dst,
const SkPaint* paint) {
- SkLatticeIter iter(bitmap.width(), bitmap.height(), lattice, dst);
+ SkLatticeIter iter(lattice, dst);
SkRect srcR, dstR;
while (iter.next(&srcR, &dstR)) {
this->drawBitmapRect(bitmap, srcR, dstR, paint);