summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix effects for dynamic source item updatesEskil Abrahamsen Blomfeldt2020-09-152-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d53af701d166dac56c910319db9eac4b9aa4538d aimed to fix graphical effects when the image source was cleared programmatically after the shader effect had been initialized. The fix made the assumption that the source size of the proxy had been bound to the size of the input, but this turned out to be wrong for many of the effects. Further investigation revealed that the graphical effects were never written to support source items with properties that change. For instance, if you initialize the source image with fill mode == Stretch, it would pick the direct throughput mode and this would stick, even if you change the fill mode later on, causing rendering errors. Similarly, if you dynamically add children to a childless source item at runtime, the effect would not be applied to these items since the proxy render mode is required for that. d53af701d166dac56c910319db9eac4b9aa4538d was only added to 5.15 because that is where the regression is visible, but it turns out that this is a general problem in effects which is also visible in Qt 6, both as rendering errors and also as unpredictable performance implications, where the order of operations can decide which mode of throughput you would end up with. The fix is to redo the polish whenever someone changes any of the properties that might affect the choice of code path. Task-number: QTBUG-84686 Pick-to: 5.15 Change-Id: I4af494a7a7fabe496e2d3442084cb823ec177b04 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update docs to match what we ported to rhiLaszlo Agocs2020-06-3099-645/+10
| | | | | Change-Id: Ic3a59aca725b149454f6b3f8eb16c25b528fd309 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* License the Qt Graphical Effects module under BSDVolker Hilsheimer2020-06-3050-1011/+1561
| | | | | | | | | | | | Change license headers in source files, update copyright year for Qt Company entries, remove GPL and LGPL license files, add a 3-clause BSD license file. Tests and tools continue to be licensed under GPL with Exceptions. Fixes: QTBUG-85256 Change-Id: I7a772c7746a00dd6aa3e6401a048a9229c291f6f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add missing overrideAlexander Volkov2020-06-102-2/+2
| | | | | Change-Id: I36f330706be9ca8e4fb98a53656c9a359bd4d168 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Port 17 effects to RHI, remove 8 unportable onesLaszlo Agocs2020-06-09150-6307/+872
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following are based on static shader code, and after porting the shaders they will work fully identically to 5.15: FastBlur Colorize OpacityMask BrightnessContrast ColorOverlay Desaturate Displace GammaAdjust HueSaturation LevelAdjust RectangularGlow Thresholdmask LinearGradient RadialGradient ConicalGradient The following change behavior: Glow DropShadow These now only have the fast variants, because those rely on static shader code. So we are going back to the Qt 5.5 versions and make them behave as if 'fast' was always set to true. The 'fast' and 'samples' properties are removed. The following are removed: Blend GaussianBlur DirectionalBlur MaskedBlur RadialBlur RecursiveBlur ZoomBlur InnerShadow The autotest and the gallery application (run qmlscene testBed.qml in tests/manual/testbed) have been adjusted accordingly and now work across all QRhi backends. The docs may still refer to removed effects in some code snippets. Updating that is left as a separate exercise. [ChangeLog] Graphical Effects no longer relies on dynamically generated shader strings. The following effects have been removed: Blend, GaussianBlur, MaskedBlur, RadialBlur, RecursiveBlur, ZoomBlur, InnerShadow. Glow and DropShadow always use the 'fast' variant. The fast and samples properties for these are thus no longer applicable and have been removed. Change-Id: Ife83f3828f37977596fd34f8da8b61961f0ed28a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix gaussian blur with non-integer device pixel ratioJonas Karlsson2020-05-141-1/+1
| | | | | | | | | [ChangeLog][Gaussian Blur] Fixed an issue where the effect would be broken or incorrect if using a display with a non-integer device pixel ratio. Task-number: QTBUG-82830 Pick-to: 5.15 Change-Id: I108426f5dfcddbc58dad4b3ba8e5b9c9dee9c8e0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakewip/cmakeAlexandru Croitor2020-03-128-15/+8
|\ | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: I8a0df5349aae350fece964ba6411af58e4a2357d
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-291-1/+1
| |\ | | | | | | | | | Change-Id: I53ca730b8470ac1cd8f0f78b88104da12635eb8e
| | * Update plugins.qmltypes for 5.15v5.15.0-beta4v5.15.0-beta3v5.15.0-beta2Jani Heikkinen2020-02-251-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-82253 Change-Id: Ice366969cb78b6229ecb311362292da2d02dbe55 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-058-15/+8
| |\ \ | | |/ | | | | | | Change-Id: If155dc1c43a85bbf19428e9eb2a6c045e26e0519
| | * Update plugins.qmltypes for Qt 5.14Kai Koehne2019-10-281-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: Ifc785ed86236fad0e8af8426003a1362c5ae7eae Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * Fix interpolation of effectsMitch Curtis2019-10-247-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6f02d6fc made relevant effects respect the smooth property of the layer, but made a few mistakes in the interpolation binding: - It got the order of the ternary operator branches wrong: Nearest was used when smooth was true, when it should have been Linear. - It uses the smooth property of the layer, which is automatically set by QGfxSourceProxy::updatePolish() as a result of setting its interpolation. - It also used the smooth property of the rootItem, which is the overlay itself, and not the source item. It would make more sense to base it on the smooth property of the source item, since all Item-derived types have this. Somehow (and luckily) this didn't result in any visible issues. Task-number: QTBUG-67382 Change-Id: I264579505b4195f5d19e1869e7e579d75bf97d5d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Regenerate projectsAlexandru Croitor2020-03-124-12/+13
| | | | | | | | | | | | | | | | | | | | | Change-Id: If53bcd94a338c62bf69ed7f74c6a8bc5ff4818ed Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Regenerate projectsAlexandru Croitor2019-11-152-4/+2
| | | | | | | | | | | | | | | | | | Change-Id: I3499e0bfaefec73f16132a3da6dd2e5088dc7879 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-151-0/+4
|\ \ \ | |/ / | | | | | | | | | | | | Removed dependencies.yaml. Change-Id: Ibf6aad469825a7dc24059e48157c241f2e0d0c2d
| * | Merge remote-tracking branch 'origin/wip/qt6' into devSimon Hausmann2019-10-042-4/+6
| |\ \ | | |/ | |/| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I4860eb2ddcf1a7755ed62a4dd8d60936346125d5
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-241-0/+4
| |\ \ | | | | | | | | | | | | Change-Id: Id486a01e0d73f138fc7e18ede2f2bfbba7b9ddfd
| | * | Doc: add caveat about high spread values in GlowEirik Aavitsland2019-08-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-74834 Change-Id: I4940bb5ace7ef7a36428ef4e3ff72b81f5391575 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | | Regenerate before mergeAlexandru Croitor2019-10-153-41/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I15eef405dd8d1323850a22daf7258fb755d36dc1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Fix cmake configure stepSimon Hausmann2019-09-193-41/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-generate CMakeLists.txt after the declarative cmake API changes. Change-Id: I7e2dd4ed121ce836a83e33c47017b115ad4208dc Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-08-165-120/+111
|\ \ \ \ | | |_|/ | |/| | | | | | Change-Id: Id5ceea2d4517a91f6ce5039711669ea419aad4c3
| * | | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-08-112-2/+4
| |\ \ \ | | |/ / | | | | | | | | Change-Id: I24471e6fd433c738dcce3de46071da22cfe6ae5a
| | * | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Qt Forward Merge Bot2019-07-111-2/+3
| | |\ \
| | | * \ Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-111-2/+3
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I82a19a2f5dfb90945d5ce9ecc61c81c9a6fde3a3
| | | | * Account for the device pixel ratio when showing a DropShadowAndy Shaw2019-07-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The radius and samples needs to be multiplied by the device pixel ratio so that it looks as it would if it was on a non HighDpi screen. So the size of the shadow still looks the same size and as good. Change-Id: Ifa87ec6fad5cdded1a7b1888b2e8c74bcc3f0b54 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | | Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-07-091-0/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-74391 Change-Id: Id8ebd8b70759da5e7187cfdc71191435462328ca Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | Initial CMake portAlexandru Croitor2019-08-154-0/+257
|/ / / | | | | | | | | | | | | | | | Task-number: QTBUG-75999 Change-Id: Id47cd7a769a27a6776ced0ce92b89a8bdf4f7da1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix Qt6 buildAlexandru Croitor2019-08-012-4/+6
|/ / | | | | | | | | | | | | | | | | | | | | Modify all the qmlRegisterModule calls to use minor version 15 because minor version zero from 6.0.0 would make tests fail. This is similar to what was done in qtdeclarative in c147b20a2c1299b2d659fe7c9472ae3866b6a425. Change-Id: I13b4f6c647dc808f91cc9e38ec22af7860b93022 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Doc: Fix documentation issuesv5.13.0-beta3v5.13.0-beta2Topi Reinio2019-03-272-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | RadialGradient.qml tried to document two properties with a single comment block - QDoc supports this, but only if you specify the properties with multiple \qmlproperty commands. Also clear the moduleheader .qdocconf variable, as this module has no C++ API. Change-Id: Ic69ba94f6031c77d249c0b4278cff7f35344fcf9 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-271-3/+3
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ie477dc9e9d78eb81ba54a44ac7d1621282bf5f28
| * Doc: Fix snippet to use latest version for QML importKai Koehne2019-03-221-3/+3
| | | | | | | | | | Change-Id: I8098a28d82bd2f6b6ff722441c7ca6dcd4551cc2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Update plugins.qmltypes for Qt 5.13Kai Koehne2019-03-212-3/+3
|/ | | | | | Task-number: QTBUG-73484 Change-Id: I6a09bd2dfd67d2d36fa8054cefbac5a86db8e3d4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix GammaAdjust shader pathJoni Poikelin2019-01-221-1/+1
| | | | | Change-Id: I481085825fd05c43c9a4710d7a6c58c619737cf1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Support the import of from 1.0 to 1.QT_VERSION_MINOR-1v5.12.15.12.1Liang Qi2019-01-091-0/+2
| | | | | | Task-number: QTBUG-72270 Change-Id: Id13708b1f4ef5c890037dac8b6225c3e096d88b0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Add the missing \QtMinorVersion argumentVenugopal Shivashankar2018-12-241-2/+2
| | | | | | | | | Without this argument to the \qml...\endqml block, \1 will not be translated to the Qt minor version. Change-Id: I73741639a060c532726044b098cececdf795ee78 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Merge 5.12 into 5.12.0Oswald Buddenhagen2018-10-3035-70/+77
|\ | | | | | | Change-Id: I8a0e5853af30d185e426000561057210f432ac3d
| * Doc: Fix \code command usageTopi Reinio2018-10-251-1/+3
| | | | | | | | | | | | | | | | | | Since Qt 5.12, \code command accepts parameters, and in-line usage no longer works (and wasnever documented to work). Task-number: QTBUG-70980 Change-Id: I06e59b4a6fc91a5359d76cc6969a295384f52f94 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * add qmlRegisterModule to QML plugins (QUIP 99)Shawn Rutledge2018-10-2335-69/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now it should always be possible to do import QtGraphicalEffects 1.m where m is Qt's minor version. [ChangeLog][Qt Graphical Effects] In Qt 5.12 and newer versions, this module is available with the same minor version as the Qt release minor version number. For example import QtGraphicalEffects 1.12 will work in Qt 5.12, even though there has been no API change, and the maximum possible import version will automatically increment in future Qt versions. This is intended to reduce confusion. Change-Id: I4fa13fa9a662933161ff726a3e2ba586b2f7f6ff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Docs: import version 1.12 (QUIP-99)Shawn Rutledge2018-10-2928-56/+58
|/ | | | | Change-Id: I514b09a90429c8e9c60f9c7b312d3197e2b23a41 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-06-161-1/+6
|\ | | | | | | Change-Id: Id2762b6e8b03f0e7ae990dad288100f8f4cbb67e
| * Do not try to create a surface if context creation failsAndras Mantia2018-06-141-1/+6
| | | | | | | | | | | | | | | | | | | | If context creation fails and we try to create a surface, this might end up creating a new window that steals the focus from the existing one. This was visible with a full-screen embedded application using the software renderer and a QML code using "layer.enabled: true" Change-Id: If72255a8447d88198249c2d6571aea27d8549b9b Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Make relevant effects respect layer.smoothMitch Curtis2018-05-297-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, source items that set smooth to false will have blurry effects when using layer.effect. Fix that by setting the interpolation property of each effect's SourceProxy. Standalone effects seem to work fine already. The patch adds a manual testcase: "smooth". This can be used to verify that the functionality works in the future, as adding an auto test is not really possible. This isn't done for all effects, as it doesn't make sense for all of them (blurs, for example). Task-number: QTBUG-67382 Change-Id: Ic6f030090cd0579dd4259ebafc9c99a8b9940494 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Remove the code to manually initialize resources in static buildsSimon Hausmann2018-04-262-17/+2
|/ | | | | | | | | After commit be9a56e5e3ced5d0d668fa24e4c65ae928f2e25a in qtbase, this is not needed anymore. Instead the resource system injects the plugin entry point with a reference to all resources. Change-Id: I008dcbc44f3722184fb4cdf7c231c6a9c18cc86d Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix typosJarek Kobus2018-02-144-4/+4
| | | | | Change-Id: I333a33a65ce4ff2469f7eb66663808cb75d756a2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-201-0/+1
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I56e694eec6b9196e1e5db256569b95cf580d5735
| * Fix static buildsJoni Poikelin2018-01-121-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-64775 Change-Id: I93418fc835723b90f8d2b2d212021eb8753e6508 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-207-9/+20
|\ \ | |/ | | | | Change-Id: Ie491ceab6e3c3111b87c03490dd36deb601f045f
| * Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta4Liang Qi2017-10-307-9/+20
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/effects/private/qgfxshaderbuilder_p.h Change-Id: I27fbd2a8d7bf5bd89d94925a2da9ae3aa0748f42
| | * Add plugins.qmltypesMarco Benelli2017-09-211-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Even if there are no public components defined in C++, adding the `plugins.qmltypes` will prevent QtCreator to try to dump the module. Task-number: QTCREATORBUG-18952 Change-Id: I632342a05579957e123bbaa8bcfb3bbaec29232e Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
| | * Doc: "strenght" => "strength"Mitch Curtis2017-09-204-7/+7
| | | | | | | | | | | | | | | Change-Id: Idbb66dc94eec5cfacf3a52c35059b7d54a424fe2 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>