QWaylandShmBackingStore: Clear in beginPaint based on surface format
It's the surface format that matters not the backing image format. Now that QWaylandShmWindow sets a proper QSurfaceFormat, we can actually check it. Change-Id: Ia17a9f06cd335b6e8f6989051bc9d0cef9bfe3f3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
dfed8e3c3d
commit
732ea4faca
@ -196,7 +196,7 @@ void QWaylandShmBackingStore::beginPaint(const QRegion ®ion)
|
||||
// Although undocumented, QBackingStore::beginPaint expects the painted region
|
||||
// to be cleared before use if the window has a surface format with an alpha.
|
||||
// Fresh QWaylandShmBuffer are already cleared, so we don't need to clear those.
|
||||
if (!bufferWasRecreated && mBackBuffer->image()->hasAlphaChannel()) {
|
||||
if (!bufferWasRecreated && window()->format().hasAlpha()) {
|
||||
QPainter p(paintDevice());
|
||||
p.setCompositionMode(QPainter::CompositionMode_Source);
|
||||
const QColor blank = Qt::transparent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user