summaryrefslogtreecommitdiff
path: root/vcl/inc/skia
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-04-03 10:50:58 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-04-07 11:52:58 +0200
commitfafc059a17416502722622ff52f38a3e4acd7998 (patch)
tree3ffd78fb8868271229d201780235ca33f4951f81 /vcl/inc/skia
parentc27d2e9145be8972e5d2174fb3f317dc08930074 (diff)
avoid Skia bitmap->image pixel copying in raster mode
SkImage::MakeFromBitmap() shares the pixels instead of copying, so in raster mode this saves some work. Change-Id: I89aa86c269c4b4f24e305dec390ae0f80e2537da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91769 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/inc/skia')
-rw-r--r--vcl/inc/skia/utils.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx
index c1f35e812d00..16e5addd6909 100644
--- a/vcl/inc/skia/utils.hxx
+++ b/vcl/inc/skia/utils.hxx
@@ -43,6 +43,9 @@ inline sk_sp<SkSurface> createSkSurface(const Size& size, SkColorType type = kN3
return createSkSurface(size.Width(), size.Height(), type);
}
+// Create SkImage, GPU-backed if possible.
+VCL_DLLPUBLIC sk_sp<SkImage> createSkImage(const SkBitmap& bitmap);
+
// Must be called in any VCL backend before any Skia functionality is used.
// If not set, Skia will be disabled.
VCL_DLLPUBLIC void