Blob Blame History Raw
From 7e9002c2a206f0c041e6437fbcfe478bab0664d6 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.co.uk>
Date: Tue, 24 Nov 2015 11:54:24 +0100
Subject: [PATCH 357/398] desktop: fix LOK_DEBUG rectangle painting

(cherry picked from commit fa377a06627bba0c995aae55b346bb9530ecdf7e)

Change-Id: If023e409fad6fed8c0345a66ea48c1ed9924bff0
---
 desktop/source/lib/init.cxx | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 4630ed0095b4..57bb177f49db 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -922,18 +922,6 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
     pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
                     nTilePosX, nTilePosY, nTileWidth, nTileHeight);
 
-    // Overwrite pBuffer's alpha channel with the separate alpha buffer.
-    for (int nRow = 0; nRow < nCanvasHeight; ++nRow)
-    {
-        for (int nCol = 0; nCol < nCanvasWidth; ++nCol)
-        {
-            const int nOffset = (nCanvasWidth * nRow) + nCol;
-            // VCL's transparent is 0, RGBA's transparent is 0xff.
-            pBuffer[nOffset * 4 +3] = 0xff - aAlpha[nOffset];
-        }
-    }
-#endif
-
     static bool bDebug = getenv("LOK_DEBUG") != 0;
     if (bDebug)
     {
@@ -947,6 +935,18 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
         pDevice->Pop();
     }
 
+    // Overwrite pBuffer's alpha channel with the separate alpha buffer.
+    for (int nRow = 0; nRow < nCanvasHeight; ++nRow)
+    {
+        for (int nCol = 0; nCol < nCanvasWidth; ++nCol)
+        {
+            const int nOffset = (nCanvasWidth * nRow) + nCol;
+            // VCL's transparent is 0, RGBA's transparent is 0xff.
+            pBuffer[nOffset * 4 +3] = 0xff - aAlpha[nOffset];
+        }
+    }
+#endif
+
 #else
     (void) pBuffer;
     (void) nCanvasWidth;
-- 
2.12.0