aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/context2d
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Use QDateTime::currentMSecsSinceEpoch() instead of currentDateTimeThiago Macieira2016-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | More efficient if all you want is the number of seconds. Change-Id: Ib57b52598e2f452985e9fffd145a36f2b3c703ea Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Add cross-backend simple rect, texture, and ninepatch nodesLaszlo Agocs2016-06-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSGSimpleRectNode is deprecated -> use QSGRectangleNode via QQuickWindow::createRectangleNode() instead. QSGSimpleTextureNode is deprecated -> use QSGImageNode via QQuickWindow::createImageNode() instead. The OpenGL version of the simple rectangle node is switched over to the vertex color material instead of flat, to allow for better batching. Use the same concept for nine patch nodes. The "style" node from Quick Controls 1 is now QSGNinePatchNode in order to provide a proper cross-backend solution which is already necessary due to the software backend, but now generalize it to apply to the accelerated backends with proper materials as well. QC can now simply call createNinePatchNode() without further ado. Also fixes a bug with the D3D12 texture material not enabling blending when needed. When it comes to the internal class names, QSGRectangleNode and QSGImageNode get the Internal prefix in the adaptation layer in order to differentiate from the public API. This involves quite a lot of renaming, but results in a nice and clean public API. Change-Id: Iddf9f9412377843ea6d652bcf25e68d1d74659ea Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | V4: Pass scope around as parameters inside the runtime.Erik Verbruggen2016-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of many (or all) runtime functions consist of first creating a QV4::Scope, which saves and restores the JS stack pointer. It also prevents tail-calls because of that restoring behavior. In many cases it suffices to do that at the entry-point of the runtime. The return value of a JS function call is now also stored in the scope. Previously, all return values were stored in a ScopedValue, got loaded on return, and immediately stored in another ScopedValue in the caller. This resulted in a lot of stores, where now there is only one store needed, and no extra ScopedValue for every function. Change-Id: I13d80fc0ce72c5702ef1536d41d12f710c5914fa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-131-3/+7
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp Change-Id: I26d6435a29cac3840bb567ade5149c2562a94bf9
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-101-3/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of 0e053528 was reverted in the merge, about lastTimestamp. It will be applied later in separate commit. qmltest::shadersource-dynamic-sourceobject::test_endresult() was blacklisted on linux. Conflicts: .qmake.conf tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp tests/auto/qmltest/BLACKLIST tests/auto/qmltest/qmltest.pro Task-number: QTBUG-53590 Task-number: QTBUG-53971 Change-Id: I48af90b49a3c7b29de16f4178a04807f8bc05130
| | * Avoid Canvas crashes with qtquickcompilerLaszlo Agocs2016-05-241-3/+7
| | | | | | | | | | | | | | | | | | Change-Id: Ic87052308706b8ef71e2f27837abfbaea57c43cc Task-number: QTBUG-49692 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/wip/scenegraphng' into dev" into ↵Laszlo Agocs2016-06-107-67/+116
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Change graphicsAPI to graphicsApiLaszlo Agocs2016-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I065f17abd1cb71cd8d6ead76abf7a544eb7a99c0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | | Merge remote-tracking branch 'origin/dev' into HEADLaszlo Agocs2016-05-244-0/+4
| |\| | | | | | | | | | | | | | Change-Id: If91e0e28d004f1db978dcab393f189743bb69cd5
| * | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-05-241-70/+72
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickopenglshadereffectnode.cpp src/quick/items/qquickshadereffect.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h src/quick/scenegraph/qsgdefaultglyphnode_p.h Change-Id: I3d6874b4e4231a89d2836c04fe8e7f2ef2d698c4
| * | | | Fix build with QT_NO_OPENGL after rebaseAndy Nichols2016-05-081-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia4243de07ec75030bb98f4f6d95f70d88e29fdba Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * | | | QQuickCanvasItem: Don't set QSGGeomety in updatepaintnodesAndy Nichols2016-05-061-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just rely on the QSGImageNode to modify the geometry. Change-Id: I91967ba987ac08a1950cc3fd8aa1c1af25537316 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * | | | D3D12: Fix up Context2DLaszlo Agocs2016-05-032-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Querying openglContext() on a non-GL specific path is never a good idea. The usage of QSGSimpleTextureNode is replaced with the correct multi-backend way, i.e. creating an image node via the adaptation layer. Demos like stocqt are now functional with the d3d12 backend as well. Change-Id: I24a6b85163fec5841349057e2fec0be6cbf01130 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | | | D3D12: Painter nodeLaszlo Agocs2016-05-031-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only supports QImage backing. As a bonus add some notes to the Context2D docs too. Change-Id: I18457a1f766d2f136c6864ec06fe596668d5e726 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * | | | Prefix GL-specific shader effect codeLaszlo Agocs2016-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the C++ sources and classes. The QML type name remains the same. No changes in functionality. The shader effect, node, material (and uniform animator and particles and bits and pieces here and there...) are highly interconnected and do not follow the usual design practices for Quick and the scenegraph and the adaptation layer. Therefore while we aim for keeping full compatibility for GL apps, other backends will likely get a different ShaderEffect item implementation. The C++ class QQuickShaderEffect itself is currently a dummy with an unchanged API. It is not in use for now but forms the basis for the implementation for other backends. This will be covered in future commits. Change-Id: Ia39ce4b303f8f33e2f241d11e35fa62423e43127 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
| * | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-04-131-4/+4
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: If33197b616de3476811f0161d4ecd8e7d004756c
| * | | | | Enable building Qt Quick module with QT_NO_OPENGL definedAndy Nichols2016-03-227-31/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Imports, Plugins, Quick: replace QStringLiteral with QL1SAnton Kudryavtsev2016-06-091-5/+5
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. in such cases: - if there is overloaded function - in QStringBuilder expressions Result: reducing .rodata Change-Id: I972bc0a61df7b5567c40329dd47e77176d9a5b96 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | | V4: allow inlining of ExecutionEngine::{qml,js}Engine()Erik Verbruggen2016-05-204-0/+4
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | All other changes are just to be able to include qv8engine_p.h in qv4engine_p.h Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | | QML: Replace qIsFinite with qt_is_finite.Erik Verbruggen2016-04-281-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The latter can be inlined. Change-Id: I57747b84889390839a17faa1df6d359210ef4adf Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | Use QStringRef to optimize memory allocationAnton Kudryavtsev2016-04-261-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. While touching the code, also port loops to C++11 style. Change-Id: I04c99b24ea6afd3715e3edf9ea00bfab838fd53c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | | Fix assertion in qt_create_image_data()Peter Varga2016-04-191-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | Fix rounding of width and height parameters. Change-Id: Ib7655dafe382684340c32e2d2dc8adb445af65b0 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | | Replace qQNaN() and friends with qt_qnan().Erik Verbruggen2016-04-051-4/+4
|/ / | | | | | | | | | | | | | | These constexpr functions can be inlined, and the compiler can be a bit smarter with code generation. Change-Id: I4ea87c794dd8e375749e18d273d01bb848231113 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-121-0/+5
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I356ec83cf687bd2833f9a7c5e820d56b1efa8979
| * Fix crash when Canvas has negative width or heightMitch Curtis2016-02-051-0/+5
| | | | | | | | | | | | | | | | m_fbo is null when using a threaded render loop. Change-Id: I297ba651f9605f1718dbe9d09bd30e9682fb8401 Task-number: QTBUG-50085 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Quick: replace QStringLiteral with QLatin1StringAnton Kudryavtsev2016-02-101-46/+46
| | | | | | | | | | | | | | ... in string comparisons. It's more efficient. Change-Id: I51b4f5dd79ddb8a448e59ebfc537b86b78730dfb Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2016-01-221-0/+8
|\| | | | | | | Change-Id: I4af0bf8ec1569097d97f8ce0bb8bf1a0e4a989ec
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-191-0/+8
| |\ | | | | | | | | | Change-Id: Ieb48911638b5c1acdfd4dee8aa19dca9be99a1f6
| | * docfix: Make it clearer how Context2D relates to CanvasGunnar Sletta2015-11-301-0/+8
| | | | | | | | | | | | | | | Change-Id: Id64aff29ef8bc7cbb4f7fc46b1a0d30a47585055 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | | Updated license headersJani Heikkinen2016-01-1912-168/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | QQuickCanvasItem: fix expensive iteration over QMap::keys()Anton Kudryavtsev2016-01-141-2/+2
| | | | | | | | | | | | | | | Change-Id: I97cc704d2ddbb8161de8680ae3fa787d4a6255f5 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | context2d: replace foreach with range-based forAnton Kudryavtsev2016-01-142-5/+5
| | | | | | | | | | | | | | | Change-Id: I28156cf5dd8d5197d4e47ecbb8cacdb6722cd6fb Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Replace all occurrences of qSNaN() with qQNaN()Ulf Hermann2015-12-071-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | We generally don't want to produce signalling NaNs as those cannot be used in any further arithmetic operations. In particular -(qSNaN()) claims it's not a double. Task-number: QTBUG-49753 Change-Id: I23cec4fec2ddf08c02a7d53db7f3b9ba46b6c288 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-066-0/+66
| | | | | | | | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-0/+6
|\| | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
| * Make Canvas::layer::enabled workGunnar Sletta2015-09-111-0/+6
| | | | | | | | | | Change-Id: I3e159ea6d02f415307db6d45470665085aaa023e Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Mark Canvas::tileSize and Canvas::canvasWindow as obsolete.Gunnar Sletta2015-09-281-13/+4
| | | | | | | | | | | | | | | | | | The feature has never worked properly and the documentation is misleading. Task-number: QTBUG-33129 Change-Id: I75c5073ebf4ca10f45d42aca76444ab3d7fb3820 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Move remaining objects to new constructor syntaxLars Knoll2015-09-221-31/+22
| | | | | | | | | | | | | | Also disable the old way of constructing objects. Change-Id: Ib4e69087cd563ae1481da116d6caf97876239798 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Simon Hausmann2015-09-021-1/+1
|\| | | | | | | Change-Id: Ibc7a47f7ce6d15dff79fdc59f8ded297d1b8d50d
| * Fix hue clamping in Context2DLaszlo Agocs2015-08-241-1/+1
| | | | | | | | | | | | | | | | It goes from 0..359, not 0..255. Task-number: QTBUG-47894 Change-Id: I0612a9d5e4999afae7703b5c49741b94fb0da07f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Ulf Hermann2015-08-182-5/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv4debugservice.cpp src/qml/jsruntime/qv4value_inl_p.h src/qml/jsruntime/qv4value_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/qml/qqmlnotifier_p.h src/qml/qml/qqmlproperty.cpp src/quick/items/qquickflickable.cpp src/quick/items/qquicktextedit.cpp tests/auto/quick/qquickwindow/BLACKLIST The extra changes in qqmlbinding.cpp are ported from changes to qqmlproperty.cpp that occurred in parallel with writeBinding() being moved to qqmlbinding.cpp. Change-Id: I16d1920abf448c29a01822256f52153651a56356
| * Fix crash in QQuickCanvasItem::updatePaintNode()Tobias Koenig2015-08-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | QQuickCanvasItem manages the life time of the texture already, so it shouldn't set the ownsTexture flag on the QSGSimpleTextureNode, because that would result in a double deletion when QSGSimpleTextureNode::setTexture() is called. Change-Id: I7c1cc949b664d1a8b64bab092250439171e66233 Task-number: QTBUG-47714 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Consistently use the override keywordThiago Macieira2015-07-191-4/+4
| | | | | | | | | | | | | | Clang doesn't like when it's inconsistent. Change-Id: Ib306f8f647014b399b87ffff13f23eebda07757b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Use by-ref in foreach when T is large or non-trivialSérgio Martins2015-07-181-2/+2
| | | | | | | | | | Change-Id: I79271fdc3fa064e362dfaa64ff11d8a4c6b7e8c3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Port from Q_ENUMS to new macro Q_ENUM.Friedemann Kleint2015-06-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | Remove Q_ENUMS in favor of the new Q_ENUM macro which provides registration as meta enum and a debug stream operator. QQuickXmlListModel::Status is left unmodified as porting it creates a link error in tst_qquickxmllistmodel. Change-Id: Id5e6192c9f85e7c94332508fbd91873ddda31e1a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Move the StringValue members of ExecutionEngine onto the JS stackLars Knoll2015-06-101-1/+1
| | | | | | | | | | Change-Id: Ib55c05f1730b7659e2f6fee7e1fa79c10c759167 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Some cleanups to QQmlRefCountLars Knoll2015-06-052-3/+3
| | | | | | | | | | | | | | | | | | Rename QQmlRefPointer::take to adopt, as it's a better fit with the semantics. Get rid of the assignment operator from a raw pointer and add a Adopt argument to the constructor. Change-Id: Ia1ebe42b24570f32543e783f91eb3206602772a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Get rid of qv4value_inl_p.h and replace it by qv4typedvalue_p.hLars Knoll2015-04-243-3/+3
| | | | | | | | | | | | | | | | This is a cleaner separation and further reduces include dependencies in the definitions of our basic data structured. Change-Id: I18aa86cdea0c0dfbc16075d4d617af97e638811e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-221-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlbinding.cpp src/qml/jsruntime/qv4arraybuffer.cpp src/qml/jsruntime/qv4functionobject.cpp Change-Id: Ic752e9dfd69b282093651c9234c110a49762f06d
| * Doc: corrected some language issuesNico Vertriest2015-04-171-1/+1
| | | | | | | | | | | | Task-number: QTWEBSITE-628 Change-Id: I608c4fe5e18f6494cc03377080a536a01be232ca Reviewed-by: Topi Reiniö <topi.reinio@digia.com>