diff options
author | Louai Al-Khanji <louai.al-khanji@theqtcompany.com> | 2016-03-02 13:17:43 -0800 |
---|---|---|
committer | Louai Al-Khanji <louai.al-khanji@theqtcompany.com> | 2016-03-04 21:40:55 +0000 |
commit | eae6298202f7f258c18ff88949f07c82654b9f3d (patch) | |
tree | 85c4f48dad66e3df0ff259e69f8c37a2790097e5 /src/plugins/platforms/xcb | |
parent | 7b46cad5c944bf0b3fdde89e3cd736e0756569c6 (diff) |
xcb: support more visual formats
Change-Id: I03e0fc5fdfbd7ce478ebc4b0ae8e72d57450bc51
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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; |