aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapDevice.cpp
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2017-06-27 09:58:56 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-27 15:33:35 +0000
commitb964238f0bded00bae59c26c5f366a7780a0ef5f (patch)
treece1869a71baf1bd518b8edafe00507af0deafb67 /src/core/SkBitmapDevice.cpp
parentca0b43803b45d6e24c13edb118cc3862bb00f7ae (diff)
SkDevice::drawBitmap takes x,y, not matrix
Motivation: a simpler call should make it easier for SkPDF to learn how to do drawBitmap with A8 bitmap and a maskfilter. Change-Id: I1a5d190b40b0e9e08fa8876d265a9835a3e9987d Reviewed-on: https://skia-review.googlesource.com/20961 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'src/core/SkBitmapDevice.cpp')
-rw-r--r--src/core/SkBitmapDevice.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index 981273ad9d..28278a918d 100644
--- a/src/core/SkBitmapDevice.cpp
+++ b/src/core/SkBitmapDevice.cpp
@@ -233,8 +233,9 @@ void SkBitmapDevice::drawPath(const SkPath& path,
BDDraw(this).drawPath(path, paint, prePathMatrix, pathIsMutable);
}
-void SkBitmapDevice::drawBitmap(const SkBitmap& bitmap,
- const SkMatrix& matrix, const SkPaint& paint) {
+void SkBitmapDevice::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y,
+ const SkPaint& paint) {
+ SkMatrix matrix = SkMatrix::MakeTrans(x, y);
LogDrawScaleFactor(SkMatrix::Concat(this->ctm(), matrix), paint.getFilterQuality());
BDDraw(this).drawBitmap(bitmap, matrix, nullptr, paint);
}