summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetbackingstore.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QWidgetBackingStore: Fix build with QT_NO_OPENGLAndy Nichols2016-07-111-0/+2
| | | | | | | A define moved out of the #ifndef QT_NO_OPENGL scope. Change-Id: I41c943b97f165b5171581e01f3a4b2d3fb25747e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-07-011-2/+16
|\ | | | | | | | | | | | | | | Conflicts: configure configure.json Change-Id: Iba032d9a29c273da2585632bc6e22bbafb961808
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-291-2/+16
| |\ | | | | | | | | | Change-Id: If6ba05867e7c98159e1b94ff71923e8b36bdbccb
| | * Avoid artifacts when hiding or closing a QOpenGLWidget or QQuickWidget childLaszlo Agocs2016-06-281-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | windows and xcb enables SwitchableWidgetComposition meaning that widget backing stores will fall back to the normal flush path when no render-to-texture widgets are visible anymore in the window. This switch however can lead to artifacts with the image of the rtt widget remaining visible until the next full bacinkgstore sync. The safe and simple way around this is to do the switch only in the next flush, keeping the flush where the switch is discovered on the OpenGL-based composition path still. Task-number: QTBUG-54241 Change-Id: I1d3f10999f69c58efa791dd724891add56949dee Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-131-1/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure mkspecs/features/uikit/sdk.prf src/corelib/global/qhooks.cpp src/corelib/io/qfilesystemwatcher.cpp src/corelib/io/qlockfile_unix.cpp src/corelib/tools/qalgorithms.h src/gui/kernel/qwindowsysteminterface.h src/gui/text/qtextdocument_p.cpp src/network/access/access.pri src/network/access/qnetworkaccessmanager.cpp src/network/access/qnetworkreplynsurlconnectionimpl.mm src/src.pro src/testlib/qtestcase.cpp src/widgets/kernel/qwidgetbackingstore_p.h src/widgets/styles/qwindowscestyle.cpp src/widgets/styles/qwindowsmobilestyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp tools/configure/configureapp.cpp Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-061-1/+21
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| | * Fix opaque texture-based widgets not being always shown.Alexandru Croitor2016-05-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever a regular QWidget contains a child render-to-texture widget (like a QOpenGLWidget) that is opaque (attribute Qt::WA_OpaquePaintEvent is set) and completely covers the parent geometry, the child widget would not be shown. This happens because QWidgetBackingStore::doSync contains a check to see if an opaque child completely covers its parent, in which case it does not draw the parent, and only draws the child. This is an issue if the widget is actually a texture-based one, because for it to be seen on screen, the parent widget has to be redrawn with a proper blending mask, so that the rtt widget gets properly composed into the place where the mask is. The fix consists in keeping the parent widget being marked dirty, in case it has an opaque texture-based child that completely covers it. This will force a redraw of the parent widget with a proper blending mask. Change-Id: If1feec04b86bff2c49158b8d72f175cec252dea1 Task-number: QTBUG-52123 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Add a workaround for render-to-texture widgets in fullscreen windowsLaszlo Agocs2016-05-231-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The performance optimization of falling back to flushing windows the normal (raster) way once no render-to-texture widgets are visible has issues with fullscreen windows, presumably due to the compositor's special handling of such windows. Disable our smartness and stick with composeAndFlush for ever in case the window is fullscreen. Change-Id: Ifb31e0d36bd0a3933fcfe55a9a7d502513d6e3cf Task-number: QTBUG-53515 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Remove QWidgetBackingStore::fullUpdatePendingAllan Sandfeld Jensen2016-06-091-19/+3
| | | | | | | | | | | | | | | | | | | | | This was no longer used and always false. Change-Id: I981055e6cc736cfe3432914c173c8b3edc31b46e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-03-221-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/common/wince/qplatformdefs.h src/plugins/platforms/directfb/qdirectfbbackingstore.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp Change-Id: Ied4d31264a9afca9514b51a7eb1494c28712793c
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-0/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| | * QtWidgets: includemocsMarc Mutz2016-03-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | A very simple way to save ~3KiB in test size and 440b in data size on GCC 5.3 Linux AMD64 release builds. Change-Id: I6619148cc497116b9772a00e1bc30d573a2b2534 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QtWidgets: use new QRegion::begin()/end() instead of rect()Marc Mutz2016-03-021-4/+3
|/ / | | | | | | | | | | | | Saves ~600b in text size on optimized GCC 5.3 Linux AMD64 builds. Change-Id: Ib542a128982fc53638780945014d903f2cbee9c3 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-181-22/+29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also reverts commit 018e670a26ff5a61b949100ae080f5e654e7bee8. The change was introduced in 5.6. After the refactoring, 14960f52, in 5.7 branch and a merge, it is not needed any more. Conflicts: .qmake.conf src/corelib/io/qstandardpaths_mac.mm src/corelib/tools/qsharedpointer_impl.h tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
| * Merge remote-tracking branch 'origin/5.6.0' into 5.6Liang Qi2016-02-151-22/+29
| |\ | | | | | | | | | Change-Id: I0b190005377a23a91da3563428e223b8a3b18333
| | * Fix widget texture list locking to avoid animation issues on eglfsLaszlo Agocs2016-01-281-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidgetBackingStore::sync() has two variants. The widget texture list logic was only present in one of them. This led to problems on eglfs in cases when the other variant got invoked. (for instance using the scroll area in the qopenglwidget example) eglfs relies on the texture lists's lock status to properly serialize its somewhat asynchronous built-in compositing mechanism and therefore is the only platform affected. The patch moves the code to be invoked from both sync() variants. Task-number: QTBUG-50668 Change-Id: I4c62987b7bb3cc40f98a4e94447368d2f740dbfd Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-2/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * | Reduce allocations by using reserve()Sérgio Martins2016-02-071-2/+4
| |/ | | | | | | | | Change-Id: If34fa53402985f6b3c5e7217bce4a1177af835b6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-11/+15
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| * QtWidgets: Improve native and top-level OpenGL widget performanceBłażej Szczygieł2016-01-181-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 7c6625b105511191f739d07dc658094ff6f682ac native OpenGL widgets are able to render, but performance is very low. It also slows down rendering for top-level OpenGL widgets. Render-to-texture widgets prevent triggering unnecessary backingstore painting when only the OpenGL content changes. This patch makes possible to use that feature for native and top-level widgets by calling "markDirtyOnScreen()" function only when necessary. This patch also prevents native and top-level OpenGL widgets from flickering during resizing. Task-number: QTBUG-50381 Task-number: QTBUG-49620 Change-Id: I0c16ea644fb869a00772fd74e1709611e627bff3 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-181-1/+25
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * QWidgetBackingStore::markDirty(): Clamp dirty region to window size.Friedemann Kleint2015-12-111-1/+5
| | | | | | | | | | | | | | | | | | Graphics effects may exceed the window size, causing platform backing store operations to fail (see QWidgetPrivate::effectiveRectFor()). Task-number: QTBUG-49785 Change-Id: Iff16da599397d19acb86010fe7023f3ce15b6d6f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Reduce flushes with repaint() when GL-based compositing is activeLaszlo Agocs2015-12-091-0/+20
| | | | | | | | | | | | Task-number: QTBUG-49655 Change-Id: I7a5d08f681a7d87709aac745154730764040e922 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-021-1/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| * Avoid dynamic switching between backingstore composition pathsLaszlo Agocs2015-12-011-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it opt-in because doing a normal backingstore flush does not seem to work on Cocoa once we use OpenGL on the window. Windows and Linux should be able to cope with this. This means that platforms outside Windows and Linux will continue to have the problem of having GL-based compositing enabled for ever after having a QOpenGL/QuickWidget shown in the window once, but the issue is most prevalent on Windows anyway, OS X machines can deal with OpenGL better in general. Task-number: QTBUG-49172 Change-Id: I30fd2efa95cc4f6eed9cf7f7613d0750355c775c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-11-271-0/+13
|\| | | | | | | Change-Id: Ib43c6f126998eefcfed9a7c1f2bcbac8b4dd05ec
| * Reduce the number of paint events for QOpenGLWidgetLaszlo Agocs2015-11-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to other widgets in the window, especially special cases like moving dock widgets around, trigger an unfortunately high number of paint events and calls to paintGL(). Let's try to avoid this. There is no need to send out a paint event to a texture-backed widget when it was not explicitly dirtied. Overlaps won't matter since such widgets are not part of the backingstore. Everything else has to work like ordinary widgets, though, it is only the QPaintEvent sending we can optimize away, nothing else. Task-number: QTBUG-49466 Change-Id: I8ef294ba0a6c305d0002a80e85c06db2c2501cf8 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * Fix no-opengl build for texture backed widgetsLaszlo Agocs2015-11-231-0/+10
| | | | | | | | | | | | | | | | | | | | The recent changes added a widgetTexturesFor() helper function. There has to be a dummy version of this for -no-opengl builds because QPlatformTextureList is not available in such builds at all, meaning the real function is not suitable outside !QT_NO_OPENGL. Change-Id: Ib108b1804f539796631b1927de89937236781d2a Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | QtWidgets: use Q_UNLIKELY for every qWarning() (2)Marc Mutz2015-11-251-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qWarning(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. This change contains the changes to the accessible/, effects/, kernel/, styles/ and itemviews/ subdirs. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In QWidgetPrivate::setWindowModified_helper(), as a drive-by, I swapped the evaluation order of an &&-expression (newly wrapped in Q_UNLIKELY) to be more readable and more efficient (cheaper check first) at the same time. In qDraw* (qdrawutil.cpp), simplified boolean expressions (sometimes by skipping re-checking conditions already checked in a previous guard clause). Change-Id: I58be22be0a33522c2629a66c2f6c795771a99f3f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Support mixing native child widgets with texture-based onesLaszlo Agocs2015-11-191-77/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devTimur Pocheptsov2015-08-091-2/+2
|\
| * Fix the internal compositing flag for QOpenGL/QuickWidgetLaszlo Agocs2015-07-281-2/+2
| | | | | | | | | | | | | | | | Compositing stays active for the window even when all such widgets get destroyed. Task-number: QTBUG-46937 Change-Id: Ib4acc90689151fd7de234806c4b5c0c472c13a5c Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Fix a memory leakTimur Pocheptsov2015-08-061-2/+1
|/ | | | | | | | | | We create dirtyOnScreenWidgets even if QT_NO_OPENGL is defined, but dtor deletes this object only if no QT_NO_OPENGL is defined. Also, copy ctor/assignment operator must be disabled for such a class. Task-number: QTBUG-47499 Change-Id: I9f8b5721ff6324fa7b28b715af68d0a5496c5eb5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Avoid QWidget dependency in QtGuiLaszlo Agocs2015-06-011-1/+1
| | | | | | | | It's not a real dependency as all we need is to store a pointer, but better not to use the name QWidget at all. Change-Id: I30ef1dd44ac7e42c1b9c84675f94088b8c516076 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Clip QOpenGLWidget and QQuickWidget correctlyLaszlo Agocs2015-06-011-1/+2
| | | | | | | | | | | | | Introduce support for the widgets' clipRect(). Right now render-to-texture widgets in scroll areas placed close to each other result in broken (non-existent) clipping. Similarly, stack-on-top widgets fail to clip when placed inside a scroll area. This is now corrected and the qopenglwidget example is enhanced to utilize a scroll area. Task-number: QTBUG-45860 Change-Id: I859a63d61a50d64ba9e87244f83c5969dce12337 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Avoid leaking the QPlatformTextureListLaszlo Agocs2015-04-081-0/+1
| | | | | | Task-number: QTBUG-45395 Change-Id: I8fbdc5136d7d15b9c131d6b91186a1bf2645e4d4 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-031-2/+2
| | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-181-18/+13
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/platformsupport/platformcompositor/qopenglcompositor.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I5422868500be695584a496dbbbc719d146bc572d
| * Prevent continuous painting with viewport QOpenGLWidgetLaszlo Agocs2014-12-181-18/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the source widget to the texture list (may be null for custom compositor implementations that add textures not belonging to actual widgets). This allows us to do proper checks with the dirtyRenderToTextureWidgets list. As a result paint events are only sent to a QOpenGLWidget if (1) there was an update() for it or (2) it was actually marked dirty. (2) was previously behaving differently: the widget got a paint event when anything in the window has changed. This is fine for naive animating OpenGL code but less ideal for QGraphicsView. Bool properties like stacksOnTop are now stored in a flags value to prevent future explosion of texture list fields and parameters. Task-number: QTBUG-43178 Change-Id: I48cbcf93df72ac682c9b5d64982a8b648fe21ef3 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-241-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * Fix QWidget::scroll during paintingAllan Sandfeld Jensen2014-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | Calling scroll during painting fails in cases where the scroll is attempted accelerated. This is easily fixed by not using accelerated scrolling during painting. Task-number: QTBUG-41615 Change-Id: I38d2428d5679c242f13d53793a3dc3b8e01b538f Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-1/+6
|\| | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * Fix losing dirty state when calling update() from paintGL()Laszlo Agocs2014-09-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | When the paint for the QOpenGLWidget was in invoked on the fast path, where only that widget was dirty, the resetWidget call after sending the paint event removed the widget from the dirty list, making it impossible to schedule an update during the event handling. The correct way is to clean the list and then send the paint events. Change-Id: Icdad5686ded7944fd1c8af56496f725e163a60e6 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QWidgetBackingStore: simplify reading of an env-var in {move,scroll}Rect()Marc Mutz2014-10-021-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of initializing accelEnv to -1 (thus forcing the variable into the data segment), and then overwriting the -1 with a read from the env-var, dynamically initialize the variable from the env-var directly, thus allowing the variable back into the bss segment (which doesn't occupy storage in the executable). There may have been a reason to do it this way when the old code could fail due to the memory allocation involved, but now with qEnvironmentVariableIntValue(), that is no longer a reason. Change-Id: I619fe45d8eb2a50515f5fb255cabd23a5966b11e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | QWidgetBackingStore: use qEnvironmentVariableIntValue()Marc Mutz2014-10-021-6/+6
|/ | | | | | | | It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I7efe6124ab78092f05ef4296e37bd0d123deb064 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix no-opengl buildLaszlo Agocs2014-09-011-0/+5
| | | | | | Change-Id: I577bd5d10e52571c95c9e646327264cf95ac6eb1 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Support QOpenGLWidget and QQuickWidget on AndroidLaszlo Agocs2014-08-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | It gets somewhat complicated due to the fact that a RasterGLSurface window (i.e. any widget window since 5.3) may behave either like an OpenGLSurface or a RasterSurface, and the expected behavior may change on each backingstore sync. This does not fit designs where the platform window implementation is separated and there is different behavior for raster and GL windows. Therefore QAndroidPlatformOpenGLWindow is now made capable of behaving like the raster one, based on a flag communicated from the widget stack via QWindowPrivate (since the plugin knows nothing about widgets). This means that widget windows that do not have renderToTexture children (QOpenGLWidget, QQuickWidget) will go through the raster path, while the ones that have will behave like an OpenGL window with the actual rendering happening in QPlatformBackingStore::composeAndFlush(). The surface type is RasterGLSurface in both cases nonetheless. Task-number: QTBUG-37907 Change-Id: I6f9261fc0fd993afcda7f30d379c5410069033d3 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>