QNX: Fix clearing transparent buffer

Testing whether alphaBufferSize() != 0 does not work, because when no alpha
channel is present, alphaBufferSize() can return '-1', which will cause
non-transparent windows to be  wrongly cleared and an artifact will appear.

Change-Id: Id9e985f105c0bb302cc6f53960a5dbae2acdb921
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
This commit is contained in:
Rafael Roquetto 2014-05-26 18:26:45 -03:00 committed by The Qt Project
parent 64de8fb29d
commit 6bd8c3742e

View File

@ -170,7 +170,7 @@ void QQnxRasterBackingStore::beginPaint(const QRegion &region)
platformWindow()->adjustBufferSize();
if (window()->requestedFormat().alphaBufferSize() != 0) {
if (window()->requestedFormat().alphaBufferSize() > 0) {
foreach (const QRect &r, region.rects()) {
// Clear transparent regions
const int bg[] = {