Commit eae62982 authored by Louai Al-Khanji's avatar Louai Al-Khanji
Browse files

xcb: support more visual formats


Change-Id: I03e0fc5fdfbd7ce478ebc4b0ae8e72d57450bc51
Reviewed-by: default avatarLars Knoll <lars.knoll@theqtcompany.com>
Showing with 14 additions and 0 deletions
...@@ -201,6 +201,20 @@ static inline QImage::Format imageFormatForVisual(int depth, quint32 red_mask, q ...@@ -201,6 +201,20 @@ static inline QImage::Format imageFormatForVisual(int depth, quint32 red_mask, q
case 16: case 16:
if (blue_mask == 0x1f) if (blue_mask == 0x1f)
return QImage::Format_RGB16; 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; break;
default: default:
break; break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment