vcl/source/outdev/outdev.cxx |   49 ++++++++++++++-----------------------------
 1 file changed, 17 insertions(+), 32 deletions(-)

New commits:
commit fb149c68db909e6ec17520e277583ed759a0d49a
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed May 20 16:03:23 2020 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Wed May 20 21:19:14 2020 +0200

    Simplify the logic
    
    Change-Id: I722ca67189d9ca3061b544335cd2ca22a35a5011
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94461
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 0dcdd84a5d0a..fe06032d7ca0 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -431,42 +431,27 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, 
const Size& rDestSize,
     if ( mbOutputClipped )
         return;
 
-    SalTwoRect aPosAry(rOutDev.ImplLogicXToDevicePixel(rSrcPt.X()),
-                       rOutDev.ImplLogicYToDevicePixel(rSrcPt.Y()),
-                       rOutDev.ImplLogicWidthToDevicePixel(rSrcSize.Width()),
-                       rOutDev.ImplLogicHeightToDevicePixel(rSrcSize.Height()),
-                       ImplLogicXToDevicePixel(rDestPt.X()),
-                       ImplLogicYToDevicePixel(rDestPt.Y()),
-                       ImplLogicWidthToDevicePixel(rDestSize.Width()),
-                       ImplLogicHeightToDevicePixel(rDestSize.Height()));
-
-    if( mpAlphaVDev )
+    if (rOutDev.mpAlphaVDev)
     {
-        if( rOutDev.mpAlphaVDev )
-        {
-            // alpha-blend source over destination
-            DrawBitmapEx( rDestPt, rDestSize, rOutDev.GetBitmapEx(rSrcPt, 
rSrcSize) );
-        }
-        else
-        {
-            drawOutDevDirect( &rOutDev, aPosAry );
-
-            // #i32109#: make destination rectangle opaque - source has no 
alpha
-            mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, 
rDestSize) );
-        }
+        // alpha-blend source over destination
+        DrawBitmapEx(rDestPt, rDestSize, rOutDev.GetBitmapEx(rSrcPt, 
rSrcSize));
     }
     else
     {
-        if( rOutDev.mpAlphaVDev )
-        {
-            // alpha-blend source over destination
-            DrawBitmapEx( rDestPt, rDestSize, rOutDev.GetBitmapEx(rSrcPt, 
rSrcSize) );
-        }
-        else
-        {
-            // no alpha at all, neither in source nor destination device
-            drawOutDevDirect( &rOutDev, aPosAry );
-        }
+        SalTwoRect aPosAry(rOutDev.ImplLogicXToDevicePixel(rSrcPt.X()),
+                           rOutDev.ImplLogicYToDevicePixel(rSrcPt.Y()),
+                           
rOutDev.ImplLogicWidthToDevicePixel(rSrcSize.Width()),
+                           
rOutDev.ImplLogicHeightToDevicePixel(rSrcSize.Height()),
+                           ImplLogicXToDevicePixel(rDestPt.X()),
+                           ImplLogicYToDevicePixel(rDestPt.Y()),
+                           ImplLogicWidthToDevicePixel(rDestSize.Width()),
+                           ImplLogicHeightToDevicePixel(rDestSize.Height()));
+
+        drawOutDevDirect(&rOutDev, aPosAry);
+
+        // #i32109#: make destination rectangle opaque - source has no alpha
+        if (mpAlphaVDev)
+            mpAlphaVDev->ImplFillOpaqueRectangle(tools::Rectangle(rDestPt, 
rDestSize));
     }
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to