Translucent background support
Change-Id: I6e7b5869097f579020c7a4439441a63a0771e955 Task-number: QTBUG-55956 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
fa4d3dec37
commit
a92a519e79
@ -171,12 +171,20 @@ QPaintDevice *QWaylandShmBackingStore::paintDevice()
|
||||
return contentSurface();
|
||||
}
|
||||
|
||||
void QWaylandShmBackingStore::beginPaint(const QRegion &)
|
||||
void QWaylandShmBackingStore::beginPaint(const QRegion ®ion)
|
||||
{
|
||||
mPainting = true;
|
||||
ensureSize();
|
||||
|
||||
waylandWindow()->setCanResize(false);
|
||||
|
||||
if (mBackBuffer->image()->hasAlphaChannel()) {
|
||||
QPainter p(paintDevice());
|
||||
p.setCompositionMode(QPainter::CompositionMode_Source);
|
||||
const QColor blank = Qt::transparent;
|
||||
for (const QRect &rect : region)
|
||||
p.fillRect(rect, blank);
|
||||
}
|
||||
}
|
||||
|
||||
void QWaylandShmBackingStore::endPaint()
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) override;
|
||||
void resize(const QSize &size, const QRegion &staticContents) override;
|
||||
void resize(const QSize &size);
|
||||
void beginPaint(const QRegion &) override;
|
||||
void beginPaint(const QRegion ®ion) override;
|
||||
void endPaint() override;
|
||||
|
||||
QWaylandAbstractDecoration *windowDecoration() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user