kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0301-sd-lok-ccu-1295-force-async-image-swap.patch

135360
From a181b9e9cf669742278668dc66d6296d506962cf Mon Sep 17 00:00:00 2001
135360
From: Andrzej Hunt <andrzej@ahunt.org>
135360
Date: Tue, 10 Nov 2015 19:45:13 +0100
135360
Subject: [PATCH 301/398] sd lok: ccu#1295 force async image swap
135360
135360
This helps ensure that images are swapped in when we actually
135360
render tiles. Previously we'd sometimes have placeholders
135360
instead of the image, which results in either an invalidate
135360
(+rerender of that tile) once the image is swapped in (for
135360
normal tiles) or a permanently missing image in the preview tiles.
135360
135360
Change-Id: I1a16a913faf9fad20e40a5d1aad3de187038c7a2
135360
Reviewed-on: https://gerrit.libreoffice.org/19890
135360
Reviewed-by: Andrzej Hunt <andrzej@ahunt.org>
135360
Tested-by: Andrzej Hunt <andrzej@ahunt.org>
135360
(cherry picked from commit 9125dbaf5db5bfb07f93be2cfedf43452a28ae32)
135360
---
135360
 sd/source/ui/unoidl/unomodel.cxx | 11 +++++++++--
135360
 1 file changed, 9 insertions(+), 2 deletions(-)
135360
135360
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
135360
index d2c6b5e37603..9475ff56c505 100644
135360
--- a/sd/source/ui/unoidl/unomodel.cxx
135360
+++ b/sd/source/ui/unoidl/unomodel.cxx
135360
@@ -2380,14 +2380,21 @@ void SdXImpressDocument::initializeForTiledRendering()
135360
 
135360
     mpDoc->setTiledRendering(true);
135360
 
135360
-    // Disable map mode, so that it's possible to send mouse event coordinates
135360
-    // in logic units.
135360
     if (DrawViewShell* pViewShell = GetViewShell())
135360
     {
135360
+        // Disable map mode, so that it's possible to send mouse event coordinates
135360
+        // in logic units.
135360
         if (sd::Window* pWindow = pViewShell->GetActiveWindow())
135360
         {
135360
             pWindow->EnableMapMode(false);
135360
         }
135360
+
135360
+        // Forces all images to be swapped in synchronously, this
135360
+        // ensures that images are available when paintTile is called
135360
+        // (whereas with async loading images start being loaded after
135360
+        //  we have painted the tile, resulting in an invalidate, followed
135360
+        //  by the tile being rerendered - which is wasteful and ugly).
135360
+        pViewShell->GetDrawView()->SetSwapAsynchron(false);
135360
     }
135360
     // tdf#93154: in tiled rendering LO doesn't always detect changes
135360
     SvtMiscOptions aMiscOpt;
135360
-- 
135360
2.12.0
135360