diff options
author | Mihai Varga <mihai.varga@collabora.com> | 2015-11-30 12:58:41 +0200 |
---|---|---|
committer | Mihai Varga <mihai.varga@collabora.com> | 2015-11-30 12:58:41 +0200 |
commit | e1b0e3dce92d66a258570c011ed171454119e4b3 (patch) | |
tree | 0ba6d0a594bda061eb85c43474afd17c466ed9f2 | |
parent | loleaflet: renderfont command handler (diff) | |
download | online-e1b0e3dce92d66a258570c011ed171454119e4b3.tar.gz online-e1b0e3dce92d66a258570c011ed171454119e4b3.zip |
loolwsd: update renderFont png encoding
-rw-r--r-- | loolwsd/LOOLSession.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp index b0ef846a00..9708131b56 100644 --- a/loolwsd/LOOLSession.cpp +++ b/loolwsd/LOOLSession.cpp @@ -1117,17 +1117,16 @@ void ChildProcessSession::sendFontRendering(const char* /*buffer*/, int /*length pixmap = _loKitDocument->pClass->renderFont(_loKitDocument, decodedFont.c_str(), &width, &height); std::cout << Util::logPrefix() << "renderFont called, font[" << font << "] rendered in " << double(timestamp.elapsed())/1000 << "ms" << std::endl; - if (pixmap != NULL) { - if (!Util::encodePNGAndAppendToBuffer(pixmap, width, height, output)) + if (pixmap != nullptr) { + if (!Util::encodePNGAndAppendToBuffer(pixmap, width, height, output, LOK_TILEMODE_RGBA)) { sendTextFrame("error: cmd=renderfont kind=failure"); delete[] pixmap; return; } + delete[] pixmap; } - delete[] pixmap; - sendBinaryFrame(output.data(), output.size()); } |