Blame SOURCES/0357-desktop-fix-LOK_DEBUG-rectangle-painting.patch

135360
From 7e9002c2a206f0c041e6437fbcfe478bab0664d6 Mon Sep 17 00:00:00 2001
135360
From: Miklos Vajna <vmiklos@collabora.co.uk>
135360
Date: Tue, 24 Nov 2015 11:54:24 +0100
135360
Subject: [PATCH 357/398] desktop: fix LOK_DEBUG rectangle painting
135360
135360
(cherry picked from commit fa377a06627bba0c995aae55b346bb9530ecdf7e)
135360
135360
Change-Id: If023e409fad6fed8c0345a66ea48c1ed9924bff0
135360
---
135360
 desktop/source/lib/init.cxx | 24 ++++++++++++------------
135360
 1 file changed, 12 insertions(+), 12 deletions(-)
135360
135360
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
135360
index 4630ed0095b4..57bb177f49db 100644
135360
--- a/desktop/source/lib/init.cxx
135360
+++ b/desktop/source/lib/init.cxx
135360
@@ -922,18 +922,6 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
135360
     pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
135360
                     nTilePosX, nTilePosY, nTileWidth, nTileHeight);
135360
 
135360
-    // Overwrite pBuffer's alpha channel with the separate alpha buffer.
135360
-    for (int nRow = 0; nRow < nCanvasHeight; ++nRow)
135360
-    {
135360
-        for (int nCol = 0; nCol < nCanvasWidth; ++nCol)
135360
-        {
135360
-            const int nOffset = (nCanvasWidth * nRow) + nCol;
135360
-            // VCL's transparent is 0, RGBA's transparent is 0xff.
135360
-            pBuffer[nOffset * 4 +3] = 0xff - aAlpha[nOffset];
135360
-        }
135360
-    }
135360
-#endif
135360
-
135360
     static bool bDebug = getenv("LOK_DEBUG") != 0;
135360
     if (bDebug)
135360
     {
135360
@@ -947,6 +935,18 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
135360
         pDevice->Pop();
135360
     }
135360
 
135360
+    // Overwrite pBuffer's alpha channel with the separate alpha buffer.
135360
+    for (int nRow = 0; nRow < nCanvasHeight; ++nRow)
135360
+    {
135360
+        for (int nCol = 0; nCol < nCanvasWidth; ++nCol)
135360
+        {
135360
+            const int nOffset = (nCanvasWidth * nRow) + nCol;
135360
+            // VCL's transparent is 0, RGBA's transparent is 0xff.
135360
+            pBuffer[nOffset * 4 +3] = 0xff - aAlpha[nOffset];
135360
+        }
135360
+    }
135360
+#endif
135360
+
135360
 #else
135360
     (void) pBuffer;
135360
     (void) nCanvasWidth;
135360
-- 
135360
2.12.0
135360