aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/xps
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2017-03-17 11:48:59 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-17 17:48:23 +0000
commitbc21243343b24ffb62b83cdfa0a2bb6c60f07c0f (patch)
treeefca46697348e911d18d4e2ada776e742ad1acbd /src/xps
parent31249bb2df023868e4585f14519bf17c835f8700 (diff)
SkXPS: fix drawBitmapRect()
Change-Id: Id618d0f96a7143dde3966ef4bb51924fb49cb6a8 Reviewed-on: https://skia-review.googlesource.com/9837 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'src/xps')
-rw-r--r--src/xps/SkXPSDevice.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp
index 514c9332ba..75f4119e52 100644
--- a/src/xps/SkXPSDevice.cpp
+++ b/src/xps/SkXPSDevice.cpp
@@ -1054,7 +1054,7 @@ HRESULT SkXPSDevice::createXpsBrush(const SkPaint& skPaint,
//TODO: outMatrix??
SkMatrix localMatrix = shader->getLocalMatrix();
if (parentTransform) {
- localMatrix.preConcat(*parentTransform);
+ localMatrix.postConcat(*parentTransform);
}
SkTScopedComPtr<IXpsOMTileBrush> tileBrush;
@@ -2256,6 +2256,7 @@ void SkXPSDevice::drawBitmapRect(const SkBitmap& bitmap,
const SkRect& dst,
const SkPaint& paint,
SkCanvas::SrcRectConstraint constraint) {
+ // TODO(halcanary): more closely use correct logic for src > bitmap.bounds().
SkRect srcBounds = src ? *src : SkRect::Make(bitmap.bounds());
SkMatrix matrix = SkMatrix::MakeRectToRect(srcBounds, dst, SkMatrix::kFill_ScaleToFit);