[blitter] Work on tst_QPixmap::clear()
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>
Mon, 26 Sep 2011 17:02:57 +0000 (19:02 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 21 Oct 2011 14:54:45 +0000 (16:54 +0200)
commitab50b60f5cc237d5620f3ff3b2eb44c857f8f60b
tree3544d8230009ad680587582ce1bbacd519aa9f5d
parent6a7da1fb581da17d9408f755387a7798336176ae
[blitter] Work on tst_QPixmap::clear()

By default QPixmap may not hasAlphaChannel(), only if setMask()
or fill() with a transparent color is called a QPixmap will
hasAlphaChannel().

Make the QBlittablePlatformPixmap remember if there is an alpha
channel, pass this as parameter in createBlittable to make it
clear that this is required and not optional.

Update the DirectFB plugin to handle this parameter to create a
RGB32 or ARGB Surface depending on the alpha value, also only use
PreMultiplied alpha when using ARGB. Separate the two constructors
for the QDirectFbBlitter to either adopt a DirectFB Surface or to
create one.

Change-Id: I8abf82408ecd2d075fc6f241ace8be2a34ac56e7
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
src/gui/image/qpixmap_blitter.cpp
src/gui/image/qpixmap_blitter_p.h
src/plugins/platforms/directfb/qdirectfbblitter.cpp
src/plugins/platforms/directfb/qdirectfbblitter.h