From 3b1cb25eb026e3a85d616df0b9ed20d508468694 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 12 Jan 2021 14:27:38 +0100 Subject: Fix VNC format conversion Pass the right from depth to the conversion function, and set the right format before creating the compositor image for RGB16 support. Fixes: QTBUG-85621 Change-Id: I76f46a3c2d8f1d2b040b790035dbdb0a960ff1a7 Reviewed-by: Andy Nichols Reviewed-by: Eirik Aavitsland (cherry picked from commit 47c6b5b91e0d1271075d98ded5aa7a25296b5ee3) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/vnc/qvncclient.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/plugins/platforms/vnc/qvncclient.cpp') diff --git a/src/plugins/platforms/vnc/qvncclient.cpp b/src/plugins/platforms/vnc/qvncclient.cpp index ba0ef90891..3d0c1e48c3 100644 --- a/src/plugins/platforms/vnc/qvncclient.cpp +++ b/src/plugins/platforms/vnc/qvncclient.cpp @@ -97,10 +97,8 @@ void QVncClient::setDirty(const QRegion ®ion) } } -void QVncClient::convertPixels(char *dst, const char *src, int count) const +void QVncClient::convertPixels(char *dst, const char *src, int count, int screendepth) const { - const int screendepth = m_server->screen()->depth(); - // cutoffs #if Q_BYTE_ORDER == Q_BIG_ENDIAN if (!m_swapBytes) -- cgit v1.2.3