summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-03-15 16:56:07 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-03-16 12:55:33 +0100
commit96007832dd3d800ca781c9ef12904b178adb61f1 (patch)
treec94cddbd81b580c9c2455e0ceb4796a47a8b9652 /vcl/inc
parent98fbedf9e59ba5b6159abfbc85c05c00ceab5b90 (diff)
don't repeatedly create (alpha)SkImage on mEraseColorSet
Change-Id: Iac42ead2bfd5a2b7f245cc44634f675a559d86ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112543 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/skia/utils.hxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx
index 3baa749adb8b..716bd3e2471c 100644
--- a/vcl/inc/skia/utils.hxx
+++ b/vcl/inc/skia/utils.hxx
@@ -67,6 +67,8 @@ VCL_DLLPUBLIC sk_sp<SkImage> makeCheckedImageSnapshot(sk_sp<SkSurface> surface);
VCL_DLLPUBLIC sk_sp<SkImage> makeCheckedImageSnapshot(sk_sp<SkSurface> surface,
const SkIRect& bounds);
+inline Size imageSize(const sk_sp<SkImage>& image) { return Size(image->width(), image->height()); }
+
// Must be called in any VCL backend before any Skia functionality is used.
// If not set, Skia will be disabled.
VCL_DLLPUBLIC void