Don't render widget to backing store if its parent has graphics effect
If widget parent has graphics effect, it can't render directly to the backing store, because the backing store needs to be updated from the parents effect drawing instead of the widget drawing. Pick-to: 6.2 5.15 Fixes: QTBUG-96240 Change-Id: Ib9b55547f9e5538f32837ec9df45d29fa68d7c1b Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
8662fbdd7e
commit
378ff29b29
|
|
@ -801,6 +801,18 @@ bool QWidgetRepaintManager::syncAllowed()
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool isDrawnInEffect(const QWidget *w)
|
||||
{
|
||||
#if QT_CONFIG(graphicseffect)
|
||||
do {
|
||||
if (w->graphicsEffect())
|
||||
return true;
|
||||
w = w->parentWidget();
|
||||
} while (w);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
void QWidgetRepaintManager::paintAndFlush()
|
||||
{
|
||||
qCInfo(lcWidgetPainting) << "Painting and flushing dirty"
|
||||
|
|
@ -888,7 +900,8 @@ void QWidgetRepaintManager::paintAndFlush()
|
|||
}
|
||||
#endif
|
||||
|
||||
if (!hasDirtySiblingsAbove && wd->isOpaque && !dirty.intersects(widgetDirty.boundingRect())) {
|
||||
if (!isDrawnInEffect(w) && !hasDirtySiblingsAbove && wd->isOpaque
|
||||
&& !dirty.intersects(widgetDirty.boundingRect())) {
|
||||
opaqueNonOverlappedWidgets.append(w);
|
||||
} else {
|
||||
resetWidget(w);
|
||||
|
|
|
|||
Loading…
Reference in New Issue