Fixed broken window surface flush when depth is 24 and bpp is not 32.
authorSamuel Rødal <samuel.rodal@nokia.com>
Wed, 28 Sep 2011 13:22:56 +0000 (15:22 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Thu, 29 Sep 2011 11:24:12 +0000 (13:24 +0200)
commitb56dbaf5b3247bd8e87e4e856ad845593755c10c
tree7f46a8449105db476e7dfc7496a552ff805552cd
parentfef5d7b0cbfba93ca108ce9f0785826c0a4ff829
Fixed broken window surface flush when depth is 24 and bpp is not 32.

Some X servers use a compact representation of 24 depth visuals. In that
case we can't use the shared memory or XPutImage paths, as Qt's RGB32
does not match the internal memory layout.

Also fixed QPixmap::fromImage() to work in this case to prevent the red
and blue channels from being swapped.

Task-number: QTBUG-21754
Reviewed-by: Alberto Mardegan
src/gui/image/qnativeimage.cpp
src/gui/image/qpixmap_x11.cpp
src/gui/kernel/qapplication_x11.cpp
src/gui/kernel/qt_x11_p.h
src/gui/painting/qwindowsurface_raster.cpp