aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers and add new licensesJani Heikkinen2014-08-25867-16384/+9448
| | | | | | | | | - 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>
* Add const & to argumentsAlbert Astals Cid2014-08-2414-28/+41
| | | | | Change-Id: I1bcf69638fee32b6e6565b8ea828c0adcff48a67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Mark QQuickFBO's node dirty after rendering the texture.Gunnar Sletta2014-08-241-0/+2
| | | | | | | | It is impossible to use in a shader effect otherwise. Change-Id: I489e6ae43cdc3fe8f54efa6d86ead4d21831b84d Task-number: QTBUG-40809 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Introduce QQuickWindowQObjectCleanupJob.Gunnar Sletta2014-08-241-0/+14
| | | | | | | | Convenience for cleaning up texture providers. Private class for now, we can maybe make it public in 5.5. Change-Id: I3489fde2a268bc988634a16f87ee558b9ac5dba2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Improve the internal NodeVisitorEx APISimon Hausmann2014-08-232-21/+33
| | | | | | | | | Allow the implementation of visit to control whether the children should be processed afterwards or not. This is modelled after the JS AST visitor in Qml. Change-Id: I5b1adf5e1aefd8899bf444e993ddfbf2c5c125c9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Downscale textures which exceed the GL texture limitGunnar Sletta2014-08-233-8/+29
| | | | | | | | | | 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>
* Cleanup: Separate the sub-tree layering out of QtQuick into the scene graphSimon Hausmann2014-08-2315-516/+663
| | | | | | | | | | This basically renames QQuickShaderEffectTexture to QSGDefaultLayer and introduces QSGLayer as interface to be used. QQuickShaderEffectTexture is generic for the scene graph and has no QtQuick dependencies. The interface separation allows scene graph backends to customize layers. Change-Id: I9a7f37addaa4b80a34ff9a1456b0cb9b16d4e9f3 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Introspect qrc files in FolderListModel.Gatis Paeglis2014-08-222-4/+6
| | | | | | | | | | | | And don't use "file watchers" for resource file paths, otherwise it generates the following warning: QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory Change-Id: I6b75c9195fb2b2ba7b3e0bb7d146fc5cd343927e Task-number: QTBUG-40307 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Avoid creating fbo with zero size in QQuickWidgetLaszlo Agocs2014-08-221-0/+5
| | | | | | | Get rid of incomplete attachment warnings on Android. Change-Id: I7da546861b1814677b0c8ae110416f69bbbb7edc Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Cleanup: Remove ShaderEffectSourceNodeSimon Hausmann2014-08-222-30/+34
| | | | | | | | We can simply use a standard image node and do the dirty marking also directly in the texture (both live in the same thread). Change-Id: I7345c702613782adec3c6a36a7705a2a54ed82ec Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* v4: Enable primitive conversation to QQmlScriptString in javascriptSebastian Sauer2014-08-224-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes following QML-code proper working: ParentChange { x: 0 Component.onCompleted: x = 10 } where x is a QQmlScriptString. Before this patch an error-message would be thrown that the bool/int/string/etc cannot be converted to a QQmlScriptString. With the patch primitive types including null and undefined are proper converted to a QQmlScriptString. The patch ignores (as in not implements) function/binding assignment. Unfortunately since commit aa25ad8d5f4 its not possible any longer to instanciate QQmlScriptString what means there is otherwise no (easy) way to inject a QQmlScriptString from within Javascript. Change-Id: I18aac6a6e9a57f3b7d0a2d66cdab2be6c3c153c5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix memory corruption in shader materials.Gunnar Sletta2014-08-191-2/+4
| | | | | | | | | | Change ee616b3905106a3eedef9ee964ab283ef45c7dbc accidentally removed the member variable used to refcount the attribute names. This resulted in the names being deleted and the stored const char *'s to become invalid. Add it back. Change-Id: Ie33f75cd76085283a5ee685602e023bb3c42c896 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* V4 IR: Add loop peeling.Erik Verbruggen2014-08-183-23/+243
| | | | | | | | | | | | By peeling the first iteration off of a loop and putting it in front of the loop, type inference can deduce more type information for esp. loop induction variables. To prevent increasing the code size too much, only the inner-most loops are peeled. This gives a 10% speed-up on crypto.js. Change-Id: I57f9611695bc8defc0bff84e440b8a20b2c8a34e Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* V4 IR: add immediate dominator re-calculation.Erik Verbruggen2014-08-183-98/+276
| | | | | | | | | When removing edges, the control-flow graph changes, so some immediate dominators might need to be updated. This change collects all candidates and processes them in a single batch. Change-Id: I928f42232427a84bcb9658e314dadd0bd021b12f Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Doc: Removing url variable from qdocconf file.Topi Reinio2014-08-162-2/+0
| | | | | | | | -url inherited from the url variable set in qtbase/doc/global Change-Id: I94a0da7aa98af1fdd6140168fe9feb27b11c0bdb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix setContextObject to re-evaluate bindingsAlex Montgomery2014-08-151-0/+1
| | | | | | | | | Fix QQmlContext::setContextObject to reevaluate bindings as the documentation says that it should. Task-number: QTBUG-40798 Change-Id: Ifbd97c7a07a5432f4948937da863370b05705206 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix cursorShape with QQuickWidgetLaszlo Agocs2014-08-152-6/+12
| | | | | | Task-number: QTBUG-40729 Change-Id: If3b2f8ca8795da1ac7c626db9c872f735d1e7b5d Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* CleanupSimon Hausmann2014-08-1520-192/+185
| | | | | | | | | Merge QV4::CompiledData::QmlUnit into QV4::CompiledData::Unit. For pure JS units it means a slight increase of memory usage by a few bytes, but overall it makes the code a lot simpler. Change-Id: Ib48927749720b056f004aac0fe22cb8ec729e3f6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix flicker when showing QQuickWidgetLaszlo Agocs2014-08-141-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | This also reintroduces the change from commit 14b4747b17d522fe57f3a5f21738c5a89323b5e2. Due to some bizarre merge issue that change has disappeared from qquickwidget.cpp and its history. It is there in the main log, though. The new fix depends on this older one, so the combined one fixes the following three issues: 1. Polish and sync cannot be skipped when we are rendering for the first time. 2. Recreating the fbo twice when the widget is shown. Calling createFramebufferObject() is not necessary in this case since createContext() will trigger this anyhow due to scenegraphInitialized(). 3. Avoid recreating the fbo when the size is the same as before. Some platforms are keen on sending resize events with the same size. These should be ignored. What's worse, some platforms (cocoa) generate a resize on exitting (Cmd-Q) and not ignoring the resize at that stage is dangerous since the scenegraph is already invalidated. Task-number: QTBUG-40710 Task-number: QTBUG-40505 Change-Id: I2e897acc68fa68233563a1db63ffb6c5d0baad73 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* V4 JIT: fix int32 to double conversion codeErik Verbruggen2014-08-141-2/+4
| | | | | | | Missing else: two (nearly identical) conversions would get generated. Change-Id: I745120f81d42bf28fbce7ab6a62da909a8e14458 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 JIT: add d8-d15 as available FP registers on ARM.Erik Verbruggen2014-08-141-1/+8
| | | | | | | | | | VFP3-d16 is the minimum implementation available on ARMv7, so these registers are also always available. The big added bonus is that they are callee saved, so using them will result in less loads/stores for doubles. Change-Id: I0cab3fe24d8677315b4c7d9449d8619cbf9a2919 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 JIT: support saving used callee saved FP registers.Erik Verbruggen2014-08-144-21/+46
| | | | | | | | This is not used yet by any platform/abi we support, because we do not define any callee-saved FP registers. Yet. Change-Id: I5857a452456175398c5e9681ff33800b9431b9da Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 JIT: calculate used registers and only save those.Erik Verbruggen2014-08-143-2/+37
| | | | | | | | | Instead of saving all possibly used ones. Note that floating point registers are not saved yet, as we don't support callee-saved FP registers yet. Change-Id: I1db2ba2513f7b466c64ec103eda0c464269247b0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 JIT: parameterize the prologue and epilogue generationErik Verbruggen2014-08-146-69/+84
| | | | | | | | | ... with the regular (non-FP) registers that need to be saved. This patch shouldn't change any of the JIT generated code, because all regular callee saved registers are passed in. Change-Id: Id11b8f37f06d80e8015ac6f0d0ccefdfa3342cbe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Propagate the accepted flag back in QQuickWidget mouse handlersLaszlo Agocs2014-08-141-0/+4
| | | | | | Task-number: QTBUG-40784 Change-Id: Ieff4b38358f241aebeb16ec877e05179b01cc004 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QQuickWidget: resolve samples also when rendering is triggered from resizeLaszlo Agocs2014-08-141-1/+6
| | | | | | | | The normal update path did the resolving properly. However when we re-render due to a resize, it was not done at all. Change-Id: I3d55be111a4338e8f3dbb1081972f47daca53b35 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Frederik Gladhorn2014-08-142-4/+13
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-142-4/+13
| |\ | | | | | | | | | Change-Id: I2e06c2fcd8aa9d5d090f0568be75272ec82f7b20
| | * Disable threaded FBO canvas drawing when not supported.Gunnar Sletta2014-08-141-0/+10
| | | | | | | | | | | | | | | | | | | | | Change-Id: I1e8300c61ba31a5400fc43f85a9c39d2245b4518 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| | * V4 JIT: fix JS stack frame size calculation.Erik Verbruggen2014-08-131-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | StackLayout::calculateJSStackFrameSize now returns the size in number of QV4::Value items, instead of bytes. The value is then multiplied in the assembler by sizeof(Value) to get the number of bytes. Previously, the return value was number of bytes, which also got multiplied. A direct effect is that the JS stack size will be ~87% smaller, with the nice effect that the GC will run faster (less roots on the stack). It also won't retain objects whose reference accidentally ended up on the stack below the used portion for the current function, so possibly freeing (more) objects (earlier) than before. Change-Id: Idd5a9c173e641c03e6b8a6fe743e403eda34dfe0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Correct strokeRect documentation.Mitch Curtis2014-08-121-1/+1
| | | | | | | | | | | | | | | Change-Id: I81c61f3b32819e45e15b2be472e71e48fac0c148 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | | Reinitialize in QQuickWidget properly after hide and showLaszlo Agocs2014-08-141-22/+29
|/ / | | | | | | | | | | | | | | | | hide() followed by a show() results in totally broken QQuickWidgets due to not initializing scenegraph again. Task-number: QTBUG-40710 Change-Id: Id3cded2917d20c165b5885f3f2195d5c4566de89 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Silence unused parameter warning in release builds.Erik Verbruggen2014-08-141-0/+1
| | | | | | | | | | Change-Id: I02e5dd0bf511056c876c4e418334cad96657703e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | V4 JIT: fix stack use below stack pointerErik Verbruggen2014-08-141-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | When storing a double value returned from a function call on platforms where the value wouldn't fit in a register, we used to store it on the stack and then load it into a FP register. This stack use was done without first lowering the stack pointer. For x86 and ARM, the value is loaded directly into the FP register, and for other non-64-bit platforms it correctly allocates the stack slot. Change-Id: Idbc260038958a036ac2a7383d845199626decc8e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Ignore extra arguments passed to Context2D functions.Mitch Curtis2014-08-141-47/+47
| | | | | | | | | | | | | | | | | | | | | | This is in line with what Chrome, Firefox and IE do. This is also how most JavaScript functions in Qt behave by default (for example, TableView::resizeColumnsToContents()). Task-number: QTBUG-40703 Change-Id: I087221e305dcb5fd6709ad4a99a5163d641faac6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Create rectangle nodes in the text editing through the contextLars Knoll2014-08-138-19/+46
| | | | | | | | | | | | | | | | | | | | Unfortunately we can't re-use the QSGSimpleRectNode, as it doesn't provide us with virtual methods to move it's creation into the context. But's since it's only 20 lines of code anyway, this is still a nice cleanup. And it also allows the re-use of any optimizations in the renderer for QSGRectangleNode. Change-Id: I957777fbbeb0a994a9c257baf3bfe87fce8cc9e8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add QQuickWidget::setClearColor()Laszlo Agocs2014-08-132-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And make qquickviewcomparison able to demonstrate how to create a partially transparent QQuickWidget. Avoid also recreating the QQuickView/QQuickWidget multiple times when switching between the radio buttons. [ChangeLog] Added QQuickWidget::setClearColor() in order to support semi-transparent QQuickWidgets. Change-Id: I319ad4afbe909530274d09f2a7fcff23730d6ebd Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | V4 IR: change IR printing to be more readable.Erik Verbruggen2014-08-134-138/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New structure: - "comments" now start with a semi-colon, and have a list of key: values. ; predecessors: L17 L26 L36, loop_header: yes ; line: 30, column: 3 - when a temporary has a known type, it is written in front of the teporary when it is being assigned, and not repeated. var %109 = this double %42 = 42 - an expression starts with the operation, followed by the operands that are separated by commas. The type of the operands is the type mentioned when they are assigned. int32 %115 = sub %184, %185 if gt %27, 0 goto L40 else goto L41 - conversions do mention the operand type in order to make them easier to read. double %178 = convert var to double %60 - phi node operands are prefixed by the from-label to make it easy to match those operands with the from-block. double %62 = phi L35: %58, L34: %61 - all names except for "this" and built-ins are prefixed by a dot in order to make it clear that a lookup will occur, just like member accesses. $6 = call .int2char($0) %7 = this %8 = %7.toString() Change-Id: I9f626a91f97ca7c3f27e01a5539f3c4fc10a46b4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | V4 RegAlloc: fix callee saved register range handlingErik Verbruggen2014-08-131-15/+19
| | | | | | | | | | | | | | | | | | | | This makes sure that the index of the fixed(FP)RegisterRanges matches the indexes for normal-/fpRegisters, because this index is used to check if a chosen register intersects with a fixed (= caller saved) register at call sites. Change-Id: Ie31554dbe8ed99cb38ca6b2506da663be41d82f6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Doc: fixed a broken tableLeena Miettinen2014-08-131-0/+1
| | | | | | | | | | | | | | | | In "Importing QML Document Directories" by adding a missing \row command. Change-Id: Ie98ee34b2f66472b0ca692d2acdea870247448a0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Avoid qmake warnings about wrong includesLaszlo Agocs2014-08-132-2/+2
| | | | | | | | | | | | | | | | | | | | QtQuick: WARNING: qquickwindow.h includes qqml.h when it should include QtQml/qqml.h QtQuick: WARNING: qsgabstractrenderer.h includes qsgnode.h when it should include QtQuick/qsgnode.h Change-Id: I3b9dc20de54ef775c562b2c6b80184a7b3149586 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | ItemView: use categorized logging for delegate lifecycleShawn Rutledge2014-08-134-40/+17
| | | | | | | | | | | | | | | | | | It becomes configurable at runtime instead of having to uncomment and recompile. Change-Id: I2c6f24c89f7e6fe1a9a77b948cdac6f2994680bf Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | V4 RegAlloc: fix use position calculation for phi node arguments.Erik Verbruggen2014-08-131-11/+8
| | | | | | | | | | | | | | The correct calculation was already done, but the value was discarded. Change-Id: I600aeb9414736a3b7924a4a607233ab9bf6c02b6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | V4 JIT: tweak generated int32 to double conversion codeErik Verbruggen2014-08-131-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the target is a FP register, and the source is a memory address, do not load the int32 ourselves, but leave it to the assembler to decide what to do. On x86(_64) this is generates a single instruction, while on ARM the assembler will insert a load on its own. For the case where the target is not a FP register, use the return value register as base register for the target address. The advantage is that the address calculation is now independent of the preceding conversion, so it can fit in a different pipeline without dependencies. Change-Id: Ib7cefa636274ba8596e4d11ae0170a091a0def3e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove QQuickWindow::glslVersion & glslIsCoreProfileJ-P Nurmi2014-08-132-86/+0
| | | | | | | | | | | | | | | | | | Superceded by the OpenGLInfo attached type => remove the API before it gets released Change-Id: I7511fd28eb375eb3cd3cdd4bda6d82c1883e3094 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Fix the nine patch node factory function (part 2)Simon Hausmann2014-08-121-1/+0
| | | | | | | | | | Change-Id: I9edb6b0052d3b02cc412f56ae73e02652af0c93c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Simon Hausmann2014-08-1210-38/+57
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Simon Hausmann2014-08-1210-38/+57
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4include.cpp src/quick/items/qquickrendercontrol.cpp src/quick/items/qquickrendercontrol_p.h src/quickwidgets/qquickwidget.cpp Change-Id: Ib2dc0051a38cd283a37a7665eb4a76f6f7ec8b15
| | * Avoid double deletion when deleting an incubating component.Martin Jones2014-08-111-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The guard in QQmlIncubatorPrivate::clear() was invalidated by clearing the guards in QQmlIncubatorPrivate::incubate() when a deletion was detected. If we detect a deletion, leave the guards in place, to be handled in QQmlIncubatorPrivate::clear(). Task-number: QTBUG-40685 Change-Id: I1bf7422fda97745f1f7a3b42285a399244c09a1f Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Invalidate the scenegraph properly in the rendercontrolLaszlo Agocs2014-08-084-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Taking the persistent flags from the QQuickWindow was a bad idea. These are not applicable to the case when an application drives the scene via QQuickRenderControl. Once stop() is called, all resources must be released since the context itself will typically be destroyed afterwards. This is a backport of 0b0bb319578bb2e2eced3a80ce3876a4408b72a7 in dev. On top of this, stop() becomes invalidate() since the original invalidate() function is never used by anyone. This naming is much cleaner and is consistent with QSGContext and friends. Task-number: QTBUG-40505 Task-number: QTBUG-40435 Change-Id: I398f1bda31f335c3508b238f0328305d3cd79ffd Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>