summaryrefslogtreecommitdiff
path: root/vcl/inc/skia
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-11-15 18:19:27 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-11-16 10:39:43 +0100
commit6792e6e5e49d11a54256b75c4c5a476bb2f10b4a (patch)
tree3239557354ba1b44e6f6cc59b821006abf6e0f09 /vcl/inc/skia
parent29a2120fcf56ef7fcdb5c95e896e4366454b63bf (diff)
when caching bitmaps in skia, take into account HiDPI
Since the image will be actually eventually drawn twice as big, cache an image that is twice as big. Change-Id: Iea0340cd92c102e453330723c797659c742feb63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125263 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/inc/skia')
-rw-r--r--vcl/inc/skia/gdiimpl.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx
index 70bbcf5c4dcc..942567fec0f6 100644
--- a/vcl/inc/skia/gdiimpl.hxx
+++ b/vcl/inc/skia/gdiimpl.hxx
@@ -206,7 +206,7 @@ public:
void drawBitmap(const SalTwoRect& rPosAry, const SkiaSalBitmap& bitmap,
SkBlendMode blendMode = SkBlendMode::kSrcOver);
- void drawImage(const SalTwoRect& rPosAry, const sk_sp<SkImage>& aImage,
+ void drawImage(const SalTwoRect& rPosAry, const sk_sp<SkImage>& aImage, int srcScaling = 1,
SkBlendMode eBlendMode = SkBlendMode::kSrcOver);
void drawShader(const SalTwoRect& rPosAry, const sk_sp<SkShader>& shader,
@@ -284,7 +284,7 @@ protected:
void resetCanvasScalingAndClipping();
static void setCanvasClipRegion(SkCanvas* canvas, const vcl::Region& region);
sk_sp<SkImage> mergeCacheBitmaps(const SkiaSalBitmap& bitmap, const SkiaSalBitmap* alphaBitmap,
- const Size targetSize);
+ const Size& targetSize);
// Skia uses floating point coordinates, so when we use integer coordinates, sometimes
// rounding results in off-by-one errors (down), especially when drawing using GPU,