qt5base-lts/tests/auto/widgets
Laszlo Agocs 7c6625b105 Support mixing native child widgets with texture-based ones
Currently QOpenGLWidget and QQuickWidget do not support having native
child widgets inside the same top-level window. In some cases this is
inevitable, f.ex. multimedia may require native windows when used from
widget apps. winId() calls made for various (valid or invalid) reasons
are also problematic.

There are no blockers for supporting this setup, however. By storing
multiple texture lists (one for each subtree where the root is a
native widget), adding the missing markDirtyOnScreen calls, letting
each native widget access the correct texture list (i.e. the one
corresponding to its children) when they are (separately) flushed, and
fixing composeAndFlush() to take the update region and the (native
child) offset into account, it can all be made functional.

The change also fixes the issue of keeping GL-based compositing
enabled even after all render-to-texture widgets in the window become
hidden. Due to the changes of how such widgets are gathered,
composeAndFlush() is not invoked anymore when no such widgets are
discovered for a given native parent. This is great since having
compositing enabled infinitely is an issue for applications like Qt
Creator that implement certain views with QQuickWidgets but cannot
afford the cost of texture uploads in other places (e.g. for the text
editor) on slower machines.

The openglwidget manual test is greatly enhanced to test various
situations (MDI, scroll areas, tab widgets, QOpenGLWidget as native
child, QOpenGLWidget with non-tlw native parent, etc.)

Task-number: QTBUG-48130
Task-number: QTBUG-49172
Change-Id: Iad098359c8bcf749f01c050da0853415e1550eda
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-11-19 13:56:52 +00:00
..
dialogs Blacklist tst_qfontdialog::setFont on RHEL 6.6 2015-11-13 20:31:55 +00:00
effects tests/auto/widgets: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 11:50:10 +00:00
gestures Merge remote-tracking branch 'origin/5.5' into dev 2015-07-01 11:05:26 +02:00
graphicsview Tests: Harmonize code checking on platform name. 2015-09-24 07:49:30 +00:00
itemviews tests: remove use of obsolete QStyleOption*V<N> 2015-11-03 16:11:51 +00:00
kernel xcb: Add support for Qt::WA_ShowWithoutActivating 2015-10-08 07:11:06 +00:00
styles tests: remove use of obsolete QStyleOption*V<N> 2015-11-03 16:11:51 +00:00
util Merge remote-tracking branch 'origin/5.5' into 5.6 2015-10-02 16:59:55 +02:00
widgets Support mixing native child widgets with texture-based ones 2015-11-19 13:56:52 +00:00
widgets.pro Add autotest for QGestureRecognizer. 2014-10-23 21:11:28 +02:00