aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkLiteRecorder.cpp
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-08-16 09:31:08 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-16 09:31:08 -0700
commit168820625c35a8c19f66c661efcbce7a5e334837 (patch)
treed2af91d684ed335271850941a5bccedd84346c73 /src/core/SkLiteRecorder.cpp
parentc4d2f907311fca08303c254b2488bd7990fa2f32 (diff)
Add onDrawBitmapLattice(), avoid unnecessary bitmap->image copy
out/Release/nanobench --match Lattice --config gpu --ms 3000 3.42ms -> 17.2us For reference, a loop over drawBitmapRects (which is what Android currently does) is about 13us. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2205273003 Review-Url: https://codereview.chromium.org/2205273003
Diffstat (limited to 'src/core/SkLiteRecorder.cpp')
-rw-r--r--src/core/SkLiteRecorder.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/SkLiteRecorder.cpp b/src/core/SkLiteRecorder.cpp
index 6a8e1306c4..b61dd8f582 100644
--- a/src/core/SkLiteRecorder.cpp
+++ b/src/core/SkLiteRecorder.cpp
@@ -122,6 +122,11 @@ void SkLiteRecorder::onDrawBitmapRect(const SkBitmap& bm,
const SkPaint* paint, SrcRectConstraint constraint) {
fDL->drawBitmapRect(bm, src, dst, paint, constraint);
}
+void SkLiteRecorder::onDrawBitmapLattice(const SkBitmap& bm,
+ const SkCanvas::Lattice& lattice, const SkRect& dst,
+ const SkPaint* paint) {
+ fDL->drawBitmapLattice(bm, lattice, dst, paint);
+}
void SkLiteRecorder::onDrawImage(const SkImage* img,
SkScalar x, SkScalar y,