aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/context2d
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-192-5/+5
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* 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-268-61/+61
| | | | | | | | | | | | | 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>
* Remove double indirection between QJSEngine and QV4::ExecutionEngineUlf Hermann2018-02-021-2/+2
| | | | | | | | As QJSEngine's handle() method is internal, we can redefine it to return a pointer to an ExecutionEngine. That makes many things easier. Change-Id: Ie3df99e0bad5f00ad4fe73182896cd135fa82994 Reviewed-by: Lars Knoll <lars.knoll@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>
* Further cleanup JSCallDataLars Knoll2017-11-071-1/+1
| | | | | | | Avoid allocations on the JS stack if possible Change-Id: I344cd6dceb6264314f9d22c94db22b22d1d24d14 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Simplify JSCallData constructionLars Knoll2017-11-071-3/+4
| | | | | Change-Id: Ic53532edae9a209aa7125af6f00a9d993d74f1a3 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Rename JSCall to JSCallDataLars Knoll2017-11-071-1/+1
| | | | | | | | As, this is going to change in a simple stack based structure to keep pointers to the data to pass to calls. Change-Id: Ia9aa3f81ee3eeba36affd16aac7b2fe97d59aea9 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Merge remote-tracking branch 'origin/dev' into HEADLars Knoll2017-10-227-40/+56
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-256-29/+29
| | | | | | | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-09-202-11/+27
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4regexpobject_p.h src/qml/types/qqmllistmodel.cpp src/quick/items/qquickanimatedimage_p.h src/quick/scenegraph/qsgrenderloop.cpp tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
| | * Fix compilation with -no-openglMichal Klocek2017-09-181-2/+3
| | | | | | | | | | | | | | | Change-Id: I91aab9d78ff4dced55cb118ea8f88994bd1d2c20 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * add qt.quick.canvas logging category, show size change due to DPRShawn Rutledge2017-09-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly as a way of verifying the fix for QTBUG-37095, so far. But of course other log messages can be added to this category later. Task-number: QTBUG-37095 Change-Id: I57930e9376529b6eacca1b554d31382d41582fda Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * Canvas: Repaint on devicePixelRatio ChangeMorten Johan Sørvig2017-09-072-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle moving between high- and normal-DPI displays. The texture gets a setCanvasWindow() call on screen change. Read window->effectiveDevicePixelRatio() here and set m_canvasWindowChanged on change to trigger a repaint if there was a change. Task-number: QTBUG-37095 Change-Id: I96ff07bd7334269cad219eb0a9056c62e850aac7 Reviewed-by: Shawn Rutledge <shawn.rutledge@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>
* | | Always set the correct FunctionObject when calling JS functionsLars Knoll2017-09-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Renamed ScopedCallData to JSCall, enforced passing a JS FunctionObject to it, and added call() and callAsConstructor() methods to it. Change-Id: I30db65c9765c2896b5909fe2105c0934c6dad861 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Move ScopedCallData and ScopedStackFrame into a separate fileLars Knoll2017-09-011-0/+1
| | | | | | | | | | | | | | | Change-Id: I9ae42aa7a811aa93fe0950725e9d253a0c5e8dba Reviewed-by: Simon Hausmann <simon.hausmann@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-314-0/+13
| |\ \ | | | | | | | | | | | | 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>
* | | | Change function signatures for call/construct backLars Knoll2017-08-041-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | Change those back again to return a value. This will be required to avoid creation of Scope objects between JS function calls. Change-Id: I05cb5cf8fd0c13dcefa60d213ccd5983fab57ea3 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-05-024-0/+13
|\ \ \ | |/ / |/| / | |/ Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| * Run includemocs in qtdeclarativeThiago Macieira2017-04-264-0/+7
| | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Fix Canvas memory leakRoman Pasechnik2017-04-251-0/+6
| | | | | | | | | | | | | | Task-number: QTBUG-59467 Change-Id: I3fa0e20676e453ec194ec71188172f4650313d1e Reviewed-by: Gunnar Sletta <gunnar@crimson.no> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-04-221-2/+2
|\| | | | | | | Change-Id: I95266fdaf5c6dc65969bd2e28403da7969367d32
| * QQuickCanvas: Fix requestAnimationFrame documentationv5.9.0-beta3Robin Burchell2017-04-211-2/+2
| | | | | | | | | | | | | | The type here is an int, not a long. QML doesn't have a long type at all, too. Change-Id: I7aea92819f5e2afadddd7b79289a304875d4297f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-04-072-8/+11
|\| | | | | | | | | | | | | | | | | | | 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-312-8/+11
| | | | | | | | | | | | | | | | | | | | | | 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-232-2/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-03-141-0/+1
| |\
| | * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-0/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp Change-Id: I26f8d18fe8af664ee8573116f182fe12b71e089a
| | | * Fix build for -no-feature-quick-shadereffectStephan Binner2017-02-272-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I334603209818a8030ddb5b5b316cab596c328bf1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | 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-142-0/+3
|\| | | | | | | | | | | Change-Id: I0ec164ce6e8099e6e4d6b40a3c7340737473ef4b
| * | Build fix for -no-feature-quick-shadereffectPaul Olav Tvete2017-03-102-0/+3
| | | | | | | | | | | | | | | Change-Id: Ie1f601c6ae4c6c5d8d23b14a6670979d9c24e209 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-021-3/+4
|\| | | | | | | | | | | Change-Id: I6cbd83b61fac34c2ba6936711289ec09a490719a
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-3/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/quick/accessible/qaccessiblequickview_p.h src/quick/items/qquickmousearea.cpp src/quick/util/qquickanimatorjob.cpp tools/qmlplugindump/main.cpp Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
| | * Quick: Check fbo msaa related extensions via QtGuiLaszlo Agocs2017-01-311-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | GL_EXT_xxxx is not sufficient here. QOpenGLFunctions already has support for the ANGLE and some other variants of the framebuffer multisample and blit extensions, so use that instead of the manual checks. Change-Id: I2d8e0850d3b0b9a9cfd9e55aa38adad07a0ba45d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-02-143-7/+27
|\| | | | | | | | | | | 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>
| * | Canvas Item: Prevent polish loop when calling requestAnimationFrameAndy Nichols2017-02-022-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if you call requestAnimationFrame within the callback given by requestAnimationFrame there is a polish loop. This is however the common way when using Canvas2D in the browser to get screen refresh rate animations. This patch makes sure that polish won't be called when processing polish items by calling polish indirectly. Task-number: QTBUG-55778 Change-Id: Ib96e39f7ca3cecc33609976e9049cc309768f9f7 Reviewed-by: Laszlo Agocs <laszlo.agocs@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>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-141-1/+0
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I9d87ed86e95b5901a86cc3aa65d7ac39b0b708c2
| * Fix crash in CanvasGunnar Sletta2017-01-101-1/+0
| | | | | | | | | | | | | | | | | | | | The Image based code path will delete the texture in textureForNextFrame() so deleting it again here is wrong. The convention is supposed to be that if the textureForNextFrame returns 0, it also deleted the input texture. So not deleting is correct for both Image and FBO. Change-Id: I45a5ef94c13358f3637f51ae2d21224518ea6a25 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>