aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/scenegraph
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Un-crash image comparison testsFriedemann Kleint2018-12-201-3/+7
| | | | | | | | | | | | When (naively) running the tests with High-DPI scaling active, the test would assert on mismatching image sizes caused by the scaling. Add an error message parameter to QQuickVisualTestUtil::compareImages() for use with QVERIFY2, return false instead of asserting on format/size mismatches and adapt the usages. Remove duplicate code in tst_qquickwindow. Change-Id: I76564f4125798fa1e065a0202b686bc7f5ec5680 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-2/+2
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tests: Wrap qWaitForWindow{Active,Exposed} in QVERIFYv5.11.0-beta1Kari Oikarinen2018-02-231-4/+4
| | | | | | | | | | | The functions are marked Q_REQUIRED_RESULT, so they give compilation warnings when not handling the bool return value. Failing the test early at an unexpected event is also better behavior anyway. Task-number: QTBUG-66559 Change-Id: I6c4db29379ec01528208c3e4ee54346b4230616c Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Enable tests for boot2qtSami Nurmenniemi2017-09-211-40/+57
| | | | | | | | | | | | | | Some tests needed fixing - Disabled tests too heavy for qemu - Skipped tests requiring OpenGL without support from the platform - Skipped tests requiring functionality on broken offscreen platform - Skipped tests that take too long on qemu + software renderer - Blacklisted tests for created bugs QTBUG-63049, QTBUG-63053 QTBUG-63055 and QTBUG-63057 Task-number: QTBUG-60268 Change-Id: I0346b0e436cf286d7d9cbc140acf324a4087cfb9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-7/+7
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-091-26/+20
|\ | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlcomponent.cpp tests/auto/quick/scenegraph/tst_scenegraph.cpp Change-Id: Ibc811b95a57f175ca53337db7bbd1f575a745937
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-051-26/+20
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.h Change-Id: I1e6a9424e7f87d9e4ac1ea387ec70e151106f1c7
| | * autotests: fix finding data files when not in CWDDavid Faure2016-08-031-26/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests now can find their data files even when running from a different directory than the source directory, and they no longer misuse QUrl::fromLocalFile for a relative URL (resolved with QUrl::resolved). Change-Id: If18afd2e29571cca2a4c820eda6b9f6713e08a92 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Stabilize tst_SceneGraph::createTextureFromImageFrederik Gladhorn2016-07-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test would crash half the time on my laptop due to the scene graph not being initialized and then returning a nullptr for the texture. At that point texture->hasAlphaChannel() crashes. Change-Id: I9220d9bd6abe6381752c26335f2b60fa8d2adccf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Change graphicsAPI to graphicsApiLaszlo Agocs2016-06-011-2/+2
| | | | | | | | | | | | | | | Change-Id: I065f17abd1cb71cd8d6ead76abf7a544eb7a99c0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | D3D12: Fix a buffer sync issue and fix up tst_scenegraphLaszlo Agocs2016-05-081-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the manyWindows test passes now which is excellent. Complex render / bug fix tests are skipped for now due to them doing GL specific stuff no reasonable to investigate for now. createTextureFromImage() gets its scenegraph-valid condition fixed as well. Change-Id: Ie72da127e7f219f3c3d024e9f896d1617d06ab85 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-05-072-38/+5
|\ \ \ | | | | | | | | | | | | Change-Id: Ifb69f73ac805afe5e3c8708fa975b7d3c13a4e48
| * | | Introduce BorderImageMesh.Michael Brasser2016-05-062-38/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BorderImageMesh provides an optimized way to use BorderImage-type images with ShaderEffect. [ChangeLog][QtQuick][ShaderEffect] Add new mesh type BorderImageMesh. BorderImageMesh provides an optimized way to use BorderImage-type images with ShaderEffect. Change-Id: I73bdc8318a0facba6edc2634b5f4614996b39c1b Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* / / Get tests building when QT_NO_OPENGL is definedAndy Nichols2016-05-061-5/+15
|/ / | | | | | | | | Change-Id: I36f9e5e916b59657990d7613850ba76d2489a21e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-2017-289/+204
| | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-031-1/+0
|/ | | | | Change-Id: I691b8ddff60b5f16f06d32b379c76e87f44f84a9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Add QQuickWindow::TextureIsOpaque as option to createTextureFromImage.Gunnar Sletta2015-06-151-0/+31
| | | | | | | | | | | | | | | | Opaque textures can be a lot faster, so give this option without forcing the user to reimplement her/his own QSGTexture class. The old behavior was that createTextureFromImage() disregarded TextureHasAlphaChannel and looked solely at the image's format. To keep this behavior intact, we introduce a second opt-in flag to switch textures from auto-detect to false, namely TextureIsOpaque. [ChangeLog][QtQuick][QQuickWindow] Add TextureIsOpaque option to createTextureFromImage() Change-Id: I248db4bc5f7920864b6aa8d831ce24d23ad370ef Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Enable mipmap test on all platforms, except early Mesa.Gunnar Sletta2015-05-131-8/+11
| | | | | Change-Id: Ib6e17755cdb281de164c9eb79c3b0eeca391c291 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Include the scenegraph autotest in the testrun.Gunnar Sletta2015-03-274-12/+62
| | | | | | | | | | | The mipmap test has been updated to work on chips without npot, but because it is failing in ci on some linux machines, we keep it enabled for OSX and windows only. The test also includes a dump of GPU capabilities to aid in debugging. Change-Id: Ief3092b8e0502bea06aaf4a20c03b7edfa0b2403 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-2/+2
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * Verify context creation in Quick tests.Friedemann Kleint2015-01-291-2/+2
| | | | | | | | | | | | | | | | Verify initialization steps and initialize pointers to avoid crashes. Change-Id: I2d3a53c6719727aed56e673d0d8cf5a02ae0f0f6 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-1217-116/+116
|/ | | | | | | | | 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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2517-320/+184
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Speed up the test a bit..Gunnar Sletta2014-08-042-27/+58
| | | | | | | | | Using hundreds of thousands of Items works, but it takes its toll, so use a custom item to allocate QSGNodes directly which are instantanous. Change-Id: Iee5d8495b3d7d5abd24c14a53b2327e5efe9523b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix opacity issue in the renderer.Gunnar Sletta2014-06-052-4/+95
| | | | | | | | | | | | | | | | | | | | | | Given the following tree: OpacityNode | TransformNode (which is a batch root) | GeometryNode If both opacity and transform nodes were changed this frame, we would hit the optimized "scrolling" path while traversing the tree and abort updating that subtree. As a result the opacity change was not propegated to the geometry node and it would be rendered incorrectly. Fix this by skipping the optimized path when there are opacity changes in an ancestor. Task-number: QTBUG-39190 Change-Id: Ieaebfe3de62b961204bd3103fe9913d60e75e412 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Invalidate all batches potentially affected by a change.Gunnar Sletta2014-03-192-0/+104
| | | | | | | | | | | | When two separate changes have occurred, we need to not only invalidate the batches directly overlapping those, but also any batch which has render orders between the two. So, keep track of the range of invalidated render orders and invalidate everything in between. Task-number: QTBUG-37422 Change-Id: Ie5a289d5c569b84917ec9ac52671173c566e69b3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Stabilize tst_qquickwindow and tst_scenegraph.Gunnar Sletta2014-03-171-1/+1
| | | | | Change-Id: I6f1b6c0ed86869149658e3ce07545217ce9797a7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make sure we update filtering options on atlas textures.Gunnar Sletta2014-02-214-1/+76
| | | | | | | | | | | We had had an optimization which tried to reduce state changes, but filtering is also changed in QSGTexture::updateBindOptions which Atlas::bind() didn't know anything about. Solution: don't try to be so clever. Task-number: QTBUG-35457 Change-Id: I39ac0106396921e1b652db2b2aa5a9923b35e825 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Add Image::mipmap to support mipmapping of images.Gunnar Sletta2014-02-124-0/+78
| | | | | | | | | [ChangeLog][QtQuick] New feature: Image.mipmap Task-number: QTBUG-19961 Change-Id: I13acb2408d5b126790adaf9d324ad4beda1e3646 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Safeguard QQuickWindow::hide() against other GL contexts.Gunnar Sletta2013-12-123-1/+98
| | | | | | | | | If another GL context is bound to another surface on the GUI thread, we can run into issues while cleaning up the SG nodes. Task-number: QTBUG-34898 Change-Id: Ifa02b7cdbc7ab38b3a149a21452cc5071498a7d1 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix stacking order bug in the rendererGunnar Sletta2013-11-152-0/+66
| | | | | | | | | | Since we are sorting batches based on the zorder of the first element it is crucial that we don't continue adding to batches once an overlap with a compatible element is found. Task-number: QTBUG-34864 Change-Id: Ic2194c5c17bba0bc9874a14e8a69c81bff75bd1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid using huge floating point values in the renderer.Gunnar Sletta2013-11-093-0/+112
| | | | | | | | | | | | We pretransform vertices relative to their batch root and upload these using single-precision floats. If the offsets are huge then the floating point numbers start to get unstable and we get rendering artifacts as a result. This typically happens for lists/tables with huge models. Task-number: QTBUG-34312 Change-Id: I2516f2b4fa93f44a1288659d05458fb1af0df943 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Say hello to the scene graph sanity-tests for renderingGunnar Sletta2013-11-016-0/+646
| | | | | Change-Id: I5d975735b0975f284b8aee15541f208e3deb704f Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Added private API for enabling sharing between the QQuickwindow instances.Gunnar Sletta2013-11-011-13/+40
| | | | | | | | This API is primarily a hook which is needed by the Qt WebEngine to set up sharing with the scene graph's OpenGL contexts. Change-Id: I5bb03abd9ab99f502db8e413fe838a8b30365b8d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Use one render loop per QQuickWindowGunnar Sletta2013-10-308-0/+443
See the task for the full reasoning behind this patch. The threaded renderloop has been refactored to have one window per thread. This is mostly a simplification of the current code path where for loops over multiple windows are turned into if (window). The QSGContext has been split into two classes, QSGRenderContext for which there is one per OpenGLContext. The rest of the patch is name changes and a couple of cleanups in the hopes of simplifying this change. Task-number: QTBUG-33993 Change-Id: I31c81f9694d7da7474a72333169be38de62613c4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>