Fix QXcbScreen::format() when rgb-swap is needed
QXcbScreen::format() was producing console warning and returning invalid format if rgb-swap was necessary. Let it match possibly reversed formats since the backing-store will swizzle it anyway. Change-Id: I6a53cb8ceda029e9d708d25ad635832f1163ffe7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
daa39f8499
commit
635b5115c4
@ -583,7 +583,9 @@ QRect QXcbScreen::availableGeometry() const
|
||||
QImage::Format QXcbScreen::format() const
|
||||
{
|
||||
QImage::Format format;
|
||||
qt_xcb_imageFormatForVisual(connection(), screen()->root_depth, visualForId(screen()->root_visual), &format);
|
||||
bool needsRgbSwap;
|
||||
qt_xcb_imageFormatForVisual(connection(), screen()->root_depth, visualForId(screen()->root_visual), &format, &needsRgbSwap);
|
||||
// We are ignoring needsRgbSwap here and just assumes the backing-store will handle it.
|
||||
return format;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user