Windows: avoid generating exposes on plain moves
The fake expose generation for shrunk windows is causing side effects with desktop GL: it will generate expose events even when only moving the window. This is bad. So change the condition to look for shrinking and do nothing if the size is same as before. This is reported to cause perf issues with e.g. QOpenGLWindow or similar where an expose does an immediate repaint (potentially with block swap). Task-number: QTBUG-32121 Change-Id: I4687ea8210cee6691d608450c48b1dbef52d6df3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>bb10
parent
6a081125a5
commit
91d6aafad4
|
|
@ -1394,7 +1394,7 @@ void QWindowsWindow::handleGeometryChange()
|
|||
// QTBUG-32121: OpenGL/normal windows (with exception of ANGLE) do not receive
|
||||
// expose events when shrinking, synthesize.
|
||||
if (!testFlag(OpenGL_ES2) && isExposed()
|
||||
&& !(m_data.geometry.width() > previousGeometry.width() || m_data.geometry.height() > previousGeometry.height())) {
|
||||
&& !(m_data.geometry.width() >= previousGeometry.width() || m_data.geometry.height() >= previousGeometry.height())) {
|
||||
fireExpose(QRect(QPoint(0, 0), m_data.geometry.size()), true);
|
||||
}
|
||||
if (previousGeometry.topLeft() != m_data.geometry.topLeft()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue