Commit Graph

23 Commits

Author SHA1 Message Date
Eskil Abrahamsen Blomfeldt be813b9955 Introduce hardware accelerated curve renderer for Shapes
This implements the Loop/Blinn algorithm for quadratic curves
as an optional backend for Qt Quick Shapes, basically distance
fields where the distance to curves are calculated in the
fragment shader.

This means cubic curves are approximated, which will give
varying results, but for many shapes (such as text) this is
efficient and means the shapes can be zoomed indefinitely
while still retaining curvature as well as anti-aliasing
working without MSAA.

Preliminary results give some frame rate improvements
compared to doing MSAA and GeometryRenderer, but the major
improvement is that you can get smooth curves at any zoom
level without re-triangulating the shape.

Note that the renderer currently does not do antialiasing
for straight lines. This would still require MSAA, but at
a lower cost than for GeometryRenderer since there are
much fewer triangles. Adding AA here as well is work in
progress.

Task-number: QTBUG-104122
Done-with: Paul Olav Tvete <paul.tvete@qt.io>
Done-with: Eirik Aavitsland <eirik.aavitsland@qt.io>
Done-with: Amr Elsayed <amr.elsayed@qt.io>
Change-Id: I6b4a1103546fbdfe760906f7a183101f8eedb9d3
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-05-26 14:45:21 +02:00
Laszlo Agocs bab8e70599 shapes: Condition shaders at build time
Pick-to: 6.5
Change-Id: If04bdfae18d5f9c48d003f41c4ae77d7d4c616d4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-03-13 15:23:25 +01:00
Lucie Gérard 1b9808737a Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: Id89ed14990804a5024183e75382cc539d4293da1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-09-07 17:01:30 +02:00
Lucie Gérard 5a7b716474 Add license headers to cmake files
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.

Existing copyright statements remain intact

Task-number: QTBUG-88621
Change-Id: I72c89a98c42bbc9234d8495e9e503bec81d11037
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-07-08 10:41:06 +02:00
Ulf Hermann 7fb0bc3a04 Add "auto" to module DEPENDENCIES
This has not effect at run time but signals to tooling that the same
version of the dependent module should be assumed.

Change-Id: I582f6df80822c2700d3929fe3581f9c10e1a62cf
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-06-24 08:50:06 +02:00
Alexey Edelev 250d6269e9 Migrate to autogenerated cpp exports
Replace the hardcoded cpp exports with a generated one where it's
applicable.

Task-number: QTBUG-90492
Change-Id: I4af021bf828e05c8d6f3f975befd3b6b2cf63462
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-02 16:32:25 +01:00
Alexey Edelev 7b41628d23 Add the 'Private' suffix to the internal module names
Rename internal modules to adjust their name to the internal module
policy.

Pick-to: 6.2
Task-number: QTBUG-87775
Change-Id: I99cbc1214c6f0a9085e921df6225768fd55f5b89
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-10 17:09:24 +02:00
Craig Scott 1c4ba17015 Refactor and update qml CMake API
The existing CMake API for qml modules had a number of
shortcomings. Refactor it to achieve the following:

- Clearly separate public and internal aspects.
- Re-use code from qtbase for adding plugins and module
  targets rather than reimplementing close variations.
- Provide more robust and complete support for qmllint,
  qmlcachegen and automatic generation of qmldir files.
- Reduce the steps needed for more common scenarios.
- Encourage the use of separate backing library and plugin
  targets.
- Automatically generate the plugin class .cpp file where
  possible.
- Specify .qml files directly through qml-specific API
  elements rather than assuming they can be extracted
  out of a set of resources.

[ChangeLog][QtQml] The qml CMake API has changed from 6.1
and is now out of Technical Preview status. The most
notable change is that .qml files should no longer be
specified as resources, there is dedicated handling for
them in the qt6_add_qml_module(). A related change is
that the qt6_target_qml_files() command has been replaced
by qt6_target_qml_sources(). More complete integration
with qmlcachegen, qmllint and qmldir generation is also
part of the CMake API.

Fixes: QTBUG-91621
Task-number: QTBUG-82598
Task-number: QTBUG-88763
Task-number: QTBUG-89274
Task-number: QTBUG-91444
Change-Id: I25aae1b0e89890394dfe2ba2824008164b2ca8d9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-04 16:54:52 +10:00
Maximilian Goldstein 6850da55d7 CMake: Remove GENERATE_METATYPES usage
We now generate metatypes by default and every instance of GENERATE_METATYPES now causes a warning.

Change-Id: Id81f66eb8b0b7cc9475fd9978ebe374a59ab7b63
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-04-27 11:22:09 +02:00
Alexandru Croitor cd7bd71d08 CMake: Fix qml module version to use the repo project version
Use PROJECT_VERSION instead of CMAKE_PROJECT_VERSION, so that the
repo project version is used in a top-level build, rather
than the version of the qt5 project.

Pick-to: 6.1 6.0
Task-number: QTBUG-92861
Change-Id: I5a7a09baf81353558e512800746ac24e8e8b9a47
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-04-15 18:10:53 +02:00
Alexandru Croitor 08adbefa13 CMake: Regenerate projects to use new qt_internal_ API
Modify special case locations to use the new API as well.

Task-number: QTBUG-86815
Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-06 13:19:37 +02:00
Laszlo Agocs b87b3d3d43 Make QSGMaterialRhiShader become QSGMaterialShader
After a symbiotic relationship in Qt 5.14 and 5.15, it is time for
QSGMaterialRhiShader to devour its older sibling and take its place.

This makes the direct OpenGL rendering path disfunctional. All
QSGMaterial Qt 6 TODOs are solved, the API is clean and straightforward
again: a QSGMaterial creates a QSGMaterialShader, no special flags and
options needed. (it's just that QSGMaterialShader now has a slightly
different API)

Task-number: QTBUG-79268
Task-number: QTBUG-82997
Change-Id: I545ca8d796c5535e81957c706e7832133be15b7d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-06-02 15:16:46 +02:00
Alexandru Croitor 25ae2045b6 CMake: Regenerate qtdeclarative/src
Includes
 - renaming of internal plugin api call
 - generation of QT_QMLTYPES_FILENAME
 - addition of a few TARGET_DESCRIPTION

Change-Id: I72b5647b8c16af9945795ead62a075322b6bb2f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 10:01:16 +02:00
Alexandru Croitor 14492ecee2 CMake: Regenerate and adapt to merge from dev
Change-Id: If8daa6152a563d4309d7342414780ef75b9f5589
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-03-12 14:05:23 +00:00
Alexandru Croitor 1d4fa26a70 Regenerate qtdeclarative
Change-Id: I48d7fd306f3d1b161a8e73029282ee591b1ef612
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-02-12 17:30:34 +00:00
Alexandru Croitor d15665b693 Regenerate projects to handle private deps correctly
Change-Id: Ifcbab0407e93dfc35d0459d7d29dee2cd3508a86
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 14:36:38 +00:00
Leander Beernaert 7590f07278 QML Type Registrar changes
Change-Id: I36254a688f575e6c7f717ee4019e4d49f73a60f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-24 12:31:38 +00:00
Leander Beernaert 7c229d3cf8 Post merge fixes
Change-Id: Ie8aca222809f35174fb6c6488832ec3ff5432272
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-24 12:30:00 +00:00
Alexandru Croitor ba494aaa24 Regenerate all projects with new CMake API version
Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-15 12:24:51 +00:00
Alexandru Croitor e9cac99f37 Regenerate projects
Change-Id: I38044c382e4d84b5865a19cdd04cc8922bd72a77
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-14 10:22:26 +00:00
Alexandru Croitor f0d23d3ff9 Regenerate qtdeclarative before merge
Change-Id: I5710110679220c4e22bc7f8b540f18a51b735ddf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-11 13:50:14 +00:00
Alexandru Croitor 13374ceb16 Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I2963c1209316fb6755f572969f368970450d7991
2019-07-11 17:24:39 +02:00
Alexandru Croitor f6f5687032 More porting of declarative modules
Change-Id: Ibe6d87998af1209518af87117b79778136110786
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-06-08 08:22:31 +00:00