aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickshadereffectsource.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Release GL resources of ShaderEffectSource while we still have GL.Gunnar Sletta2013-12-031-3/+12
| | | | | | | | | | | | | 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-2/+17
| | | | | | | | | | 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-17/+14
| | | | | | | | | | | | | | | | | | | 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>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-021-10/+10
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@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>
* Doc: Fixed and updated Qt Quick's \qmlmodule pageJerome Pasion2013-09-251-1/+1
| | | | | | | | | | | -incremented version to Qt Quick 2.2 (in \qmlmodule page) -import changed to QtQuick 2.2 -\inqmlmodule no longer needs the version. QDoc will ignore the version but it is better to remove it now to avoid confusion Task-number: QTBUG-32172 Change-Id: I40b52e59667014720be40a35b3a8fb9836825e31 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Made Qt Quick items' \since consistent.Jerome Pasion2013-09-251-1/+1
| | | | | | | | | | | | | | | | Qt 5.2: -"\since QtQuick 2.2" -> "\since 5.2" Qt 5.1: -"\since QtQuick 2.1" -> "\since 5.1" -"\since Qt 5.1" -> "\since 5.1" Qt 5.0: -"\since QtQuick 2.0" -> "\since 5.0" Task-number: QTBUG-32172 Change-Id: I699b00b31373a434ddb8f4caccfef40c588bf8a4 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Initialize variables in ShaderEffectSource's texture provider.Gunnar Sletta2013-08-281-0/+4
| | | | | Change-Id: I3d737b923ee0282f58d7a2ee96824f184469daf5 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Do not draw negative-size ShaderEffect(Source) items.Gunnar Sletta2013-05-281-1/+1
| | | | | | | | | | | | | | | We were a bit inconsistent here. A negative size Image element would not render at all, a negative size ShaderEffect would render mirrored and a negative size ShaderEffectSource would trigger an assert. Be consistent and not draw any of them. DropShadow from QtGraphicalEffects uses both a ShaderEffectSource and a ShaderEffect together, so keeping the behavior in ShaderEffect would make it render incorrectly. Task-number: QTBUG-31383 Change-Id: Ied5568d7edbc2aed96b00adfdc6aae09b6f2a7d9 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Doc: Qt Quick: Fix module name format (Pt 1/2)Sze Howe Koh2013-04-231-2/+2
| | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation Attempt to differentiate between the whole module ("Qt Quick") and the QML import ("QtQuick") by encoding the latter with monospace font. There are places in the text where both representations are valid. Change-Id: Id6e157a4191aaa4e23a9cd5c76abfe902fe43d33 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix distance field antialiasing for retina displays.Gunnar Sletta2013-04-021-3/+7
| | | | | | Change-Id: I01d7d41a4e70822555bae453978dbe92fbb5c98d Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Introduce QML_FBO_FLUSH_BEFORE_DETACH to work around FBO issue.Michael Brasser2013-03-121-0/+3
| | | | | | | | | | On some AMD hardware, detaching the depth attachment immediately after rendering to an FBO will cause rendering issues. Adding an explicit glFlush before detaching seems to work around the issue. Task-number: QTBUG-29265 Change-Id: I97c7b87c1c3d3a69a4d6228dd9459745710c5f4c Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.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>
* Fix other warnings in qtdeclarative found by GCC 4.7Thiago Macieira2012-12-231-0/+1
| | | | | | | | | | | | | qml/qml/qqmlimport.cpp:982:30: error: unused parameter 'errors' [-Werror=unused-parameter] quick/util/qquickanimationcontroller.cpp:66:6: error: unused parameter 'job' [-Werror=unused-parameter]' quick/items/qquickshadereffectnode.cpp:160:17: error: case value '38' not in enumerated type 'QVariant::Type' [-Werror=switch] quick/items/qquickwindowmanager.cpp:286:60: error: 'renderTime' may be used uninitialized in this function [-Werror=maybe-uninitialized] quick/items/qquickitem.cpp:5267:67: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] and a few more repeated from the above Change-Id: Id1950c6ba98f7f8475975716b21bd795ecb4bd20 Reviewed-by: Alan Alpert <aalpert@rim.com>
* Qt Quick high-dpi support.Morten Johan Sørvig2012-12-011-0/+5
| | | | | | | | | | | | | | Set the device and viewport rect to the full device pixel size. Set the projection matrix to the device independent pixel size. Scale shader effect source texture sizes. Change-Id: I61dd546ff36a7ce6ad05f908796555674c714c1a Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@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>
* Update usage of smooth and antialiasing.Michael Brasser2012-08-281-2/+3
| | | | | | Change-Id: Icc8b28bdd466389ed3f269f076f1bdb6e9abe3f2 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix uses of \inmodule, \inqqmlmodule and \sinceBea Lam2012-08-081-1/+2
| | | | | | | Some classes and QML types were missing these or had the wrong values. Change-Id: Ic6376b8b450301f8ae0549e636f4bc2db4400f2b Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix uses of various qml doc commandsBea Lam2012-08-081-10/+10
| | | | | | | | | | | | | | Signals documented with \qmlsignal should indicate handler name, i.e. 'onSignal' rather than 'signal'. Methods documented with \qmlmethod do not need to document 'void' return values. Also the name of any documented attribute should be qualified with 'QtQuick2::<qmltype>'. Change-Id: I206dd9e8f39c3b84e029ae9d4101b05d0bfb3478 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiates.Jerome Pasion2012-07-301-1/+2
| | | | | | | | | | -To simplify QDoc, \qmlclass is now \qmltype. -'\instantiates <C+++ class>' is for the types that are defined in C++. Change-Id: I29242d33daf7b972d8b86a356b9689638866b950 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QQuickCanvas renamesAlan Alpert2012-07-171-14/+14
| | | | | | | | | | | | | | | | QQuickCanvas is now called QQuickWindow QQuickCanvas::rootItem is now QQuickWindow::contentItem QQuickItem::canvas is now QQuickItem::window QQuickItem::ItemChangeData::canvas is also renamed window QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow The functions related to the color property have dropped the clear from their names. The first three changes have interim compatibility measures in place to ease the transition. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix 'Unknown commands' in qtdeclarative documentation.Yann Bodson2012-07-171-1/+0
| | | | | | Change-Id: I179eb828a84af4feb834bac7159d5e1988cc3deb Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Change Quick docs to refer to "types" rather than "elements"Martin Jones2012-07-161-14/+14
| | | | | | Task-number: QTBUG-24785 Change-Id: I223479b879514abaacb123852323c1cfada7a5e1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Change antialiasing method for QML2.Kim Motoyoshi Kalland2012-07-131-1/+1
| | | | | | | | | | | | | Since multisampling can require a lot of memory, and might not be supported on some hardware, turn off multisampling and implement antialiasing in the vertex shader instead. The alternative method of antialiasing is implemented for Rectangle, Image, BorderImage and AnimatedImage, and must be explicitly enabled by setting the new antialiasing property. Task-number: QTBUG-26268 Change-Id: I39a93d978658a494bf51e9f0fd02d8414eb8be12 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Let ShaderEffectSource use same multisample count as GL context.Kim Motoyoshi Kalland2012-07-041-7/+11
| | | | | Change-Id: I9b772a2c405c2fab13dfee3527212117de16e9c0 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Create new documentation structureChris Adams2012-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | The documentation currently has no clear separation between Qt QML and Qt Quick. With recent commits like: 6c8378eaf1edbbefe6aaa3672b0127816a004fd7 and ab1e510121c8a679fdaca12ccd30e0f7ac12a26b the separation between the language definition and implementation, provided by Qt QML, and the standard library for the QML language, provided by Qt Quick, is clear. This commit creates a new documentation structure that is more navigable and separates concepts into logical categories, with clear separation between QtQML and QtQuick. It also provides a more generic QML Application Developer Resources page which contains links to information for QML application developers. Change-Id: Ia807ccfbfd24ffa0e1c7f0a51ed9d2ed3aa6a733 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Doc: Grouped Qt Quick types into several groupsJerome Pasion2012-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -created new groups and converted some overviews into group pages -edited type documentation and added \ingroup -articles still need title fixes and link fixes Groups: qtquick-visual-types qtquick-item-graphics qtquick-shaders qtquick-canvas qtquick-text qtquick-text-validator qtquick-interaction qtquick-positioners qtquick-transformations qtquick-states qtquick-animation-define qtquick-animation-properties qtquick-animation-control qtquick-animation-modifiers qtquick-images-sprites qtquick-images qtquick-models qtquick-containers qtquick-views qtquick-paths qtquick-utility Task: QTBUG-25685 Change-Id: I81d4df3320bf5daad5cabb5e42408013fb24f464 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Doc: Sanitized QML typesNico Vertriest2012-05-241-2/+1
| | | | | | | | | | -modified \brief -checked QML modules -added qml directory to the qdocconf file -added particles directory to the qdocconf file Change-Id: I589e32d3106cda37c7fa4d55a941afd9876fc2b2 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Always emit signal after ShaderEffectSource::scheduleUpdate().Kim Motoyoshi Kalland2012-05-211-10/+6
| | | | | | | | | | | | | | The scheduledUpdateCompleted signal was originally added so that you can take some action after updating a ShaderEffectSource with scheduleUpdate(). However, before this commit, the signal would not be emitted if the ShaderEffectSource was already up-to-date. Instead, the signal would be delayed until the next time the ShaderEffectSource was redrawn. This commit ensures the signal is emitted even if the ShaderEffectSource is already up-to-date. Change-Id: Idd22cdea1f7c14ed7a45081c98b8cfbef896dccd Reviewed-by: Kim Gronholm <kim.1.gronholm@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove unused variable.Kim Motoyoshi Kalland2012-05-211-1/+0
| | | | | Change-Id: I49fee9c96a9f1b54a790d2dd8a3d1f0a3c7f8a5a Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Add a note in the docs about FBO multisamplingGunnar Sletta2012-04-191-0/+8
| | | | | Change-Id: I4c0b522ce937e681a9208cc94a1265f6b10ebcd3 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Release FBOs held by the shader effect source sooner.Kim Motoyoshi Kalland2012-03-271-2/+28
| | | | | Change-Id: I2bdb4a9e4da50afff6752c2c0fd7e60041ede14f Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Share depth-stencil buffers between ShaderEffectSources of same size.Kim Motoyoshi Kalland2012-03-221-5/+40
| | | | | Change-Id: If325a38175249c3a3ffe5043d42ba35dbf90ce0c Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Free ShaderEffectSource FBOs when no longer needed.Kim Motoyoshi Kalland2012-03-211-20/+43
| | | | | | | | This commit also fixes handling of texture provider deletion in ShaderEffect. Change-Id: Ib22a9308a35325972bc545cf29de11bd625b22b2 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-131-12/+12
| | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I62d203f21df63a95ee236e578b10418fd9680707 Reviewed-by: Jerome Pasion <jerome.pasion@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>
* Don't re-parent ShaderEffect source items.Kim Motoyoshi Kalland2012-01-021-9/+25
| | | | | | | | | | | 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/+921
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>