wayland: Fix updating pixel data from translucent client buffers when using qpainter backend

We must set QPainter::CompositionMode_Source to overwrite the old
contents.
This commit is contained in:
Vlad Zahorodnii 2022-12-19 18:15:00 +00:00
parent 977016b743
commit 4e2e9ab78a

View file

@ -43,6 +43,7 @@ void QPainterSurfaceTextureWayland::update(const QRegion &region)
const QImage image = buffer->data();
const QRegion dirtyRegion = mapRegion(m_pixmap->item()->surfaceToBufferMatrix(), region);
QPainter painter(&m_image);
painter.setCompositionMode(QPainter::CompositionMode_Source);
// The buffer data is copied as the buffer interface returns a QImage
// which doesn't own the data of the underlying wl_shm_buffer object.