[Libreoffice-commits] core.git: vcl/skia
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 4 12:56:40 UTC 2020
vcl/skia/gdiimpl.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit bb66f3b772115506b8b39e6cc24c1f82e7a6dc1e
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Oct 2 19:07:09 2020 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Sun Oct 4 14:56:03 2020 +0200
do not set high filter quality if not changing image
It seems setting kHigh_SkFilterQuality may have a performance impact
even when there is no resizing/transforming involved (besides moving,
which doesn't affect the image itself).
Change-Id: I08a6a1a6cd3c002643caabac91532fdc6659c1c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103889
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index e194ba964c58..f0076d9a90f9 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1720,7 +1720,8 @@ bool SkiaSalGraphicsImpl::drawTransformedBitmap(const basegfx::B2DPoint& rNull,
SkAutoCanvasRestore autoRestore(canvas, true);
canvas->concat(matrix);
SkPaint paint;
- paint.setFilterQuality(kHigh_SkFilterQuality);
+ if (!matrix.isTranslate())
+ paint.setFilterQuality(kHigh_SkFilterQuality);
canvas->drawImage(imageToDraw, 0, 0, &paint);
}
else
@@ -1737,7 +1738,8 @@ bool SkiaSalGraphicsImpl::drawTransformedBitmap(const basegfx::B2DPoint& rNull,
SkAutoCanvasRestore autoRestore(canvas, true);
canvas->concat(matrix);
SkPaint paint;
- paint.setFilterQuality(kHigh_SkFilterQuality);
+ if (!matrix.isTranslate())
+ paint.setFilterQuality(kHigh_SkFilterQuality);
if (pSkiaAlphaBitmap)
{
paint.setShader(SkShaders::Blend(SkBlendMode::kDstOut, // VCL alpha is one-minus-alpha.
More information about the Libreoffice-commits
mailing list