aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgtexture.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-05-311-1/+4
|\ | | | | | | Change-Id: Iea0bb0788357bc615d0e9ea411087114b8b3b720
| * Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-05-021-1/+4
| |\ | | | | | | | | | Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| | * Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+3
| | | | | | | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Support for Q_OS_ANDROID_EMBEDDED and android-embedded buildsOtto Ryynänen2017-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Native Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build native Android builds (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I1007eb010545374038e2d09a053fe25f884efeba Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-04-251-0/+2
|\| | | | | | | | | | | Change-Id: If2e7c1cf0f1522f6052bbc3e3636ef62bef1b4db
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-211-0/+2
| |\| | | | | | | | | | Change-Id: Ibed6ee74d36b4ce37391c82db00a0abd30d09e7a
| | * Add \since to QSGTexture::AnisotropyLevelFriedemann Kleint2017-04-191-0/+2
| | | | | | | | | | | | | | | | | | | | | Amends change 5ef3265cd46de6579399562429e26961d6f13885. Change-Id: I6c75273e45e235084e5aea53e83669bab85798ee Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | Document that wrap modes do not work with atlas texturesGunnar Sletta2017-04-041-0/+2
| |/ | | | | | | | | Change-Id: Ifa417644e10b947c4ca0b9c518cfd800b63142b5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-03-011-0/+53
|\| | | | | | | Change-Id: Iba540adaeffb0098fc4e1923050eb611bf47287b
| * Add anisotropic filtering support to QSGTexturePaolo Angelelli2017-01-251-0/+53
| | | | | | | | | | | | | | | | | | | | | | This patch adds support to switch on anisotropic filtering on QSGTexture and to QSGDefaultImageNode. Not adding this support to QSGImageNode since it became public in 5.8, and it does not allow additional virtual methods anymore. Change-Id: Ibf1744845df2297f9129b1b5ce6a69d0a3b31c7c Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* | Add QQuickPathItem and its backend infraLaszlo Agocs2016-12-191-4/+20
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic backend uses the triangulator from QtGui, but is in fact OpenGL-only for now due to materials. The NVPR backend uses GL_NV_path_rendering on NVIDIA hardware with OpenGL 4.3+ or OpenGL ES 3.1+. The software backend simply uses QPainter. With the generic backend each PathItem is backed by a non-visual root node and 0, 1 or 2 child geometry nodes, depending on the presence of visible stroking and filling. The potentially expensive triangulation happens on updatePolish(), on the gui thread. This is proven to provide much smoother results when compared to doing the geometry generation on the render thread in updatePaintNode(), in particular on power-limited embedded devices. The NVPR backend uses a QSGRenderNode in DepthAware mode so that the batch renderer can continue to rely on the depth buffer and use opaque batches. Due to not relying on slow CPU-side triangulation, this backend uses 5-10 times less CPU, even when properties of the path or its elements are animated. The path itself is specified with the PathView's Path, PathLine, PathArc, PathQuad, etc. types. This allows for consistency with PathView and the 2D Canvas and avoids a naming mess in the API. However, there won't be a 100% symmetry: backends like NVPR will not rely on QPainterPath but process the path elements on their own (as QPainterPath is essentially useless with these APIs), which can lead to differences in the supported path elements. The supported common set is currently Move, Line, Quad, Cubic, Arc. The patch introduces PathMove, which is essentially PathLine but maps to moveTo instead of lineTo. More types may get added later (e.g. NVPR can do a wide variety of optimized rounded rects, but this requires directly specifying a GL_ROUNDED_RECTx_NV command, thus neededing a dedicated Path type on our side too) For filling with gradients only linear gradients are supported at the moment. In addition to the declarative API, a more lightweight, QObject-less JS-callable API should be considered as well for the future. Change-Id: I335ad64b425ee279505d60e3e57ac6841e1cbd24 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-9/+9
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-281-6/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The renderers added in 5.8 had to be adapted to the changed profiling macros from 5.6. Conflicts: src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp src/quick/util/qquickprofiler_p.h tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
| * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-251-6/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/quick/util/qquickprofiler_p.h Change-Id: I11a89c2a166115d6697adfba09928805643e709e
| | * QmlProfiler: Explicitly specify the offsets for scene graph eventsUlf Hermann2016-11-241-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The profiler can be switched on in the middle of a frame. In that case the last offset into the timing data would be some random number, which may lead to a crash when recording the sample. However, as we know all the data points we are going to record, we can as well specify where they are supposed to go. The timings themselves may still be random for frames of which we only recorded parts, but the clients can deal with this. Task-number: QTBUG-57304 Change-Id: I1d507f2591516e43d5b3cd25f7939716f2b64ed9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Cleanup some unused functions and variables with QT_NO_OPENGLAndy Nichols2016-06-281-0/+4
| | | | | | | | | | | | | | | | | | | | | Without theses additional #ifdefs building with clang fails. Change-Id: Ib6993b6d14bf73b606e1bcb991f7436a9c4c9638 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Fix build with QT_NO_OPENGL after rebaseAndy Nichols2016-05-081-0/+2
| | | | | | | | | | | | | | | Change-Id: Ia4243de07ec75030bb98f4f6d95f70d88e29fdba Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-04-061-1/+1
|\| | | | | | | | | | | Change-Id: Id98d3514e602a3c8c159a27be7b2fd24d7d290ae
| * | Remove traces of the discontinued android-no-sdk platformEirik Aavitsland2016-04-011-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: Ie734d6bfcb492c8aeeb18909650a27b1288f2b52 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* | | Enable building Qt Quick module with QT_NO_OPENGL definedAndy Nichols2016-03-221-5/+21
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the Qt Quick module depends on either the OpenGL or OpenGLES headers being available at build time. Since we are adding support for adaptations that do not depend on OpenGL, it should be possible to build Qt Quick in environments that do not have OpenGL development headers. This does present many challenges though because in some cases GL types, and classes that require OpenGL are part of the public APIs. However since these classes were never available when QT_NO_OPENGL was defined, it should be possible to redefine the function signatures under this scenario, since it's not possible to break binary compatibility if there never were any binaries to break compatibility with. One of the bigger changes that was necessary to facilitate this change is creating interfaces out of QSGContext and QSGRenderContext. Here the default behavior was usage of OpenGL directly, even though subclasses could override all OpenGL usage. Making them interfaces should bring QSGContext and QSGRenderContext more in line with the other classes present in the adaptation layer. Change-Id: Iaa54dc0f6cfd18d2da1d059548abf509bd71f200 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Quick: replace QStringLiteral with QLatin1StringAnton Kudryavtsev2016-02-101-3/+3
| | | | | | | | | | | | | | ... in string comparisons. It's more efficient. Change-Id: I51b4f5dd79ddb8a448e59ebfc537b86b78730dfb Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | tvOS supportMike Krus2016-01-011-1/+1
|/ | | | | | Change-Id: If48e8bcf55781d1148e15ce19e07cfbe35d829d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* Quick: Sanitize reading environment variables.Friedemann Kleint2015-10-261-1/+1
| | | | | | | | | | | | | | Where possible, use qEnvironmentVariableIsSet()/ qEnvironmentVariableIsEmpty() instead of checking on the return value of qgetenv(). Where the value is required, add a check using one of qEnvironmentVariableIsSet()/Empty(). Move QSGAtlasTexture::qsg_envInt() to qsgrenderer.cpp for reuse as qt_sg_envInt() and add qt_sg_envFloat(). Change-Id: I4c93f16c228d4f537154f389a0fa1427654485f7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-2/+11
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * Scale mipmapped npot images when not supportedLaszlo Agocs2015-01-191-2/+11
| | | | | | | | | | | | | | Task-number: QTBUG-43847 Task-number: QTBUG-40789 Change-Id: Iceacaa49bafffb31752a9fb26c896df570153fec Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcanvasitem.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/coreapi/qsgrenderer.cpp src/quick/scenegraph/qsgadaptationlayer.cpp src/quick/scenegraph/qsgrenderloop.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp src/quick/scenegraph/qsgwindowsrenderloop.cpp src/quick/scenegraph/util/qsgatlastexture.cpp src/quick/scenegraph/util/qsgtexture.cpp src/quick/util/qquickprofiler_p.h Change-Id: Ie274c3baf72a8a0711c87d67238d68e2b2887429
| * Let QSGPlainTexture support shutting down without a GL context.Gunnar Sletta2014-09-121-1/+1
| | | | | | | | | | | | Change-Id: Iae934e4d9e91f4ea21dd5bf27c4fafc5d481fb0a Task-number: QTBUG-41278 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Select specific features to be recorded when profiling QMLUlf Hermann2014-09-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Some features, like the memory profiler, create huge amounts of data. Often enough, we're not actually interested in all the data available from the profiler and collecting it all can lead to excessive memory consumption. This change enables us to optionally turn various aspects of QML profiling off. Task-number: QTBUG-41118 Change-Id: I7bb223414e24eb903124ffa6e0896af6ce974e49 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Use QQuickProfiler's own timer to sample eventsUlf Hermann2014-09-121-10/+10
|/ | | | | | | | Like that the timings are more accurate. Task-number: QTBUG-39876 Change-Id: Ia6bdce9c8089417e88797ec3a98c8a3e367f73f2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix the dynamic build by not calling glGet directlyLaszlo Agocs2014-08-291-1/+1
| | | | | | Change-Id: I97ee290c31ca4fa0ffc2f822f14bc7d5e34dd222 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Downscale textures which exceed the GL texture limitGunnar Sletta2014-08-231-6/+22
| | | | | | | | | | This way they will at least render. [ChangeLog][QtQuick] Images exceeding GL_MAX_TEXTURE_SIZE will be downscaled to fit so they will still show. Change-Id: I169ecac768036812b8e14265ec1a0a8902655666 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Doc: Remove duplicated wordsTopi Reinio2014-08-121-1/+1
| | | | | | | | Removes duplicated (repeated) words and fixes other minor documentation issues. Change-Id: I891f2b3e60194b207737425c1dcc1d35a5bd921a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Call glBindTexture() via QOpenGLFunctions in qsg_safeguard_texture().Friedemann Kleint2014-07-081-1/+3
| | | | | | | Fix linking for dynamic OpenGL builds. Change-Id: I82e6597d2cb9a74707e3f1e9fce245cce1a5d72b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Verbose fatal instead of crash when the scene graph state is invalid.Gunnar Sletta2014-07-041-0/+25
| | | | | Change-Id: I9a55bcbf9e94084c0cadac561e4707d47f5f8744 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Properly collect polish timings from all render loopsUlf Hermann2014-07-021-2/+2
| | | | | | | | | | | Previously the polish timings were collected incorrectly from the windows render loop and not at all from the basic render loop. By collecting the polish times at the right places we can get rid of the 2-argument profile macro as well. Task-number: QTBUG-39876 Change-Id: I0b4aaf87162c652b8dcea6cd4f54db053f8312fe Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Use categorized logging for all things scenegraph.Gunnar Sletta2014-07-011-41/+20
| | | | | Change-Id: I865ee838b0fd6c257b7189f24130012b98206fd1 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Avoid direct GL calls in QuickLaszlo Agocs2014-05-231-16/+17
| | | | | Change-Id: I9b8673fb3292c9d5ad2f9e8e63f56dc661699be6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Follow QOpenGLContext API renamingLaszlo Agocs2014-04-251-1/+1
| | | | | | Task-number: QTBUG-38564 Change-Id: Ice1170339f7d650fcb6accfccf325471629343d6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Regenerate mipmaps after changing the imagedata of a texture.Gunnar Sletta2014-04-151-0/+1
| | | | | | | | | | This has been a latent bug since the class was written, but has only surfaced after 15999f14f146b5c04fb40b31b69ceeeece273430 when mipmapping was allowed for all QSGPlainTextures. Task-number: QTBUG-38321 Change-Id: I058e554c4035c573d2ddb4ea793d8ad53e11e54b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Clearly point out the distinction between GUI and Render threads.Gunnar Sletta2014-03-201-0/+6
| | | | | | | | This is something it is easy to get wrong, so try to make it as visible as possible. Change-Id: I2253ae63214cef0fb91c8b9423d7918ffc20e888 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Dynamic GL in QuickLaszlo Agocs2014-03-181-5/+6
| | | | | | | | | | The counterpart to I716fdebb. Implements the dynamic path in scenegraph. Task-number: QTBUG-36483 Change-Id: I2dc613ba84560b7b8e36d3cd1da61c050ab08db0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Move QtQuick profiling to own profiler adapterUlf Hermann2014-02-151-4/+4
| | | | | | | | The QtQuick parts of the QML profiler service thus become a proper global profiler which can be independently enabled and disabled. Change-Id: Ifad03801cab2be66a264fc46fdebdae582fcc99b Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Add Image::mipmap to support mipmapping of images.Gunnar Sletta2014-02-121-13/+2
| | | | | | | | | [ChangeLog][QtQuick] New feature: Image.mipmap Task-number: QTBUG-19961 Change-Id: I13acb2408d5b126790adaf9d324ad4beda1e3646 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Android: Fix crash when using images in QMLEskil Abrahamsen Blomfeldt2014-02-071-3/+4
| | | | | | | | | | | | | Because qtdeclarative was merged back from stable and qtbase is still lagging behind, they have become unsynchronized, causing crashes when trying to get the device name from the platform plugin and failing. To work around this until the merge goes through, I've added a simple guard. Task-number: QTBUG-36658 Change-Id: Ibc399ed325a1fbdeccad85ed8d4841edb7b2ba5d Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-241-3/+16
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/dialogs/qquickmessagedialog.cpp src/imports/dialogs/qquickmessagedialog_p.h src/qml/debugger/qqmlprofilerservice_p.h src/qml/jsruntime/qv4regexpobject.cpp tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro Change-Id: Ic8a43366b44d6970966acbf03b206d0dee00c28d
| * Dont define CAN_BACKTRACE_EXECINFO when building on uClibcJorgen Lind2014-01-241-1/+1
| | | | | | | | | | Change-Id: I06314f0a3a7cf86e5e627c307a522069cf640f78 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Work around missing BGRA texture format on Samsung Galaxy Tab 3Eskil Abrahamsen Blomfeldt2014-01-171-2/+15
| | | | | | | | | | | | | | | | | | | | The GL driver on the Galaxy Tab 3 reports support for the BGRA8888 texture format, but does not actually support it. For this particular device we disable support for that format. Task-number: QTBUG-34984 Change-Id: Ie26ef0e815c1622b3425c37237a3fc320543b92c Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>