aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-145-6/+6
|\ | | | | | | | | | | | | Conflicts: tests/auto/qml/debugger/qv8profilerservice/qv8profilerservice.pro Change-Id: I2fd99ed8bd03302b9bbf31e6f21990f6455c4f1c
| * Fixed text opacity when using Text.NativeRendering.Yoann Lopes2013-03-121-1/+1
| | | | | | | | | | Change-Id: I76922074c02c368f8a8a6998c478a33537e9a6e8 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Fix headers without Qt module directory name in their includesJosh Faust2013-02-254-5/+5
| | | | | | | | | | | | | | | | | | | | Fixed headers to include the Qt module directory in their #include directives, e.g. <QtCore/QObject> instead of <QObject>. QTBUG-29797 Change-Id: I6f61973deb4e48158d3eff896afd81ca4b8ae960 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Polish usage of a QElapsedTime instance in QSGThreadedRenderLoopJędrzej Nowacki2013-03-131-1/+3
| | | | | | | | | | | | | | | | The patch should make valgrind happy, by not using an uninitialized memory. Change-Id: Iec7f16c56f250dd121a37f03da4cfc5d9e5c0742 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Abort rendering when QOpenGLContext::create/makeCurrent fails.Gunnar Sletta2013-03-131-5/+13
| | | | | | | | | | | | Task-number: QTBUG-30158 Change-Id: Ic8239fe6f074c989e4474d46042e1a82796b4908 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Fixed incorrect vsync delta time in QSGThreadedRenderLoop.Yoann Lopes2013-03-121-1/+1
| | | | | | | | | | Change-Id: I32bb720e9c9aa0278959dd64e5e1c449bdace7d1 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Create the sg render thread's opengl context on the GUI threadGunnar Sletta2013-03-121-34/+12
| | | | | | | | | | Change-Id: I710d80ebb4e5a12fda1f58f54089b0e72268dfcf Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Fix rendering of subpixel positioned native textEskil Abrahamsen Blomfeldt2013-03-073-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To get accurate sampling of the native text rendering, we use nearest filtering. This, however, does not work well when we're sampling in the middle of pixels and the result is that with text which is positioned at 0.5 offsets, we will sample the wrong pixels and get artifacts from this. The main use case for native rendered text is unrotated and unscaled text, so we fix this use case by pixel-aligning the translation factor. Done-with: Samuel Task-number: QTBUG-30022 Change-Id: I6911196d6ff491dca3b329c42da1c6dd7263cff0 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Android support: build fixesPaul Olav Tvete2013-03-051-1/+1
| | | | | | | | | | | | Change-Id: If829341b0baef7b253a386a195d3b5e4238b8103 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-03-042-4/+4
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-252-4/+4
| |\| | | | | | | | | | Change-Id: Ia02971527a2d1a80c5624d69330428818aab3a41
| | * Fix warnings about shadowing membersThiago Macieira2013-02-222-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | util/qqmlpropertymap.h:87:9: error: declaration of 'parent' shadows a member of 'this' [-Werror=shadow] [and others] Change-Id: I2ff1a3c133efe2132e74dad00596931a84a7f421 Reviewed-by: Alan Alpert <aalpert@rim.com>
* | | Added examples on how to use FBOs with scene graph.Gunnar Sletta2013-03-033-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I also cleaned up the naming of the other scene graph examples a bit, so that they sort together in the samples list and have a more obvious naming scheme. Task-number: QTBUG-29548 Change-Id: I455eacb02c06058a6d49e12e4f1813ec80b655f6 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | Avoid ambiguous include guards in SG classesGunnar Sletta2013-02-2617-42/+42
|/ / | | | | | | | | | | | | | | | | These include guards stem from the olden days before the QSG prefix and many of them are conflict prone, which can lead to pretty bisarrer errors for the user. Change-Id: I0e76c68a588404b6e82be9ecc2e7afa3b9a48e78 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Make sure exposeEvents trigger a render passGunnar Sletta2013-02-212-1/+5
| | | | | | | | | | | | | | | | We needs this on non-compositing window managers to trigger repaints on partial updates. Change-Id: Ied5f3e854173c5e00ad7e1222aeb66eb9c96158c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Don't print leak warnings on exit by defaultGunnar Sletta2013-02-203-19/+38
| | | | | | | | | | | | Task-number: QTBUG-29780 Change-Id: I6f35253dbec6346af239c0ab341caad9f4f9b862 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-02-191-2/+1
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-181-2/+1
| |\| | | | | | | | | | Change-Id: I33db683ebf12248b2ed14eeaf65c4bcade14bfbf
| | * Remove use of QPainter::HighQualityAntialiasing. It has no effect.Gunnar Sletta2013-02-121-2/+1
| | | | | | | | | | | | | | | Change-Id: I7e1d07a9f34d6edf9dbe3449d34636f700218532 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | | Improved animations in the new render loopGunnar Sletta2013-02-192-98/+89
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To advance animations in line with vsync, we used a dedicated event from the rendering thread which we fired immediately after sync. This is a bit elaborate as we know in Gui when sync is complete and we can just animate there and then. This means we can remove all animation logic from the rendering thread, making it simpler. I also updated the syncAndRender pass so that it does not render anything if the scene graph reported no changes during the sync pass. This will prevent non-visual animations and property updates from triggering render passes which will save quite a few cycles. Change-Id: I62bb5484f0673f99abe726fca5a9b424f6b0a317 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | GUI render loop did not render on expose, nor clean up properly.Gunnar Sletta2013-02-181-4/+13
| | | | | | | | | | Change-Id: I6f9ab43ad6d149295487d9f69ceb0131cd142776 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | only instantiate variable when requiredMaurice Kalinowski2013-02-131-1/+1
| | | | | | | | | | | | | | | | | | variable is only used for debugging purposes, where debugging part is inside preprocessor check. Creation of the object should be there as well. Change-Id: I6c9e842ad05d8e45f6d67f5e5dedebc896cda157 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Make sure deleteLater gets run at the "correct" time.Gunnar Sletta2013-02-071-16/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a number of places where we delete scene graph objects with deleteLater() and change the scene graph. The timing of when the deleteLater happens is very important as we need to complete the updates to the scene graph first. In this particular case, a QQuickShaderEffectSource was released, and an update was scheduled but because animations were running we were already beginning to render a new frame before the update was handled, causing a crash. The only safe place to run deferred deletes is after we have performed a proper sync with the item scene. Task-number: QTBUG-29485 Change-Id: I6e93d4e6276fe82d3f4c818781b188e03c46e510 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Avoid swizzling on OpenGL ES when possibleGunnar Sletta2013-02-061-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for APPLE_texture_format_BGRA8888, IMG_texture_format_BGRA8888, EXT_texture_format_BGRA8888 and EXT_bgra. The apple one acts just like the desktop EXT_bgra one, so they need slightly different handling than the ES extensions. This change also has the benefit that we no longer have a dedicated ES path. Change-Id: Ibf6dbf7548ca16a1bada61c677181d8f809c69a2 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Enable sorting of opaque items again in the default renderer.Gunnar Sletta2013-02-052-4/+3
| | | | | | | | | | | | | | | | | | | | | | This was disabled a long while back because we thought the code was broken, and it turned out the problem was that our sort function had a bug. b570d384c0704ea12364e353493eeb6f1ae34cd3 fixed the actual problem, so now we reenable it. Task-number: QTBUG-28563 Change-Id: I4032df82a1fd4cf7f775c8c64302c18239879fea Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Warn if the OpenGL context lacks depth/stencil when requested.Gunnar Sletta2013-02-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | I thought this was a serious bug in the renderer, but it turned out to be qmlscene just overriding the surface format without requesting the needed depth and stencil buffers. An easy mistake to make, hence introduce the warning. Task-number: QTBUG-29037 Change-Id: I59d09d1b2a139e3add851777ff2eeb6c4efb47ec Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Dereference the QImage once the corresponding texture is bound.Michael Brasser2013-02-013-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not require a reference here, as the texture is only bound once. It is the texture factory that is reused (when QQuickWIndow::setPersistentSceneGraph(false) is set and the window is hidden and then re-exposed). With this patch it becomes trivial to create a custom QSGContextPlugin with a texture factory that does not retain the QImage, freeing up memory. This is useful in the case of an embedded system with only a single window that is never hidden or re-exposed. Change-Id: I1cfa6efc3a2e9e641b456bf90c55d563061757b8 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Added to QML_RENDERER_TIMING logic to capture most render bottlenecks.Gunnar Sletta2013-01-305-22/+140
| | | | | | | | | | | | | | | | | | The typical bottlenecks during rendering are usually compiling shader programs, uploading textures and preparing glyphs, so add profiling data around them. Change-Id: I9c330a0f6b769836d303a035b2c0dce832842aec Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2829-116/+0
| | | | | | | | | | | | | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* | Complete rewrite of threaded render loop.Gunnar Sletta2013-01-188-8/+1637
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change starts using the superior implementation of the scene graph render loop which has been worked on in the scenegraph-playground project for a while. It uses a far more straightforward locking/sync paradigm compared to the existing one and is less deadlock and error prone. It also enables the scene graph thread to run on its own when the GUI thread is blocked, enabling threaded animations. This changes also introduces a naming change inside Qt Quick from "Window Manager" -> "Render Loop" as that fits better to what the code does. Change-Id: I1c2170ee04fcbef79660bd7dae6cace647cdb276 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Merge branch 'stable' into devGunnar Sletta2013-01-1767-68/+123
|\| | | | | | | | | | | | | | | Conflicts: src/qml/doc/qtqml.qdocconf src/quick/doc/qtquick.qdocconf Change-Id: I087fa14720995a5e53c43567dc4a3c29eb9992a9
| * Enable sub-pixel anti-aliasing for default builds on WindowsEskil Abrahamsen Blomfeldt2013-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | While ANGLE builds only provide the OpenGL ES2 APIs, it's still a desktop technology and we should default to using high quality anti-aliasing. Task-number: QTBUG-28782 Change-Id: Iefc764589e935899ead278cedef4c302694dd2bb Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Greatly improved Scene Graph Overview documentationGunnar Sletta2013-01-166-0/+32
| | | | | | | | | | Change-Id: I86b6bb9007d268ec039614a1693ecd839901e6d9 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-1067-67/+67
| | | | | | | | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| * Documentation for scene graph examples.Gunnar Sletta2013-01-071-0/+23
| | | | | | | | | | Change-Id: Idb39fc0b6d5e538b90ae8a0b98d9f4d77e1fb617 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Disable blending of opaque Rectangle elementsGunnar Sletta2013-01-171-0/+3
|/ | | | | Change-Id: If456248c10c24c3d2f2a383f29e72c74d2dee8bf Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Work towards supporting front-to-back reordering of opaque items.Michael Brasser2012-12-122-10/+9
| | | | | Change-Id: Ic3b9defa6ac61409adcfb2b5cb8167698ed00255 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Reduce number of relocationsMarc Mutz2012-11-231-2/+2
| | | | | | | ...by turning pointer into array variables. Change-Id: Ia5a0cedcf28d54210cc1f179db5c519e7e0672cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix syncqt-warnings.Friedemann Kleint2012-11-204-5/+5
| | | | | | | Use include with module name in the public headers. Change-Id: I50d3767a5538bc3f935ebf61b56894c8f0461981 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Make Rectangle border be inner instead of centered on the outline.Samuel Rødal2012-10-221-18/+8
| | | | | | | | | | | | | This avoids awkward situations such as when clipping to a parent item of the same size and makes it easier to reason about the bounding rectangle of the item. Task-number: QTBUG-21341 Change-Id: If015cfbc5792429f4a407fc0547ea71eca779eda Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Fix potential crash when using text and more than 1 QQuickViewEskil Abrahamsen Blomfeldt2012-09-282-7/+20
| | | | | | | | | | | We need to use a resource guard for the FBO in case there is no current context when the glyph cache is deleted. This reverts commit b3264e2cb6a8fe87754aa1335ab9f8d5e3910c14 which was implemented as a band-aid for this crash. Change-Id: I5b3a09a3998da38836ea851cd0978d3ddadcd2cc Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Work around mis-optimisation on QNX/SGX in AA vertex shaderSean Harmer2012-09-262-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | The new AA algorithm which is implemented in the vertex shader of SmoothColorMaterialShader and SmoothTextureMaterialShader exposes a driver bug in the glsl compiler/optimiser for the GPU used in the BlackBerry PlayBook. The bug results in the if (scale < 0.0) scale = 1.0 code always being executed even when the condition is false. This leads to massive corrupion of Image, Rectangle, and BorderImage elements when the antialiasing property is enabled. This commit works around the compiler bug by refactoring the vertex shader to explicitly include an else clause. The check for negative values is now performed on the numerator only as the denominator is dot(dir, dir) which is always positive (square of magnitude of dir vector). This gives the correct behaviour on all platforms (that I have access to). Change-Id: I236542c9b59ff2915e95cbd9300b442be316bba9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2367-1610/+1610
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Avoid hanging if glGetIntegerv() fails.Jason Barron2012-09-211-1/+1
| | | | | | | | | If 'count' is not initialized, it could be anything and if the call to glGetIntegerv() fails and leaves this value unchanged then the loop could go through any number of iterations. Change-Id: Ibdcfd018b70e265ef6aeab87a5df8c0530c653a7 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* doc: fix some more typosSergio Ahumada2012-09-101-1/+1
| | | | | Change-Id: I7fa055049b9e5900d597754c6004febb153de12b Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* doc: fix some typos in .cpp filesSergio Ahumada2012-09-076-8/+8
| | | | | Change-Id: Ica7685aefde84ec80d8af7a67541af454de4adce Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Doc: Fix documentation issues.Kim Motoyoshi Kalland2012-09-073-1/+18
| | | | | Change-Id: I03c4faa1aee60cd1ad706cb6c1b983f03311d251 Reviewed-by: aavit <qt_aavit@ovi.com>
* Doc: Fix some documentation issues.Kim Motoyoshi Kalland2012-09-051-4/+0
| | | | | Change-Id: I0f7e60fd6060381bd8790dfaacc3a39a890a0fe7 Reviewed-by: aavit <qt_aavit@ovi.com>
* Document QSGTexture.Jason Barron2012-08-271-0/+41
| | | | | | Task-number: QTBUG-23192 Change-Id: I4a91dfaa0aa80d3cdc6c785fcaefdeafe60a2149 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix compilation on OSX 10.6Sean Harmer2012-08-211-2/+2
| | | | | | | OS X 10.6 does not support the GL_ARB_framebuffer_sRGB extension. Change-Id: Ifea8eaf3ffca6242d908538afeb983131a113c73 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>