[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>
This commit is contained in:
parent
5a060a5ad3
commit
5883b6a22c
@ -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 ®ion)
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user