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

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