[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - kit/ChildSession.cpp
Jan Holesovsky
kendy at collabora.com
Fri Dec 15 16:12:21 UTC 2017
kit/ChildSession.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit f189881aa1058d630bf3e4c6a0e407fe17a5e0fe
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Dec 15 17:08:00 2017 +0100
lokdialog: Fix RGBA vs. BGRA confusion.
Change-Id: I42ce8f46ab09e9b6684ace0627323a013831c571
Reviewed-on: https://gerrit.libreoffice.org/46563
Reviewed-by: pranavk <pranavk at collabora.co.uk>
Tested-by: pranavk <pranavk at collabora.co.uk>
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 326dabcd..530c5d98 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -447,7 +447,9 @@ bool ChildSession::sendFontRendering(const char* /*buffer*/, int /*length*/, con
return sendTextFrame(output.data(), output.size());
}
- if (Png::encodeBufferToPNG(ptrFont, width, height, output, LOK_TILEMODE_RGBA))
+ const auto mode = static_cast<LibreOfficeKitTileMode>(getLOKitDocument()->getTileMode());
+
+ if (Png::encodeBufferToPNG(ptrFont, width, height, output, mode))
{
bSuccess = sendTextFrame(output.data(), output.size());
}
@@ -999,8 +1001,10 @@ bool ChildSession::renderWindow(const char* /*buffer*/, int /*length*/, const st
output.resize(response.size());
std::memcpy(output.data(), response.data(), response.size());
+ const auto mode = static_cast<LibreOfficeKitTileMode>(getLOKitDocument()->getTileMode());
+
// TODO: use png cache for dialogs too
- if (!Png::encodeSubBufferToPNG(pixmap.data(), 0, 0, width, height, bufferWidth, bufferHeight, output, LOK_TILEMODE_RGBA))
+ if (!Png::encodeSubBufferToPNG(pixmap.data(), 0, 0, width, height, bufferWidth, bufferHeight, output, mode))
{
LOG_ERR("Failed to encode into PNG.");
return false;
More information about the Libreoffice-commits
mailing list