summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Holzammer <andreas.holzammer@kdab.com>2014-04-29 19:16:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-12 17:30:57 +0200
commit5883b6a22c7a484d2fed032d0c51f240f0ef9cd0 (patch)
tree343e15152ec6fb122532cb5bf47048df1ffbd3f1 /src
parent5a060a5ad322629f1a1ee0c850db94932543fee5 (diff)
[QNX]Clear transparent regions
If a region gets painted the buffer beneath needs to be cleared, as it could be that there are leftovers from the last blit. Change-Id: I51f19aa010015059e9a6d9d5e5e4f25fb9532d4e Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
index 57914cf2fb..3109388fb2 100644
--- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
+++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp
@@ -41,6 +41,8 @@
#include "qqnxrasterbackingstore.h"
#include "qqnxrasterwindow.h"
+#include "qqnxscreen.h"
+#include "qqnxglobal.h"
#include <QtCore/QDebug>
@@ -167,6 +169,25 @@ void QQnxRasterBackingStore::beginPaint(const QRegion &region)
m_hasUnflushedPaintOperations = true;
platformWindow()->adjustBufferSize();
+
+ if (window()->requestedFormat().alphaBufferSize() != 0) {
+ foreach (const QRect &r, region.rects()) {
+ // Clear transparent regions
+ const int bg[] = {
+ SCREEN_BLIT_COLOR, 0x00000000,
+ SCREEN_BLIT_DESTINATION_X, r.x(),
+ SCREEN_BLIT_DESTINATION_Y, r.y(),
+ SCREEN_BLIT_DESTINATION_WIDTH, r.width(),
+ SCREEN_BLIT_DESTINATION_HEIGHT, r.height(),
+ SCREEN_BLIT_END
+ };
+ Q_SCREEN_CHECKERROR(screen_fill(platformWindow()->screen()->nativeContext(),
+ platformWindow()->renderBuffer().nativeBuffer(), bg),
+ "failed to clear transparent regions");
+ }
+ Q_SCREEN_CHECKERROR(screen_flush_blits(platformWindow()->screen()->nativeContext(), 0),
+ "failed to flush blits");
+ }
}
void QQnxRasterBackingStore::endPaint()