aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Document limits of QSGGeometry::setLineWidth5.4Kai Koehne2015-06-041-2/+8
| | | | | | Task-number: QTBUG-46260 Change-Id: Ib84a41da10d38391c3248a209a851f5b603d46b0 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* 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 the visualization of unmerged batch geometries without indexJocelyn Turcotte2014-12-091-1/+4
| | | | | | | | | | | | 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>
* Fix disappearing nodes when adding in two levels of batch rootEskil Abrahamsen Blomfeldt2014-11-041-6/+12
| | | | | | | | | | | | | | | | | | | | | | | When having e.g. a clip node inside another clip node and adding children to the innermost, we would get into the situation where we did a partial rebuild for the outermost root, but its available render order count would not be updated to reflect the change deeper down in the tree. Since the z range would be based on the outermost batch root's knowledge of the maximum render order in the tree, what would happen is that the z of the rendered nodes would increase steadily until they went outside of the viewing volume and disappeared. When decreasing the available order count of a batch root, we need to also decrease the available order count of its parents. If any of them drop below zero, we need to rebuild the render lists. [ChangeLog][QtQuick] Fixed nodes sometimes disappearing when adding many new nodes to the tree. Change-Id: I39c34acf0e1e0e87601f0fcd983f8da38cee029f Task-number: QTBUG-42096 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix build with QT_NO_DEBUG_OUTPUT definedSamuel Gaist2014-10-241-5/+13
| | | | | | | | | | | | The use of the qDebug() macro to construct a QDebug object fails when QT_NO_DEBUG_OUTPUT is defined when building Qt. This patch aims to fix this. [ChangeLog][General][Build] Can now build with QT_NO_DEBUG_OUTPUT defined Change-Id: If807ee3439db2a98b4d146f75860a98f40c247ec Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Don't do qgetenv on library loadThiago Macieira2014-09-221-35/+39
| | | | | | | | | | Bad for two reasons: first, it increases the load time of the application and second, it makes it impossible to to setenv/putenv from main(). The latter is useful if you need to work on an embedded device that doesn't allow setting environment variables. Change-Id: Id543f77336d7ac2e4ea820b51f55ce5a40a33b4e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Select specific features to be recorded when profiling QMLUlf Hermann2014-09-112-4/+6
| | | | | | | | | | | | Some features, like the memory profiler, create huge amounts of data. Often enough, we're not actually interested in all the data available from the profiler and collecting it all can lead to excessive memory consumption. This change enables us to optionally turn various aspects of QML profiling off. Task-number: QTBUG-41118 Change-Id: I7bb223414e24eb903124ffa6e0896af6ce974e49 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix debug output from renderer.Gunnar Sletta2014-09-111-3/+6
| | | | | | | | It was wrong when we ran without depth buffer or when we used the separate ibo code path. Change-Id: Ie6e4bfc99ee2a4a593e45be7d9af9af17896bcba Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2521-394/+226
| | | | | | | | | - 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>
* Avoid qmake warnings about wrong includesLaszlo Agocs2014-08-131-1/+1
| | | | | | | | | | QtQuick: WARNING: qquickwindow.h includes qqml.h when it should include QtQml/qqml.h QtQuick: WARNING: qsgabstractrenderer.h includes qsgnode.h when it should include QtQuick/qsgnode.h Change-Id: I3b9dc20de54ef775c562b2c6b80184a7b3149586 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Improve support for node iteration in the internal APISimon Hausmann2014-08-082-1/+7
| | | | | | | | Added a new node visitor that allows easier traversal of the specialized node types such as the image or rectangle nodes. Change-Id: I45a7d3e1513b4a4db9d07998a6bcee9eba34044e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup: Remove remainders of dirty state usageSimon Hausmann2014-08-084-32/+6
| | | | | Change-Id: I4c379562af27a7eb2a47aee21090eff84fe84c55 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Allow re-implementing renderSceneSimon Hausmann2014-08-081-1/+1
| | | | | Change-Id: Ic8e5e9ebbc5bbd1a7950807d6921304482cbde68 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Expose the scene graph publically through a QSGEngine classJocelyn Turcotte2014-08-016-130/+534
| | | | | | | | | This change wraps QSGRenderContext and QSGContext in a new QSGEngine class, and expose a public interface of QSGRenderer through a QSGAbstractRenderer to make it usable on a standalone window or FBO. Change-Id: I2d41187472424f5ea64650a006bcd61f2711f6b9 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Move QSGRenderer::updateStencilClip down to QSGBatchRendererJocelyn Turcotte2014-07-294-154/+150
| | | | | | | | | This convenience method is currently only used by the batch renderer. Moving it allows removing the QOpenGLFunction inheritance of QSGRenderer and unbinding it slightly from the rendering implementation. Change-Id: I4322952f843de8d950ced32885feee8d6c4a2730 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Remove dead code in QSGRendererJocelyn Turcotte2014-07-292-237/+0
| | | | | | | | QSGRenderer::draw, QSGRenderer::setProjectionMatrixToDeviceRect and the QSGBindableFbo class aren't used anywhere anymore. Change-Id: Ia00c60c288e1b89beaada6b2bbe7022ef9367391 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Leave the depth mask on after rendering.Gunnar Sletta2014-07-291-0/+1
| | | | | | | Try to be compatible with raw GL when possible. Change-Id: Id6e17da2d8c134362a5428de970cd5e562f57143 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Verbose fatal instead of crash when the scene graph state is invalid.Gunnar Sletta2014-07-044-0/+47
| | | | | Change-Id: I9a55bcbf9e94084c0cadac561e4707d47f5f8744 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Enable QSG_RUNTIME_DESCRIPTION by default for debug builds.Gunnar Sletta2014-07-032-5/+8
| | | | | | | | | This can be quite helpful when doing scene graph debugging with QSG_RENDERER_DEBUG=dump or using qDebug() on nodes in general. Change-Id: I6328d3f2a0fad87161c386bed14408598c986dcb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Properly collect polish timings from all render loopsUlf Hermann2014-07-022-3/+3
| | | | | | | | | | | Previously the polish timings were collected incorrectly from the windows render loop and not at all from the basic render loop. By collecting the polish times at the right places we can get rid of the 2-argument profile macro as well. Task-number: QTBUG-39876 Change-Id: I0b4aaf87162c652b8dcea6cd4f54db053f8312fe Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Use categorized logging for all things scenegraph.Gunnar Sletta2014-07-012-44/+13
| | | | | Change-Id: I865ee838b0fd6c257b7189f24130012b98206fd1 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devSimon Hausmann2014-06-132-4/+4
|\ | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: Id4b080aea713df68608847bb82570231e37ce536
| * Make sure shader rewriter stops immediately on an empty string.Gunnar Sletta2014-06-121-3/+1
| | | | | | | | | | | | | | | | | | The 'invalid' token didn't really serve a purpose. If a string contains 0 for any reason, it one has reached the end. Task-number: QTBUG-39505 Change-Id: I3fc9b8f28dc223386a72bbfa28f70fcca0fde223 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix opacity issue in the renderer.Gunnar Sletta2014-06-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Keep the internal state about the bound fbo up to dateLaszlo Agocs2014-06-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When binding an FBO directly via glBindFramebuffer, the QOpenGLContext's internal current_fbo, that is maintained by QOpenGLFramebufferObject, becomes out of sync. This will lead to QOpenGLFramebufferObjects thinking they are still bound. This fix prevents ShaderEffect items in QQuickWidget from complaining about "'recursive' must be set to true when rendering recursively". Ideally the entire tracking of the current fbo should be removed, since it cannot be done robustly enough, but that will likely happen in 5.4 only. Task-number: QTBUG-38994 Change-Id: I39015d90bb2e0985d2a084b79ffe2004a9bc9f07 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Avoid direct GL calls in QuickLaszlo Agocs2014-05-233-10/+11
| | | | | | | | | | Change-Id: I9b8673fb3292c9d5ad2f9e8e63f56dc661699be6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-106-11/+43
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/accessible/quick/quick.pro src/quick/items/qquickpincharea.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Manually adjusted for TestHTTPServer constructor change: tests/auto/quick/qquickimage/tst_qquickimage.cpp Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f
| * Follow QOpenGLContext API renamingLaszlo Agocs2014-04-251-1/+1
| | | | | | | | | | | | Task-number: QTBUG-38564 Change-Id: Ice1170339f7d650fcb6accfccf325471629343d6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Don't crash when render node doesn't have a batchrootGunnar Sletta2014-03-311-1/+3
| | | | | | | | | | Change-Id: Ib8f70414eb477b4ec45097c8784a5fe1375cf012 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Let render loop be more tolerant wrt when markDirty is called.Gunnar Sletta2014-03-271-0/+2
| | | | | | | | | | Change-Id: I95f1d6fe4695a09b1b6ccaf026137dabc22ec82c Reviewed-by: Michael Brasser <michael.brasser@live.com>
| * Clearly point out the distinction between GUI and Render threads.Gunnar Sletta2014-03-203-6/+27
| | | | | | | | | | | | | | | | This is something it is easy to get wrong, so try to make it as visible as possible. Change-Id: I2253ae63214cef0fb91c8b9423d7918ffc20e888 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Invalidate all batches potentially affected by a change.Gunnar Sletta2014-03-192-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Dynamic GL in QuickLaszlo Agocs2014-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | The counterpart to I716fdebb. Implements the dynamic path in scenegraph. Task-number: QTBUG-36483 Change-Id: I2dc613ba84560b7b8e36d3cd1da61c050ab08db0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Use stable sort when cleaning batches.Michael Brasser2014-03-151-1/+1
| | | | | | | | | | | | | | | | | | Ensure valid batches do not change order. This was causing rendering issues when m_rebuild was 0, as we would not re-sort the list in correct render order after cleanup. Change-Id: I912fb313d4029f96e263fad24d68462f252003df Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Use correct matrix for render nodes.Gunnar Sletta2014-05-071-2/+7
| | | | | | | | | | Change-Id: I8c137383fa32a64ba64ffb4ed48aa123d0ebf000 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Make sure we rebuild batches properly after a Blending material change.Gunnar Sletta2014-05-012-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a node sent DirtyGeometry and DirtyMaterial in the same round and DirtyGeometry triggered its batch to be invalidated, we would take the no-batch code path which did set the rebuild state to BuildBatches. This looks ok on screen, but if the node changed from alpha to opaque, it would not be put into an opaque batch. For things like full screen rectangles, this can potentially hurt performance. To prevent doing a full rebuild on any material change on batchless items (aka all Rectangle nodes), we store the blend state of the material in the element and do a full rebuild only when blend state changes. Change-Id: Ifdf06fb72ef02ca47a135c821ddbcbe0d164ca29 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Support shutting down the render thread without an OpenGL context.Gunnar Sletta2014-04-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][SceneGraph] There might not be an OpenGL context bound when QQuickWindow::sceneGraphInvalidated() is emitted if an error occurs while cleaning up the scene graph (such as EGL_CONTEXT_LOST). This is according to the documentation, but has never occurred in practice before. Change-Id: I13dbfbb4b6d0d27fa42fcb8b54df16ea02284807 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Skip nodes with no vertices when preparing batches.Gunnar Sletta2014-03-271-2/+7
|/ | | | | | | | | | Nodes with no veritces end up overlapping with everything so they tend to lead to poor batching. In my specific case, the empty nodes came from the QQuickTextNode, but it is a valid usecase so better to handle it gracefully in the renderer. Change-Id: Ic09c202a2675f806f2124cd436027afcd2654452 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix rendering issue with material changes from opaque <-> alphaGunnar Sletta2014-03-132-6/+18
| | | | | | | | | | | | When I introduced the invalidation of z ranges, I forgot that we need to rebuild render lists when nodes move from opaque to alpha batches or vice versa as that sorting happens in buildRenderLists(). To remedy this, make Batch::isMaterialCompatible report blending changes separately and trigger a full rebuild in this case. Task-number: QTBUG-37422 Change-Id: I020813cb531ed58353f8340fcad58dec8d7856dd Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Remove several uses of module includesAndrew Knight2014-03-101-1/+1
| | | | | | | | | | Module includes are discouraged because they may increase compilation time. While debugging a broken core module include header, a number of module include infractions were discovered in qtdeclarative. Replace them with their more specific counterparts. Change-Id: I614e9a6aa2177f396e5289f3cdb3c35faa0202c9 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QSGBatchRenderer: return when a shader is not returned by the managerAndrew Knight2014-03-061-0/+4
| | | | | | | | | | If a shader can't be found from the manager (e.g., if it failed to link), return from rendering. This prevents the renderer from crashing on a null pointer. Task-number: QTBUG-37290 Change-Id: I44d0bbb721854c0bc6da681ff55f71140a5cb0bc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix MSVC2012 compiler warnings.Erik Verbruggen2014-03-051-4/+4
| | | | | | | | Tested on both win32 and win64. Change-Id: I47755e2da51829e61e1452eaaf84a057224b478b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Don't sort batches when there are no changes.Gunnar Sletta2014-03-051-8/+11
| | | | | | | | | | | | | On node removal we change the batch, but don't set rebuild as everything else should be drawn as is. A sort after such a removal could result on the order of batches being changed without the other nodes being updated. This would then result in incorrect ordering and nodes could be obscured. Task-number: QTBUG-37222 Change-Id: I57dd2fbc945e8c10c949743f59315b3372a4b6f4 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | Change-Id: Iea540b768232ea423ea7f04e41655198931cf36d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-02-186-26/+12
|\ | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4functionobject.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h Change-Id: Id164f6c3b45501aa466908659ec4e3b957323753
| * Ensure m_opacityChange is cleared at the beginning of each frame.Michael Brasser2014-02-151-0/+1
| | | | | | | | | | Change-Id: Ic5eb5e1955e09884f98975a8ac74b42f00e233d7 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Update scenegraph docs to be in line with Qt 5.2 behavior changes.Michael Brasser2014-02-152-10/+1
| | | | | | | | | | Change-Id: Id21386e6dc85bb7e109d9bd03e80f306c0a99733 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Provide scenegraph backend API for marking scenegraph nodes dirty.Michael Brasser2014-02-152-0/+2
| | | | | | | | | | | | | | | | | | | | | | Prior to Qt 5.2 tracking of dirty state was automatically handled by QSGNode. With Qt 5.2 this approach has changed. Moving forward render state is ideally tracked outside of QSGNode; however, we continue to provide a way to track it in the node itself, to support custom renderers and the default node updater. Change-Id: I78907caee1b64b94a2bae2d8b577210f1955a431 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Enable program binary support through QSGRenderContext API.Gunnar Sletta2014-02-132-16/+8
| | | | | | | | | | Change-Id: I4eecff3c8a2c727d38d394305d248eddeef87e8e Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Move QtQuick profiling to own profiler adapterUlf Hermann2014-02-152-9/+10
| | | | | | | | | | | | | | | | The QtQuick parts of the QML profiler service thus become a proper global profiler which can be independently enabled and disabled. Change-Id: Ifad03801cab2be66a264fc46fdebdae582fcc99b Reviewed-by: Kai Koehne <kai.koehne@digia.com>