aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickshapes
Commit message (Collapse)AuthorAgeFilesLines
* Synthetically reference type registration functionsUlf Hermann2020-02-041-0/+1
| | | | | | | | | | | | | | | | | | | | | Add unused volatile pointers to the type registration functions in each import plugin. We need to do this in order to prevent the linker from optimizing the registration away. There are two ways for this to happen: When linking statically, the linker will examine the referenced symbols on a per-object base and leave out all unreferenced objects. When linking dynamically, the linker may do the same on a per-library base and drop any unreferenced libraries from the dependencies. Forcing a reference to the type registration function prevents both. The volatile technique allows us to remove the previous qCDebug() hack. Having an unused volatile auto variable should only result in a single memory read as runtime overhead. The qCDebug() technique would generate a read and a block of mostly dead code (as no one would ever use that logging category). Fixes: QTBUG-81622 Change-Id: I255667276dfd355b19baa17b1aad3db406bf1954 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-231-0/+1
|\ | | | | | | Change-Id: I88e94fe3398a59f10c5a8b142204db5f3ccb2657
| * Remove shadereffect dependency from shapesKarim Pinter2020-01-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Uses wavefrontmesh only if the shadereffect feature is there. Path doesn't need to depend on shadereffect feature only on gui module. The shape also missed a sgtexture header. Fixes: QTBUG-81296 Change-Id: I78425ef8a09226b99e9b9f6010dda9dac9009fe5 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Upgrade qsb files to version 4Laszlo Agocs2020-01-216-0/+0
| | | | | | | | | | Change-Id: Ic1a1f5ff49c34d72495bc74083f37db118c935c1 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Generate registrations for all importsUlf Hermann2020-01-103-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we can generate all QML type information at build time, we should also use it. Move the types for QtTest into the testlib import plugin. They don't need to be exported from QtQuickTest. Trigger the resource initialization of the shapes library from the plugin so that we retain a dependency and the linker doesn't optimize the module initialization away. Change-Id: Icc8cb338aa03ef1e3085e29356a5db7b73ba0a01 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Regenerate rhi shadersLaszlo Agocs2019-12-116-0/+0
| | | | | | | | | | | | | | | | | | | | The generated GLSL code for version 150 is now slightly different (we now disable the unnecessary GL_ARB_shading_language_420pack to prevent failures on older OpenGL implementations and core profile contexts). Task-number: QTBUG-80690 Change-Id: I4c6242284c1239af9f12bd2fdac3c33707ac88e7 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Avoid initializing QFlags with 0 or nullptr in further casesFriedemann Kleint2019-11-253-5/+5
| | | | | | | | | | | | | | Amends 744e77b841878fb017c0f2d60607090008f28180. Change-Id: I16e37aaf503eb62f67fca0e48be4c92c4a72ae46 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-081-5/+5
|\| | | | | | | Change-Id: Ib381f350ada365747ce20b989bfdc368d75f2219
| * Convert a few sizeof(array)/sizeof(element0) fors to range forsAlbert Astals Cid2019-10-041-5/+5
| | | | | | | | | | | | | | | | Increases readability Change-Id: I46d82fac83e538988cea79a053d70b954a3cb9f1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-043-18/+18
|\| | | | | | | | | | | | | | | Conflicts: src/imports/qtquick2/plugins.qmltypes src/quick/items/qquickitemsmodule.cpp Change-Id: I841c65c9c131354788b4f3fcfe3d7ed27be316d5
| * Change const ref to ref in QSGMaterialRhiShader as per API reviewLaszlo Agocs2019-09-232-12/+12
| | | | | | | | | | | | Change-Id: I7783ed26a66f03ebe3b26bcba2f42f9fff45a417 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-121-6/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine.cpp src/quick/handlers/qquicktaphandler.cpp src/quick/items/qquicktableview.cpp Done-With: Richard Moe Gustavsen <richard.gustavsen@qt.io> Done-With: Ulf Hermann <ulf.hermann@qt.io> Done-With: Shawn Rutledge <shawn.rutledge@qt.io> Change-Id: If9558a33f01693ce96420c094e0b57dfff0626cd
| | * Doc: Fix documentation warnings for qtdeclarativeTopi Reinio2019-08-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After recent changes to QDoc, it now correctly warns about missing documentation for QML method parameters - fix all of these and also do some minor language editing. Remove duplicated entries for - \qmlmodule Qt.labs.qmlmodels - \group qtjavascript as they were causing issues. Change-Id: I55cd670cc8a0cc6427cdb7945dbd7c28ea94f796 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Specify parameters of type registration in class declarationsUlf Hermann2019-09-261-0/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-08-201-1/+1
|\| | | | | | | Change-Id: I9ce3eee3d6f88783b9e20110a2814bee805291a4
| * Doc: Fix QtQuick.Shapes::ShapePath::strokeWidth property typeLeena Miettinen2019-07-261-1/+1
| | | | | | | | | | | | Fixes: QTBUG-73541 Change-Id: Icb15cee3c49f142ef3634e35427dbbc0b9a2183e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Fix incorrect vertex data and rendering when shapes change sceneSimon Hausmann2019-08-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | When changing scene, the stroke vertices were left with uninitialized stroke colors when the item is re-attached to the scene. Marking the shape data as overall dirty and triggering a polish ensures that the data is kept in sync. Change-Id: I3f472734a97908e6e8f6e58230c0c53dcc041868 Done-with: Fabian Kosmale <fabian.kosmale@qt.io> Fixes: QTBUG-77332 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Add the graphics api independent scenegraph portLaszlo Agocs2019-07-0419-149/+687
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-201-1/+8
|\| | | | | | | Change-Id: I71b1212085da85f03f4ff0e3ee5cb56a401998ae
| * declarative: fix resource initialization for namespaced buildsTim Blechmann2019-02-231-1/+8
| | | | | | | | | | | | | | | | | | `Q_INIT_RESOURCE` cannot be used from within a Qt namespace. so we move the `Q_INIT_RESOURCE` call to static function defined on the global namespace Change-Id: I9eed7699e969369f861b95cdf3f7376ade73c1b3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Do qtVectorPathForPath before starting thread poolUlf Hermann2019-06-141-0/+6
| | | | | | | | | | | | | | | | | | | | This avoids the race condition created by calling it the first time inside the threads. Fixes: QTBUG-76338 Fixes: QTBUG-76069 Change-Id: I6108526eb6f5b5ba9c3334437102fc5959f53030 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Add scale property to QQuickPathPaolo Angelelli2019-06-041-0/+1
|/ | | | | | | | | | | With this property, Paths and ShapePaths become scalable. [ChangeLog][QQuick][Path] Added scale property to scale a path before sending it in to PathView/Shape. Change-Id: Id9ce7d1247d55e2cdb0d27a19c86fe0970e66268 Fixes: QTBUG-74456 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Fix link issuesNico Vertriest2019-02-281-3/+2
| | | | | Change-Id: I0e08820a6d25996fe27118f05214ff63d695d24e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Restore QtQuick.Shapes documentationTopi Reinio2018-12-101-4/+4
| | | | | | | | | | | Sources for this module were recently moved. Add the new directory to documentation config to make the documentation generate again. Also, make the documented QML module version track the minor version of Qt. Change-Id: I56f439c141cbf39639a97d44d328c068fff6e96e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Disable GL_NV_path_rendering unless explicitly requestedLaszlo Agocs2018-09-272-12/+18
| | | | | | | | | | | | | | | | | | | | Flip the default value of enableVendorExtensions, so that we use the generic Shape backend (triangulating + QSGGeometryNode) by default, even on NVIDIA systems. The Nvpr backend is only tried when enableVendorExtensions is set to true by the application. This makes the offering more stable over all since applications will not run into confusing glitches that only reproduce on certain systems while behaving differently on others. [ChangeLog][QtQuick] The Shape item is changed not to try using GL_NV_path_rendering by default, unless explicitly requested. Thus the default value of enableVendorExtensions is now false. Task-number: QTBUG-66843 Task-number: QTBUG-66457 Change-Id: I564708b672bd08a8e760af689d64349aab4ead82 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Enable Qt Quick path and shapes for the no-thread configurationMorten Johan Sørvig2018-09-121-1/+17
| | | | | | | | | | | | Force synchronous rendering in QQuickShapGenericRenderer. (In theory, we could support async also for no-thread by running the tasks on the Gui thread, but there would perhaps be little gain from doing this.) Change-Id: I0fb7526fdaa56d3c609c83c8d4790b4352d782fd Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move QtQuick.Shapes implementation to qtquickshapes, privately exportedPaolo Angelelli2018-06-2132-0/+6463
This change moves the implementation of QtQuick.Shapes into an own qt module, where classes are privately exported. In this way Shapes QML types can be internally (= from other Qt modules) instantiated also from cpp. Change-Id: I428f981f0a1f3083e6571cbeaffa706fd8ef7254 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>