Kaydet (Commit) 9125dbaf authored tarafından Andrzej Hunt's avatar Andrzej Hunt

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/19890Reviewed-by: 's avatarAndrzej Hunt <andrzej@ahunt.org>
Tested-by: 's avatarAndrzej Hunt <andrzej@ahunt.org>
üst 11129d89
...@@ -2370,14 +2370,21 @@ void SdXImpressDocument::initializeForTiledRendering() ...@@ -2370,14 +2370,21 @@ void SdXImpressDocument::initializeForTiledRendering()
mpDoc->setTiledRendering(true); mpDoc->setTiledRendering(true);
// Disable map mode, so that it's possible to send mouse event coordinates
// in logic units.
if (DrawViewShell* pViewShell = GetViewShell()) 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()) if (sd::Window* pWindow = pViewShell->GetActiveWindow())
{ {
pWindow->EnableMapMode(false); 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 // tdf#93154: in tiled rendering LO doesn't always detect changes
SvtMiscOptions aMiscOpt; SvtMiscOptions aMiscOpt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment