vcl/skia/gdiimpl.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 025a49a40a3c0c1be5bf4383e87a1cc60014b7f4
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Dec 31 11:45:27 2023 +0600
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sun Dec 31 08:36:35 2023 +0100

    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.kagan...@collabora.com>

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,

Reply via email to