Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: src/pdf/SkPDFCanvas.cpp

Issue 2205273003: Add onDrawBitmapLattice(), avoid unnecessary bitmap->image copy (Closed) Base URL: https://skia.googlesource.com/skia.git@copypaste
Patch Set: Add support for SkLiteRecorder Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/core/SkLiteDL.cpp ('K') | « src/pdf/SkPDFCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFCanvas.cpp
diff --git a/src/pdf/SkPDFCanvas.cpp b/src/pdf/SkPDFCanvas.cpp
index 1d3138541d796207287ba69afd2ca3e3995956a2..4ef1922a58fff23c86b315d6454d59208b769c9d 100644
--- a/src/pdf/SkPDFCanvas.cpp
+++ b/src/pdf/SkPDFCanvas.cpp
@@ -95,3 +95,15 @@ void SkPDFCanvas::onDrawImageLattice(const SkImage* image,
this->drawImageRect(image, srcR, dstR, paint);
}
}
+
+void SkPDFCanvas::onDrawBitmapLattice(const SkBitmap& bitmap,
reed1 2016/08/16 11:28:47 General question for PDF canvas (not strictly rela
hal.canary 2016/08/16 14:57:33 No! You need to keep the bitmaps until we get to
+ const Lattice& lattice,
+ const SkRect& dst,
+ const SkPaint* paint) {
+ SkLatticeIter iter(bitmap.width(), bitmap.height(), lattice, dst);
+ SkRect srcR, dstR;
+ while (iter.next(&srcR, &dstR)) {
+ this->drawBitmapRect(bitmap, srcR, dstR, paint);
+ }
+}
+
« src/core/SkLiteDL.cpp ('K') | « src/pdf/SkPDFCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698