xcb: support more visual formats
Change-Id: I03e0fc5fdfbd7ce478ebc4b0ae8e72d57450bc51 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This commit is contained in:
parent
7b46cad5c9
commit
eae6298202
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user