diff options
author | Andrzej Hunt <andrzej@ahunt.org> | 2015-11-10 19:45:13 +0100 |
---|---|---|
committer | Andrzej Hunt <andrzej@ahunt.org> | 2015-11-11 08:08:27 +0000 |
commit | 9125dbaf5db5bfb07f93be2cfedf43452a28ae32 (patch) | |
tree | 6a738f0915e274746690123107ca67a0d740027f | |
parent | 11129d89b152db54c86bb2bda58c24b8abb6c5a8 (diff) |
sd lok: ccu#1295 force async image swap
This helps ensure that images are swapped in when we actually
render tiles. Previously we'd sometimes have placeholders
instead of the image, which results in either an invalidate
(+rerender of that tile) once the image is swapped in (for
normal tiles) or a permanently missing image in the preview tiles.
Change-Id: I1a16a913faf9fad20e40a5d1aad3de187038c7a2
Reviewed-on: https://gerrit.libreoffice.org/19890
Reviewed-by: Andrzej Hunt <andrzej@ahunt.org>
Tested-by: Andrzej Hunt <andrzej@ahunt.org>
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 896ba6c37e55..f064a38d3a45 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2370,14 +2370,21 @@ void SdXImpressDocument::initializeForTiledRendering() mpDoc->setTiledRendering(true); - // Disable map mode, so that it's possible to send mouse event coordinates - // in logic units. if (DrawViewShell* pViewShell = GetViewShell()) { + // Disable map mode, so that it's possible to send mouse event coordinates + // in logic units. if (sd::Window* pWindow = pViewShell->GetActiveWindow()) { pWindow->EnableMapMode(false); } + + // Forces all images to be swapped in synchronously, this + // ensures that images are available when paintTile is called + // (whereas with async loading images start being loaded after + // we have painted the tile, resulting in an invalidate, followed + // by the tile being rerendered - which is wasteful and ugly). + pViewShell->GetDrawView()->SetSwapAsynchron(false); } // tdf#93154: in tiled rendering LO doesn't always detect changes SvtMiscOptions aMiscOpt; |