aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Fix render loop warning about invalid geometry of exposed windows.Friedemann Kleint2015-05-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do the screen check only for toplevel windows and make warning more verbose. Change-Id: Ie25271fe34c72c1410022afe8a1a9bdccdf7a12f Task-number: QTCREATORBUG-10814 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | QtQuick: Fix const correctness in old style castsThiago Macieira2015-05-135-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c9589afabc7ade Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Create QOpenGLContext with the correct screenv5.5.0-beta1Jan Arne Petersen2015-05-021-0/+1
| | | | | | | | | | | | | | | Change-Id: I91169e719ac97b8e32805e08d6a1f43caa897f73 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Make it possible to grab() a window after it has been hidden.Gunnar Sletta2015-05-221-6/+7
| | | | | | | | | | | | | | | | | | | | | Windows render loop already had this capability. Change-Id: I9391e218568cb6951f9f25d74e732aa5ddf9b5bc Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Don't doneCurrent() on hide().Gunnar Sletta2015-05-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This hurts interoperability with OpenCL on windows and the other renderloops don't do it either, so to be consistent, lets not. Change-Id: Ie06842957561c8933690633469b8b3a026ff399b Task-number: QTBUG-46273 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-04-283-0/+12
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I075e742da8396a268d97d3ab34bcd9e0c0cf001f
| * | Fix a memory leak in the material shader cache.Robert Griebl2015-04-233-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were multiple problems in the implementation of the shader cache: 1) it was not thread-safe 2) nothing was ever removed from the hash 3) since the keys into the hash are the actual shader source code, problem #2 would lead to serious memory consumption over time Change-Id: I20d1fb2074932e23f89edddba12e68ab8adcbff0 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Add some timing breakdown to QSG_RENDERER_DEBUG=renderGunnar Sletta2015-04-281-1/+29
| | | | | | | | | | | | | | | Change-Id: Ic7ffb48c1a148036bdb14a912d3407e9a1b3b4fd Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-223-5/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlbinding.cpp src/qml/jsruntime/qv4arraybuffer.cpp src/qml/jsruntime/qv4functionobject.cpp Change-Id: Ic752e9dfd69b282093651c9234c110a49762f06d
| * | Fix regressed atlas texture log output. Broken since: a49b0ad786Gunnar Sletta2015-04-161-2/+2
| | | | | | | | | | | | | | | Change-Id: I5df32609b45047666ea8bde500cf771736c396e5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * | Make sure we have enough precision to run animations for years.Gunnar Sletta2015-04-161-3/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-45358 Change-Id: I4af0da937253f3ae578333c659dcbb132312a9cc Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * | Avoid running anims at 3x speed on WindowsLaszlo Agocs2015-04-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there is no render pending, renderWindow() is not called and so there is no blocking for vsync. Advancing the animations without any sleep is wrong in this case and results in animations running at 3x speed in case there is no change in the scenegraph contents. To solve this, import the threaded render loop's sleep call. Task-number: QTBUG-42699 Change-Id: I3658a827af12d4bc2ac05c7b0b29c65e9fc99675 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Added a new render job stage: NoStageMiikka Heikkinen2015-04-154-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NoStage allows scheduling jobs for immediate execution on the renderer thread. [ChangeLog][QtQuick][QQuickWindow] Added a render job stage: NoStage Task-number: QTBUG-44953 Change-Id: I918c79f1d095bc27d911a88d81376d146a04313c Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
* | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-135-12/+17
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/util/qquickpixmapcache.cpp tests/auto/quick/qquickwindow/BLACKLIST Change-Id: Ie81612f2884f8ea508c48ba2735ec54ea1c2eca5
| * | Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Liang Qi2015-04-012-7/+1
| |\ \
| | * | Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-312-7/+1
| | |\| | | | | | | | | | | | | Change-Id: I54e66e992f5e5d441b8b5394e7a03ec5352e7bf3
| | | * Don't send deferred delete events from windowDestroyed()Andy Shaw2015-03-302-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to 657766f19b31d83f361fd3c9ad717b207e1dff8c which removed it from the destructor itself. This goes one step further and removes the calls from the windowDestroyed() calls which also sends the deferred deletes. Task-number: QTBUG-40920 Change-Id: I491b79bb600914575ba5565d2862d041726217e8 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | | Android: Work around bug on Samsung Galaxy Tab 3 10.1Eskil Abrahamsen Blomfeldt2015-03-311-1/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After installing the Android 4.4.2 upgrade on Samsung Galaxy Tab 3 10.1, one of the vertex shaders in Qt Quick stopped compiling. The issue seems to be that this particular shader triggers a bug in the driver, and a simple work-around is to replace the ternary conditional operator with a simple if-statement. [ChangeLog][Android] Fixed a vertex shader compilation issue on certain OpenGL drivers. Change-Id: I2f878215a753a7e222c46c0f85a84b0bc81d523a Task-number: QTBUG-43515 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
| * | Update the shader when devicePixelRatio changesPaul Olav Tvete2015-03-271-1/+9
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-45076 Change-Id: I03de20da2e3f436339dcf48fc7d7d3d11a509577 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | Another fix to avoid detaching the m_windows list.Robert Griebl2015-03-251-3/+3
| | | | | | | | | | | | | | | | | | | | | Just like commit 310fd3ed, this fixes another unnecessary detach. Change-Id: I5108ea5112a4b0e877f86d06868375abb9a80409 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Address uninitialized scalar fieldsHolger Hans Peter Freyther2015-04-032-2/+16
| | | | | | | | | | | | | | | | | | | | | Fixes Coverity CID 10732, 10734, 10735, 10736, 10739, 10740 Change-Id: Idebb0bdaf42ceb06cd86c73592138e758a8a87c9 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Restore depth buffer usage when last render node is removedMikko Harju2015-03-181-0/+3
|/ / | | | | | | | | | | | | | | | | Adding a QSGRenderNode to the scene permanently disabled opaque batches by disabling depth buffer usage. Reset the depth buffer usage to the default value once last QSGRenderNode has been removed from the scene. Change-Id: I760afde83ae9eaaf1b5571c37fd0081eb23b1f20 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Handle context loss in the threaded render loopLaszlo Agocs2015-03-121-0/+14
| | | | | | | | | | Change-Id: I3f9219dd2fed15094c2f7d670a981406e601959b Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-033-2/+8
|\| | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4numberobject.cpp Change-Id: I4e66a03ef4d99cec192c9da30c028fd8c1f4ac0d
| * Fix crash in overdraw and change visualizersDaiwei Li2015-02-251-2/+2
| | | | | | | | | | | | | | | | It appears to be possible for node->element()->batch to be NULL Task-number: QTBUG-43129 Change-Id: If6e4e265a02ee305bf3aa9cad387b7a73648367a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Fix memory leak of QSGContext object in QSGThreadedRenderLoopjian liang2015-02-242-0/+6
| | | | | | | | | | | | | | Add destructor for QSGThreadedRenderLoop to destory QSGContext object. Change-Id: I479947eb35a5d7888d45655a9b8e2ece5e30bc33 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Use of fullsize distance field textures should be font-dependent.Michael Brasser2015-03-031-7/+1
| | | | | | | | | | | | | | | | | | | | This shouldn't be a static decision as the glyph count depends on the font. Change-Id: I67ea98595505df4a3a30b16e867e76f89b28c1ef Task-number: QTBUG-29264 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | QtQuick: Micro-optimize iterator loops.Friedemann Kleint2015-02-263-8/+12
| | | | | | | | | | | | | | Avoid repeated instantiation of end() in loops, use variable instead. Change-Id: I6ab1fe2b82406d5ee91710a0333587ffb82c04d4 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Optimize distance field construction.Michael Brasser2015-02-252-4/+13
| | | | | | | | | | | | | | | | | | | | Reduce the number of times we construct a painter path from a glyph. Change-Id: Ic1f32c78ab5dfd3b75d5442da163cda1dedab3ee Task-number: QTBUG-42853 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Allow glyph cache textures to be created at full size.Michael Brasser2015-02-252-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On embedded hardware, texture resizes can be quite slow. The glyph cache currently often needs to resize when new glyphs are added, and glyph additions are very frequent when using a language with a large set of glyphs (such as Chinese). The current glyph cache design minimizes the amount of memory used. When QSG_PREFER_FULLSIZE_GLYPHCACHE_TEXTURES is set, and we are using a font with a large number of glyphs, we can instead allocate max-sized textures. This leads to significantly less time when inserting glyphs into the cache (often incurred over a span of time), at the cost of higher initial memory and creation times (often incurred at application startup). Change-Id: Id1021b9d213e5f8635c4197b624474f28c6f44ff Task-number: QTBUG-29264 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-242-3/+20
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * Avoid sRGB usage when targeting an incapable FBOLaszlo Agocs2015-01-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Native text rendering results in very different output on OS X with QQuickWidget/QOpenGLWidget. When targeting an FBO, enabling sRGB is futile if the FBO was not created with the correct format. In this case we need to disable the usage of sRGB. Task-number: QTBUG-42861 Change-Id: I887482e70be2cbfba40d6758546128d03b36def1 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Scale mipmapped npot images when not supportedLaszlo Agocs2015-01-191-2/+11
| | | | | | | | | | | | | | Task-number: QTBUG-43847 Task-number: QTBUG-40789 Change-Id: Iceacaa49bafffb31752a9fb26c896df570153fec Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fix some qdoc-warnings.Friedemann Kleint2015-02-233-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | qtdeclarative/src/quick/scenegraph/coreapi/qsgmaterial.cpp:384: warning: Class RenderState has no \inmodule command; using project name by default: QtQuick qtdeclarative/src/quick/scenegraph/util/qsgsimplerectnode.cpp:39: warning: Class QSGSimpleRectNode has no \inmodule command; using project name by default: QtQuick qtdeclarative/src/quick/scenegraph/util/qsgtextureprovider.cpp:38: warning: Class QSGTextureProvider has no \inmodule command; using project name by default: QtQuick qtdeclarative/src/quick/items/qquickwindow.cpp:3156: warning: Cannot find 'closing(...)' in '\fn' void QQuickWindow::closing() qtdeclarative/src/quick/items/qquickwindow.h:160: warning: No documentation for 'QQuickWindow::closing()' qtdeclarative/src/quick/items/qquickwindow.cpp:3134: warning: Can't link to 'Window.closing()' qtdeclarative/src/qml/qml/qqmlfileselector.cpp:90: warning: Undocumented parameter 'parent' in QQmlFileSelector::QQmlFileSelector() Change-Id: I42cf1e06c9e7a63327acc470bd33a726acc69bfc Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Cleanup math function includes and usageAllan Sandfeld Jensen2015-02-191-1/+1
| | | | | | | | | | | | | | | | Use std::math on floats and doubles, and qMath on qreals, and only include the math headers actually needed. Change-Id: I1d511d7b1bac0050eaa947c7baee760b736858bf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Fixed license headersJani Heikkinen2015-02-172-2/+2
| | | | | | | | | | Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | Fix 590 inconsistent override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-131-17/+17
| | | | | | | | | | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Change-Id: Ieb899a3475b0c36ab20285740b2cec2cd1677a54 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-1284-614/+598
| | | | | | | | | | | | | | | | | | 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>
* | Remove unnecessary calls to initializeOpenGLFunctionsLaszlo Agocs2015-02-111-5/+2
| | | | | | | | | | | | | | | | We now have a change in QtGui that guarantees that the returned versionfunctions object is initialized as long as the context is current. Change-Id: I2e76e91bb4265a95fae657f6cacd92a789d56782 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Use correct QOpenGLFunctions objectBerthold Krevert2015-02-041-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | If core profile is used, QOpenGLContext::versionFunctions returns 0 if a legacy or a non-core profile version is requested. That means, when using core profile we have to request a QOpenGLFunctions_3_2_Core object (which is the lowest OpenGL version that comes with profiles). Otherwise the application would run into a segfault. Change-Id: I8119e5fbeafccf14d59680617172c71e60e188ce Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Move VAO binding to Renderer::render()Berthold Krevert2015-02-042-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Amongst other things, QSGRenderer::preprocess() triggers the rendering of QQuickShaderEffectSource items into framebuffer objects. The renderers responsible for these QQuickShaderEffectSource items bind and unbind their own VAOs, which messes up the VAO state set in QSGRenderer::preprocess(). Scenegraph nodes must not depend on the vao state set by the renderer anyway as the binding has to be considered as an implementation detail. Change-Id: Idec34c65397394e12e7f8419a1c9633d5f70a22e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Handle context lost in the Windows render loopLaszlo Agocs2015-02-031-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | With ANGLE (which always uses this loop) EGL_CONTEXT_LOST may happen quite often, depending on various factors. It is therefore good to handle this by tearing down and reinitializing the scenegraph. Task-number: QTBUG-43263 Change-Id: I8e985e001f46865ccd814255f39add58fe2a737a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Introduce QSG_TRANSIENT_IMAGES.Gunnar Sletta2015-02-031-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature enables the same feature that we already have in the 'nonpreservedtexture' in the scene graph playground. This change also cleans up some leftover logic from the early Qt 5.2 days when we had to manually extract the image from the default texture factory rather than going through QQuickWindow::createTexture(). This cleanup is required for the logic to work. Change-Id: I7cdf15d981ba8af94f8d51781fc01e2b834b77c6 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Release atlas texture's image instance once uploadedGunnar Sletta2015-02-032-14/+62
| | | | | | | | | | | | | | | | | | | | | | Sitting on the instance makes it impossible for custom texture factories to release images to keep down memory. Also, ditch the extra QRect used to store the nonpadded atlas rect as this is easily reachable from the padded one. Change-Id: I4914753cc43a6f3173cfc9b210e02b2770ef33fd Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Avoid crashes when resetting the same material or geometry.Gunnar Sletta2015-01-261-3/+3
| | | | | | | | | | | | | | | | | | We still need to call markDirty() though, to avoid changing behavior. Change-Id: I9df00e8d1cbe95bfae96b9ba9162bd6f226b5bdc Reviewed-by: Florian Hänel <florian.haenel@basyskom.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Drop trailing vertices in GL_LINES and GL_TRIANGLES drawing modes.Ulf Hermann2015-01-161-7/+28
| | | | | | | | | | | | | | | | This results in more correct behavior if you create nodes with a number of vertices that doesn't match the drawing mode. Change-Id: Ic0f59a4019a6b4087b527b7c9b38c35a9e02ece8 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2015-01-163-3/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4debugging.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject_p.h src/qml/jsruntime/qv4qobjectwrapper.cpp src/quick/scenegraph/shaders/visualization.frag tests/auto/qml/qjsengine/tst_qjsengine.cpp Change-Id: I492e8546c278f80a300a2129e9a29d861e144a30
| * Fix timing output from windows render loopLaszlo Agocs2015-01-111-1/+1
| | | | | | | | | | | | | | Print the frame time, not the total, and in milliseconds. Change-Id: Ia7fe3bea8efafcce475c49517d7adab1b3841729 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Fix the visualization of unmerged batch geometries without indexJocelyn Turcotte2014-12-092-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | indexData() is null for most QSGGeometryNodes subclasses in QtQuick, make sure that we draw using vertex array data in that case. The patch also increases the contrast of the line pattern, since it is almost invisible with brighter hue values, to make it easier to see which batches aren't merged. Change-Id: Ife7b26692ee318feb0810ee0e787289eb151ea8a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Clean up renderer visualization a bit.Gunnar Sletta2015-01-123-22/+18
| | | | | | | | | | | | | | | | | | viewport was currently unused and adreno 305 was confused by the tweak.w > 0.0 when the input was 0.0f, so write it in a slightly more straightforward manner. Change-Id: I101ff71dcb04ca531e91cc5522876d71f368cdc8 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>