kit/ChildSession.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 2ef04a64460971d410080b3e8120b9675d6a781e Author: Jan Holesovsky <[email protected]> Date: Fri Dec 15 17:08:00 2017 +0100 lokdialog: Fix RGBA vs. BGRA confusion. Change-Id: I42ce8f46ab09e9b6684ace0627323a013831c571 Reviewed-on: https://gerrit.libreoffice.org/46564 Reviewed-by: Jan Holesovsky <[email protected]> Tested-by: Jan Holesovsky <[email protected]> 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; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
