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

New commits:
commit 439f487d14ce4afaa25b8aa23cf954ae2ddaeb26
Author:     Patrick Luby <plub...@neooffice.org>
AuthorDate: Thu Sep 21 20:20:33 2023 -0400
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Sep 27 14:10:40 2023 +0200

    tdf#157312 Don't change priority
    
    Instances of this class are constructed with
    TaskPriority::POST_PAINT, but then it was set to
    TaskPriority::HIGHEST when reused. Flushing
    seems to be expensive (at least with Skia/Metal) so keep the
    existing priority when reused.
    
    Change-Id: Ieb40cd6122f543f76e66456cc92a8643e2320d73
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157162
    Tested-by: Jenkins
    Reviewed-by: Patrick Luby <plub...@neooffice.org>
    (cherry picked from commit daa4a29c993df2e137b222ac3e60aa4b417a2d2d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157123
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index dbe64f3e0d10..7a240600be98 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -254,7 +254,13 @@ public:
     {
         mpGraphics->performFlush();
         Stop();
-        SetPriority(TaskPriority::HIGHEST);
+        // tdf#157312 Don't change priority
+        // Instances of this class are constructed with
+        // TaskPriority::POST_PAINT, but then it was set to
+        // TaskPriority::HIGHEST when reused. Flushing
+        // seems to be expensive (at least with Skia/Metal) so keep the
+        // existing priority when reused.
+        SetPriority(TaskPriority::POST_PAINT);
     }
 };
 

Reply via email to