vcl/source/animate/AnimationRenderer.cxx |   34 +++++++++++++++----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 168b24b76a886cc0633fd7fcbb90c77d2a4d628c
Author:     Christopher Sherlock <[email protected]>
AuthorDate: Sun Feb 23 18:47:40 2025 +1100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Tue Sep 2 07:48:19 2025 +0200

    vcl: flatten AnimationRenderer::draw()
    
    Change-Id: I05b717cefe1686b65bf26d17adbc45e2a4bee8e8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182060
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/source/animate/AnimationRenderer.cxx 
b/vcl/source/animate/AnimationRenderer.cxx
index 757566688a3a..71d0dbf6fbab 100644
--- a/vcl/source/animate/AnimationRenderer.cxx
+++ b/vcl/source/animate/AnimationRenderer.cxx
@@ -276,28 +276,28 @@ void AnimationRenderer::draw( sal_uLong nIndex, 
VirtualDevice* pVDev )
 
     pDev->DrawBitmapEx( aBmpPosPix, aBmpSizePix, rAnimationFrame.maBitmap );
 
-    if( !pVDev )
-    {
-        std::optional<vcl::Region> xOldClip;
-        if (!maClip.IsNull())
-            xOldClip = pRenderContext->GetClipRegion();
+    if (pVDev)
+        return;
 
-        if (xOldClip)
-            pRenderContext->SetClipRegion( maClip );
+    std::optional<vcl::Region> xOldClip;
+    if (!maClip.IsNull())
+        xOldClip = pRenderContext->GetClipRegion();
 
-        pRenderContext->DrawOutDev( maDispPt, maDispSz, Point(), maSizePx, 
*pDev );
-        if (pGuard)
-            pGuard->SetPaintRect(tools::Rectangle(maDispPt, maDispSz));
+    if (xOldClip)
+        pRenderContext->SetClipRegion( maClip );
 
-        if( xOldClip)
-        {
-            pRenderContext->SetClipRegion(*xOldClip);
-            xOldClip.reset();
-        }
+    pRenderContext->DrawOutDev( maDispPt, maDispSz, Point(), maSizePx, *pDev );
+    if (pGuard)
+        pGuard->SetPaintRect(tools::Rectangle(maDispPt, maDispSz));
 
-        pDev.disposeAndClear();
-        pRenderContext->Flush();
+    if( xOldClip)
+    {
+        pRenderContext->SetClipRegion(*xOldClip);
+        xOldClip.reset();
     }
+
+    pDev.disposeAndClear();
+    pRenderContext->Flush();
 }
 
 void AnimationRenderer::repaint()

Reply via email to