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

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