summaryrefslogtreecommitdiff
path: root/vcl/skia
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-12-31 11:45:27 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2023-12-31 08:36:35 +0100
commit025a49a40a3c0c1be5bf4383e87a1cc60014b7f4 (patch)
treed535ede29a6737dc9c347b35d36ff84d998991d5 /vcl/skia
parentac481d5df48c9db1f662903af52a5dd50bbe66df (diff)
tdf#158942: renderMethodToUseForSize may force raster surface
Maybe there is a way to avoid this path for the situation of creating small raster surfaces like tooltips, but I have no clue how to do it. Change-Id: I5ab6ccad572e0efd682bf3ef850b68b6b1941537 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161460 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/skia')
-rw-r--r--vcl/skia/gdiimpl.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index e8ec52725392..d50f8fb60207 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -415,7 +415,10 @@ void SkiaSalGraphicsImpl::flushSurfaceToWindowContext()
// for every swapBuffers(), for this reason mSurface is an offscreen surface
// where we keep the contents (LO does not do full redraws).
// So here blit the surface to the window context surface and then swap it.
- assert(isGPU()); // Raster should always draw directly to backbuffer to save copying
+
+ // Raster should always draw directly to backbuffer to save copying
+ // except for small sizes - see renderMethodToUseForSize
+ assert(isGPU() || (mSurface->width() <= 32 && mSurface->height() <= 32));
SkPaint paint;
paint.setBlendMode(SkBlendMode::kSrc); // copy as is
// We ignore mDirtyRect here, and mSurface already is in screenSurface coordinates,