From eae6298202f7f258c18ff88949f07c82654b9f3d Mon Sep 17 00:00:00 2001 From: Louai Al-Khanji Date: Wed, 2 Mar 2016 13:17:43 -0800 Subject: xcb: support more visual formats Change-Id: I03e0fc5fdfbd7ce478ebc4b0ae8e72d57450bc51 Reviewed-by: Lars Knoll --- src/plugins/platforms/xcb/qxcbwindow.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 11202944bd..6ac28684a8 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -201,6 +201,20 @@ static inline QImage::Format imageFormatForVisual(int depth, quint32 red_mask, q case 16: if (blue_mask == 0x1f) return QImage::Format_RGB16; + if (red_mask == 0x1f) { + if (rgbSwap) + *rgbSwap = true; + return QImage::Format_RGB16; + } + break; + case 15: + if (blue_mask == 0x1f) + return QImage::Format_RGB555; + if (red_mask == 0x1f) { + if (rgbSwap) + *rgbSwap = true; + return QImage::Format_RGB555; + } break; default: break; -- cgit v1.2.3