aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickshadereffectsource_p.h
Commit message (Collapse)AuthorAgeFilesLines
* use the override keyword consistently and correctly (clang-tidy)Shawn Rutledge2018-02-271-1/+1
| | | | | Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-1/+1
| | | | | | | | | | | | | 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>
* Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-6/+6
| | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add samples property for Item.layer and ShaderEffectSourceLaszlo Agocs2017-02-231-0/+6
| | | | | | | | | | [ChangeLog][Qt Quick] Added the properties ShaderEffectSource.samples and Item.layer.samples to allow requesting MSAA rendering of an item subtree, without enabling multisampling for the entire scene. Task-number: QTBUG-58945 Change-Id: I9102cfabba10d4dc1e7ad2aa0b258ada6d9a5a47 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Make shader effects configurableLars Knoll2016-10-101-0/+4
| | | | | | Change-Id: I4e7fd5e9781dec7ee6ed8807ca1a51c937f6f9f3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Pass the kind of geometry change aroundErik Verbruggen2016-07-111-1/+1
| | | | | | | | | | | | | This prevents re-calculation of what actually changed, and removes the now unused parameter newGeometry. Other than this change calculation, the only place where oldGeometry was used is QQuickListViewPrivate::itemGeometryChanged. To get rid of oldGeometry too, QQuickListViewPrivate now stores the current (i.e. last known) geometry, and updates it in itemGeometryChanged. Change-Id: I8a5286d08a04132c9a4c81de7ce221f5676946e6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Add cross-backend simple rect, texture, and ninepatch nodesLaszlo Agocs2016-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QSGSimpleRectNode is deprecated -> use QSGRectangleNode via QQuickWindow::createRectangleNode() instead. QSGSimpleTextureNode is deprecated -> use QSGImageNode via QQuickWindow::createImageNode() instead. The OpenGL version of the simple rectangle node is switched over to the vertex color material instead of flat, to allow for better batching. Use the same concept for nine patch nodes. The "style" node from Quick Controls 1 is now QSGNinePatchNode in order to provide a proper cross-backend solution which is already necessary due to the software backend, but now generalize it to apply to the accelerated backends with proper materials as well. QC can now simply call createNinePatchNode() without further ado. Also fixes a bug with the D3D12 texture material not enabling blending when needed. When it comes to the internal class names, QSGRectangleNode and QSGImageNode get the Internal prefix in the adaptation layer in order to differentiate from the public API. This involves quite a lot of renaming, but results in a nice and clean public API. Change-Id: Iddf9f9412377843ea6d652bcf25e68d1d74659ea Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Avoid ifdefed enumLaszlo Agocs2016-06-021-10/+3
| | | | | | | | | Do it like in QSGGeometry: use the values directly to avoid the GL header dependency. Change-Id: Ia83dea5cbbab7dfee8b88d1b01fcfcb51ad41fc1 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Enable building Qt Quick module with QT_NO_OPENGL definedAndy Nichols2016-03-221-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Currently the Qt Quick module depends on either the OpenGL or OpenGLES headers being available at build time. Since we are adding support for adaptations that do not depend on OpenGL, it should be possible to build Qt Quick in environments that do not have OpenGL development headers. This does present many challenges though because in some cases GL types, and classes that require OpenGL are part of the public APIs. However since these classes were never available when QT_NO_OPENGL was defined, it should be possible to redefine the function signatures under this scenario, since it's not possible to break binary compatibility if there never were any binaries to break compatibility with. One of the bigger changes that was necessary to facilitate this change is creating interfaces out of QSGContext and QSGRenderContext. Here the default behavior was usage of OpenGL directly, even though subclasses could override all OpenGL usage. Making them interfaces should bring QSGContext and QSGRenderContext more in line with the other classes present in the adaptation layer. Change-Id: Iaa54dc0f6cfd18d2da1d059548abf509bd71f200 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-191-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: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Add possibility to mirror ShaderEffectSource generated texturesMiikka Heikkinen2015-08-201-0/+13
| | | | | | | | | | | | | Using textures generated by ShaderEffectSource items (or Item.layer) with custom OpenGL code was non-intuitive due to mismatching coordinate systems, so added a possibility to control the generated texture orientation. [ChangeLog][QtQuick][ShaderEffectSource] Added possibility to mirror generated OpenGL texture. Change-Id: I7c03d8b6fbfc43d69812c15d244200fb8e7c7bb9 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Port from Q_ENUMS to new macro Q_ENUM.Friedemann Kleint2015-06-191-1/+2
| | | | | | | | | | | Remove Q_ENUMS in favor of the new Q_ENUM macro which provides registration as meta enum and a debug stream operator. QQuickXmlListModel::Status is left unmodified as porting it creates a link error in tst_qquickxmllistmodel. Change-Id: Id5e6192c9f85e7c94332508fbd91873ddda31e1a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-121-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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-116/+13
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Fix performance regression caused by SG signals in QQuickItem.Gunnar Sletta2014-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | For a testcase with thosands of items, I measured an increase in shutdown time from 800ms to 7500ms, all spent in disconnect(). This is not acceptible, so we're choosing a different approach. If items implement a invalidateSceneGraph slot, this function will be called during shutdown. It should be made a proper virtual in Qt 6. This approach costs very little. Change-Id: I5970143cc0a0744955687e17586f0bb00c9afb26 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - 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>
| * Cleanup: Separate the sub-tree layering out of QtQuick into the scene graphSimon Hausmann2014-08-231-92/+1
| | | | | | | | | | | | | | | | | | | | This basically renames QQuickShaderEffectTexture to QSGDefaultLayer and introduces QSGLayer as interface to be used. QQuickShaderEffectTexture is generic for the scene graph and has no QtQuick dependencies. The interface separation allows scene graph backends to customize layers. Change-Id: I9a7f37addaa4b80a34ff9a1456b0cb9b16d4e9f3 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Cleanup: Remove ShaderEffectSourceNodeSimon Hausmann2014-08-221-11/+7
| | | | | | | | | | | | | | | | We can simply use a standard image node and do the dirty marking also directly in the texture (both live in the same thread). Change-Id: I7345c702613782adec3c6a36a7705a2a54ed82ec Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Add Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-7/+7
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Clean up Image and ShaderEffectSource properly.Gunnar Sletta2014-08-041-0/+1
| | | | | Change-Id: I9e3eb5f65ea5f46d30fb7905d0f9c479da367bf5 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Release GL resources of ShaderEffectSource while we still have GL.Gunnar Sletta2013-12-031-0/+1
| | | | | | | | | | | | | When a Window element is used, the QML window item is deleted before the ShaderEffectSource component and the deleteLater to delete the texture gets handled too late. We now register for the sceneGraphInvalidated signal and release resources synchronously while shutting down. Task-number: QTBUG-35294 Change-Id: Id83b669ddc16723551e5612264ccbad6d3a9bbcb Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fill recursive ShaderEffectSource with transparent when using alpha.Gunnar Sletta2013-11-071-0/+2
| | | | | | | | | | The logic relies on m_fbo being 0 on the first render pass, in which case it will pick texture id 0 which is solid black. Though this works ok, it results in recursive shader effect sources starting out black which is ugly. Change-Id: I22b1d50e02c00583837b8152c5fb850263038a93 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Use one render loop per QQuickWindowGunnar Sletta2013-10-301-2/+3
| | | | | | | | | | | | | | | | | | | 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>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix distance field antialiasing for retina displays.Gunnar Sletta2013-04-021-0/+3
| | | | | | Change-Id: I01d7d41a4e70822555bae453978dbe92fbb5c98d Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-4/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Let ShaderEffectSource use same multisample count as GL context.Kim Motoyoshi Kalland2012-07-041-1/+1
| | | | | Change-Id: I9b772a2c405c2fab13dfee3527212117de16e9c0 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Reexport the shader effect textureGunnar Sletta2012-05-221-1/+1
| | | | | Change-Id: I4fd2b40bc2ed6bb977cb410a4822517f750f53ff Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Remove unused variable.Kim Motoyoshi Kalland2012-05-211-1/+0
| | | | | Change-Id: I49fee9c96a9f1b54a790d2dd8a3d1f0a3c7f8a5a Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove unnecessary exportsMatthew Vogt2012-05-181-2/+2
| | | | | | | | | Reduce library load time by removing any exports which are not required by existing clients. Task-number: QTBUG-24768 Change-Id: Ia5754d6f97bb2ed46e290820a5b092f85a4bc5b0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Share depth-stencil buffers between ShaderEffectSources of same size.Kim Motoyoshi Kalland2012-03-221-0/+1
| | | | | Change-Id: If325a38175249c3a3ffe5043d42ba35dbf90ce0c Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Free ShaderEffectSource FBOs when no longer needed.Kim Motoyoshi Kalland2012-03-211-1/+5
| | | | | | | | This commit also fixes handling of texture provider deletion in ShaderEffect. Change-Id: Ib22a9308a35325972bc545cf29de11bd625b22b2 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-1/+1
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in Nokia copyright headers.Jason McDonald2012-01-171-1/+1
| | | | | | | | Update copyright headers from before 2011, and a couple of new ones that were merged after the previous change to copyright headers. Change-Id: Ia76e08e2734afa4ef3f1207dbcda5ff3bc81b366 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Introduce layerering support (ShaderEffectSource) directly in ItemGunnar Sletta2012-01-031-1/+1
| | | | | | | | | | | | | This is enabled by doing "Item.layer.enabled: true". The implementation is solely based on the existing shader effect (source) and simply swaps in a sibling next to the item when enabled. This change also adds the QSGTextureProvider to the public API, as it is now a natural part of the QQuickItem API since all items can be textures. Change-Id: I26705c11e92d5623a5121300acc123782b784077 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Don't re-parent ShaderEffect source items.Kim Motoyoshi Kalland2012-01-021-0/+1
| | | | | | | | | | | ShaderEffect and ShaderEffectSource used to set themselves as parent of and hide source items that don't already have a parent. This was done in order to make sure the source items got a canvas. This patch sets the canvas of the source items without re-parenting. Task-number: QTBUG-23069 Change-Id: I24d56e6eb970590bca3adff7a61459d25e4983a0 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-021-0/+257
This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>