Mark the entire widget dirty when changing flush paths
This augments 2a7cee47e5e84c73e32a6953e145771196645f1a Task-number: QTBUG-56534 Task-number: QTBUG-54241 Change-Id: I635478c43e353b0e435d3ac30e4cc608a5a2a6a5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
parent
ca5d4137aa
commit
694702e09d
@ -106,6 +106,7 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBack
|
|||||||
if (widget != tlw)
|
if (widget != tlw)
|
||||||
offset += widget->mapTo(tlw, QPoint());
|
offset += widget->mapTo(tlw, QPoint());
|
||||||
|
|
||||||
|
QRegion effectiveRegion = region;
|
||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
const bool compositionWasActive = widget->d_func()->renderToTextureComposeActive;
|
const bool compositionWasActive = widget->d_func()->renderToTextureComposeActive;
|
||||||
if (!widgetTextures) {
|
if (!widgetTextures) {
|
||||||
@ -119,6 +120,11 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBack
|
|||||||
} else {
|
} else {
|
||||||
widget->d_func()->renderToTextureComposeActive = true;
|
widget->d_func()->renderToTextureComposeActive = true;
|
||||||
}
|
}
|
||||||
|
// When changing the composition status, make sure the dirty region covers
|
||||||
|
// the entire widget. Just having e.g. the shown/hidden render-to-texture
|
||||||
|
// widget's area marked as dirty is incorrect when changing flush paths.
|
||||||
|
if (compositionWasActive != widget->d_func()->renderToTextureComposeActive)
|
||||||
|
effectiveRegion = widget->rect();
|
||||||
|
|
||||||
// re-test since we may have been forced to this path via the dummy texture list above
|
// re-test since we may have been forced to this path via the dummy texture list above
|
||||||
if (widgetTextures) {
|
if (widgetTextures) {
|
||||||
@ -130,12 +136,12 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBack
|
|||||||
const bool translucentBackground = widget->testAttribute(Qt::WA_TranslucentBackground);
|
const bool translucentBackground = widget->testAttribute(Qt::WA_TranslucentBackground);
|
||||||
// Use the tlw's context, not widget's. The difference is important with native child
|
// Use the tlw's context, not widget's. The difference is important with native child
|
||||||
// widgets where tlw != widget.
|
// widgets where tlw != widget.
|
||||||
backingStore->handle()->composeAndFlush(widget->windowHandle(), region, offset, widgetTextures,
|
backingStore->handle()->composeAndFlush(widget->windowHandle(), effectiveRegion, offset, widgetTextures,
|
||||||
tlw->d_func()->shareContext(), translucentBackground);
|
tlw->d_func()->shareContext(), translucentBackground);
|
||||||
widget->window()->d_func()->sendComposeStatus(widget->window(), true);
|
widget->window()->d_func()->sendComposeStatus(widget->window(), true);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
backingStore->flush(region, widget->windowHandle(), offset);
|
backingStore->flush(effectiveRegion, widget->windowHandle(), offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_PAINT_DEBUG
|
#ifndef QT_NO_PAINT_DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user