aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/context2d/qquickcontext2d.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Pass the arguments correctly to QRadialGradientAndy Shaw2018-05-151-1/+1
| | | | | | | | | | The parameters for createRadialGradient indicate the position and radius for the two circles. Therefore the radius arguments should be used with their respective circle positions. Task-number: QTBUG-67960 Change-Id: Ifacba4d43939bafeed451e713250f716a11d30d1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-12/+12
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* doc: Fix remaining "Can't tie this..." errorsMartin Smith2018-02-231-2/+2
| | | | | | | | This update mostly removes qdoc comment markers from comments that should not have been qdoc comments. Change-Id: I8ccaa7fd4ae610371e25066e048fcba6cfba8038 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Convert canvas2d methods to new calling conventionLars Knoll2018-01-121-457/+459
| | | | | Change-Id: I543ae856a5c56ee69f7e7cc6f1ff9a8ce2a6b489 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Bring back markObjects(), this time generatedLars Knoll2017-11-141-4/+5
| | | | | | | | Doing the marking of objects in a function instead of using the table seems to be somewhat faster. Change-Id: I9ec00cc0264f9a15c69b285db493bee31d99bf96 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Merge remote-tracking branch 'origin/dev' into HEADLars Knoll2017-10-221-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4isel_moth_p.h src/qml/compiler/qv4ssa.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm_p.h src/qml/jit/qv4regalloc.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexp.cpp src/qml/jsruntime/qv4regexp_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp tests/auto/qml/qml.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp Change-Id: I1577e195c736f3414089036b957a01cb91a3ca23
| * Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-1/+1
| | | | | | | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Change CallData::argc to be a QV4::ValueErik Verbruggen2017-09-191-47/+47
| | | | | | | | | | | | | | | | | | | | | | Instead of mimicking a Value. This makes sure that argc now stays correct even when anything on Value changes. Most of the change is mechanical: replace callData->argc by callData->argc(). Change-Id: I521831ae1ffb3966bad6589c18d7a373e13439d7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/new-backendLars Knoll2017-08-221-1/+2
|\| | | | | | | Change-Id: Iff06429f948ac6cdec77a9e5bb8c5375c56fe705
| * Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-05-311-0/+2
| |\ | | | | | | | | | Change-Id: Iea0bb0788357bc615d0e9ea411087114b8b3b720
| * | Move PathItem to qt.labsLaszlo Agocs2017-04-251-1/+2
| | | | | | | | | | | | | | | | | | | | | Change-Id: I1cd686cff60bd40fe2cbbc34f917fac7835b6b7d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | | Remove Scope::result and convert calling convention for builtinsLars Knoll2017-08-081-253/+333
| |/ |/| | | | | | | | | | | | | Allow for faster calling of builtins, and completely avoid scope creation in many cases. Change-Id: I0f1681e19e9908db10def85a74e134a87fc2e44c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-05-021-0/+2
|\ \ | |/ |/| | | Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| * Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-04-071-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4assembler.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4vme_moth.cpp Change-Id: I865d794e550a263387a39ca8d051ebf48b70cbc0
| * Fix QQuickCanvasItem::toImage() high-DPI captureMorten Johan Sørvig2017-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | Make toImage() work for devicePixelRatio > 1 by scaling the source rect. Also set the devicePixelRatio on the returned image. Task-number: QTBUG-59170 Change-Id: I0c8ccd562c1cf1e89ff37ca1806b46296480b0d0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Separate the stack used for GC from the regular JS stackLars Knoll2017-04-071-3/+3
| | | | | | | | | | | | | | | | This is required to be able to implement concurrent or incremental garbage collection. Change-Id: Ib3c5eee3779ca2ee08a57cd3961dbcb0537bbb54 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into HEADSimon Hausmann2017-03-231-2/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp src/qml/jit/qv4assembler.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4context.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/memory/qv4mmdefs_p.h Change-Id: I9966750b7cd9106b78e4c4779f12b95a481cca40
| * Build fix for -no-feature-quick-pathPaul Olav Tvete2017-03-131-2/+8
| | | | | | | | | | Change-Id: Ib52d45a12b367fa08982535a69c14881beec597e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Use qRadiansToDegrees() more widelyEdward Welbourne2017-03-161-7/+5
| | | | | | | | | | | | | | | | It documents the meaning of the computation more clearly. Task-number: QTBUG-58083 Change-Id: Ie2d486d1e1919569de5a1565e783703b9b3bc813 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-141-0/+2
|\| | | | | | | Change-Id: I0ec164ce6e8099e6e4d6b40a3c7340737473ef4b
| * Build fix for -no-feature-quick-shadereffectPaul Olav Tvete2017-03-101-0/+2
| | | | | | | | | | Change-Id: Ie1f601c6ae4c6c5d8d23b14a6670979d9c24e209 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-02-141-6/+6
|\| | | | | | | Change-Id: I372850330c1d92edc5b07596759f0db3a59082a8
| * Fix a crash in canvas2d when calling some methodsLars Knoll2017-02-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression introduced in change 4d23faf34192cef372f846dcf02fd8cc398b14c0, where some return values from functions weren't properly encoded as QV4::Value. Task-number: QTBUG-58683 Change-Id: I9dc5f1eb8f5779c58f8b062b9ae3d02284ab2678 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Object: Allow put and putIndexed to return success or failureRobin Burchell2017-02-091-3/+6
|/ | | | | | | | | Some parts of the ES6 (and even ES5!) spec specifically require handling of a property write failure. This will be introduced in followup changes, as it's going to be rather more involved than this. Change-Id: Ie482493fcf4780df0e23619650a856421d20bd55 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Port builtin methods in Canvas2D to new calling conventionLars Knoll2017-01-251-680/+617
| | | | | Change-Id: I0d141b3d655161a7892ffd0e5b8f019b3df51da9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-7/+7
| | | | | | | | 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>
* QML: Also check for correct destroy() chainingErik Verbruggen2016-10-061-2/+8
| | | | | | | | | Check that the destroy() method of Heap::Base was called when a Managed object needs destruction. This checks if a call to the parent's destroy() method was accidentally omitted. Change-Id: Id025ecd6d4744bf3eab23503fbe317ed2a461138 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Make Heap::Object and all subclasses trivialErik Verbruggen2016-10-061-7/+9
| | | | | | | | | | | | GCC6 might dead-store-eliminate out our secret write to Base::mmdata, because it expects all memory content to be "undefined" before constructor calls. Clang might take the same approach if the constructor of Heap::Object is removed. By making these structs trivial, it also makes them memcpy-able. Change-Id: I055b2ad28311b997fbe059849ebda4d5894eaa9b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Introduce destroy() on Base subclassesErik Verbruggen2016-10-051-37/+41
| | | | | | | | This removes the destructors of subclasses of Base, making them nearly trivial. Change-Id: Ia6f7d467e87899b5ad37b8709a8f633a51689d59 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix 'lighter' compositionmode in Context2DGunnar Sletta2016-08-121-2/+2
| | | | | | | | 'lighter' is defined as Source + Destination which is the equivalent of QPainter::CompositionMode_Plus. Change-Id: I88857ffbabe319e955f588b6d74bc96da8714f3d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge "Merge remote-tracking branch 'origin/wip/scenegraphng' into dev" into ↵Laszlo Agocs2016-06-101-6/+39
|\ | | | | | | 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-241-0/+1
| |\ | | | | | | | | | 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>
| * | | D3D12: Fix up Context2DLaszlo Agocs2016-05-031-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | 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-221-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-201-0/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | 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>
* 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>
* 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>
* context2d: replace foreach with range-based forAnton Kudryavtsev2016-01-141-2/+2
| | | | | 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>
* 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>