sw/source/core/layout/paintfrm.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit facdda16ad14d321c5675874f838a3cd5f6cdd6f
Author:     Skyler Grey <skyler.g...@collabora.com>
AuthorDate: Mon Jul 29 08:00:47 2024 +0000
Commit:     Skyler Grey <skyler.g...@collabora.com>
CommitDate: Tue Jul 30 09:24:09 2024 +0200

    fix: Skip invalidation if it won't go through
    
    On Android, we often hit this condition where we should get an
    invalidation. Unfortunately, the invalidation is skipped due to being in
    LOK Tiled Painting, leaving us to deal with whatever tile was rendered
    on this go-around...
    
    ...Also because of this condition, the tile rendered here is broken.
    pFrame->PaintSwFrame is never called, leading to a tile which renders
    without things like its text. Normally, this wouldn't be a problem as
    it's about to get invalidated, and is more of a nice performance
    optimization...
    
    ...However given we don't invalidate it, we really see that tile without
    any text. Similar workarounds were considered (such as skipping the
    condition in another case that appears to be true on Android or
    rendering the tile anyway, even if we're about to invalidate it) but
    this seems to be the safest bet to avoid something like this happening
    on other platforms...
    
    ...The true solution is still elusive. It probably includes figuring out
    why this happens on Android without happening on other platforms, and
    fixing that, as well as perhaps figuring out what to do about this
    condition if we *do* genuinely trigger it on Android - as the previous
    solution of invalidating everything nearby won't work
    
    Change-Id: Id58f5bae8ae357d116c5f2345e88ec3364cb2172
    Fixes: https://github.com/CollaboraOnline/online/issues/9654
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170853
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index b96c378185c7..60edc56aafb5 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3765,6 +3765,7 @@ void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& 
rRenderContext, SwRect cons
         if ( rRect.Overlaps( aPaintRect ) )
         {
             if ( bCnt && pFrame->IsCompletePaint() &&
+                 !(comphelper::LibreOfficeKit::isActive() && 
comphelper::LibreOfficeKit::isTiledPainting()) &&
                  !rRect.Contains( aPaintRect ) && Application::AnyInput( 
VclInputFlags::KEYBOARD ) )
             {
                 //fix(8104): It may happen, that the processing wasn't complete

Reply via email to