aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgsimplerectnode.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie GĂ©rard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Undeprecate (in docs) QSGSimpleRect/TextureNodeLaszlo Agocs2020-04-141-3/+3
| | | | | | | | | | | | | | | | | | | | | In 5.8 the deprecated tag was added since these are not functional when using a scenegraph backend other than default or software. In 6.0 we no longer have the d3d12 backend so out of the box QSGSimpleRectNode and QSGSimpleTextureNode are functional always. The factory-style QQuickWindow::createImageNode() alternatives are still preferred, but QSGSimpleTextureNode is used in a number of examples by subclassing, and the factory function approach is no alternative to that. Same goes internally, QQuickFramebufferObject is internally enabled by subclassing QSGSimpleTextureNode. By extension, it is assumed that there are applications out there relying on these classes too. So solve the dilemma by removing the \deprecated from the docs and that's that. Task-number: QTBUG-82997 Change-Id: I30e8ee6df91fa37a370bba7a0511c95275794e33 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Remove QSGEngine and move QSGAbstractRenderer back to privateLaszlo Agocs2020-04-071-2/+1
| | | | | | | | | | | | | | | | | | | QSGEngine goes away. Same for the associated example, which is the only place this is used anywhere in Qt. As a consequence, the renderer base class can be moved back to private: there is no use for it to be public anymore, since that made sense only in combination with QSGEngine. With the RHI-based rendering path driving a renderer directly is more complicated than before so it is not reasonable to allow the QSGEngine-style access anymore. Instead, one has QQuickRenderControl, which allows redirecting and manually driving the rendering of a QQuickWindow, thus providing an alternative to the legacy QSGEngine approach. Task-number: QTBUG-78596 Change-Id: If57c6b657b2053da1c4e545e517026382a71d998 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add the graphics api independent scenegraph portLaszlo Agocs2019-07-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt in via environment variables: QSG_RHI=1 -> enable using QRhi instead of GL QSG_RHI_BACKEND -> set to vulkan, metal, d3d11, gl to override the default (the default is d3d11 on Windows, metal on Mac, gl elsewhere) Or force a given rhi backend via the existing QQuickWindow::setSceneGraphBackend(). Otherwise the default behavior is the same as before, the rhi code path is never active by default. -no-opengl builds are supported in the sense that they work and default to the software backend. However, the rhi code path cannot currently be used in such builds, even though QRhi from qtbase is fully functional with Vulkan, D3D, or Metal even when qtbase was configured with -no-opengl. This cannot be utilized by Quick atm due to OpenGL usage being all over the place in the sources corresponding to the default backend, and those host the rhi code path as well. This will be cleaned up hopefully in Qt 6, with the removal all direct OpenGL usage. Other env.vars.: QSG_RHI_DEBUG_LAYER=1 -> enable D3D debug or Vulkan validation layer (assuming the system is set up for this) QSG_RHI_SHADEREFFECT_DEBUG=1 -> print stuff from ShaderEffect QSG_SAMPLES=1,2,4,... -> MSAA sample count (but QSurfaceFormat works too) QT_D3D_ADAPTER_INDEX=0,1,... -> D3D adapter index QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -> Vulkan physical device index QSG_RHI_UINT32_INDEX=1 -> always use uint index data (both merged/unmerged, convert when needed - with some rhi backends this is implicit) QSG_RENDER_LOOP -> to override the render loop as usual. The default with RHI is threaded for Metal, threaded for Vulkan on Windows, basic for Vulkan on Linux and Android (to be checked later), while the existing rules apply for OpenGL. Not supported when running with QRhi: - particles - compressed atlases (though this is transparent to the apps) - QSGRenderNode - QQuickRenderControl - QQuickFramebufferObject - certain QQuickWindow functionality that depends directly on OpenGL - anisotropic filtering for textures - native text may lack some gamma correction - QSGEngine applicability unclear - some QML profiler logs may be incorrect or irrelevant Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix reference to wrong methodsAllan Sandfeld Jensen2016-07-111-2/+2
| | | | | | | The new classes lost the Simple in their names. Change-Id: I06c7866848fc05fe3aecf631305e7553be33836f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add missing deprecated tag to QSGSimple*Node.Laszlo Agocs2016-06-241-0/+2
| | | | | Change-Id: I014baf333e0c859f76c49ba859ce6db90978ff64 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add cross-backend simple rect, texture, and ninepatch nodesLaszlo Agocs2016-06-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* Fix some qdoc-warnings.Friedemann Kleint2015-02-231-0/+1
| | | | | | | | | | | | | 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>
* 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>
* 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>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add Q_UNUSED for reserved fields.Alan Alpert2013-09-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents the following compiler errors with Clang src/quick/scenegraph/coreapi/qsggeometry.h:183:10: error: private field 'm_reserved_bits' is not used [-Werror,-Wunused-private-field] uint m_reserved_bits : 25; ^ src/quick/scenegraph/util/qsgsimplerectnode.h:66:11: error: private field 'reserved' is not used [-Werror,-Wunused-private-field] void *reserved; ^ src/quick/items/qquickclipnode_p.h:66:10: error: private field 'm_reserved' is not used [-Werror,-Wunused-private-field] uint m_reserved : 31; ^ src/quick/scenegraph/coreapi/qsgmaterial.h:143:11: error: private field 'm_reserved' is not used [-Werror,-Wunused-private-field] void *m_reserved; ^ src/quick/scenegraph/coreapi/qsgnode.h:267:10: error: private field 'm_reserved' is not used [-Werror,-Wunused-private-field] uint m_reserved : 31; Change-Id: I0ea00fbd4b45156dedabfd16a3cb3e5f6170f2ff Reviewed-by: Alan Alpert <aalpert@blackberry.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>
* Doc: Fix documentation issues.Kim Motoyoshi Kalland2012-09-071-0/+7
| | | | | Change-Id: I03c4faa1aee60cd1ad706cb6c1b983f03311d251 Reviewed-by: aavit <qt_aavit@ovi.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>
* Say hello to QtQuick moduleKent Hansen2011-12-021-0/+132
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>