aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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-142-47/+390
| | | | | | | | | | | | | | | | | | | | | | 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-135-15/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-133-121/+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-1220-46/+228
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Simon Hausmann2014-08-1220-46/+228
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-8/+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>
| | * Fix crash when loading invalid QML with behavior on invalid group propertySimon Hausmann2014-08-084-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Behaviors require the creation of a meta-object. However when trying to create a behavior on a non-existent group property, we don't have a base meta-object to base the "new" meta-object on, therefore this patch adds a null pointer check. The error in the QML file itself will be caught later on. The added test ensures that as well as that it doesn't crash of course. Change-Id: If73116053464e7e69b02ef59e8387060835083c8 Task-number: QTBUG-40369 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Fix crash when animators are deleted just after being started.Gunnar Sletta2014-08-081-2/+4
| | | | | | | | | | | | | | | Change-Id: I35850e279dae596edb9a1b93143d6aa195221b41 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| | * Don't try to reload QQuick images when changing to null screenTaylor Braun-Jones2014-08-062-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QGuiApplication is destructing, a screen change occurs causing QQuickImageBase to reload images ultimately resulting in "QPixmap: Must construct a QGuiApplication before a QPixmap". This patch fixes the issue (except for systems which multiple screens, which is a separate issue). Task-number: QTBUG-40539 Change-Id: I4bafc9790741204e90190a4491ac7a9393d0d0a7 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| | * Clarify Component.onCompleted/onDestruction docsGunnar Sletta2014-08-061-5/+4
| | | | | | | | | | | | | | | Change-Id: I86bb6b85043282f4f46a685e30b435a2f7430430 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
| | * Fix fbo creation and resize logic in QQuickWidgetLaszlo Agocs2014-08-061-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects two issues: 1. 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(). 2. 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-40505 Change-Id: I21ff418fde449aa15eef4d6593e7a518861fcde1 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| | * Fix Qt.include with cached compilation units and resourcesSimon Hausmann2014-08-064-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the worker scripts we also need to do a lookup for cached scripts here. Added also a test to ensure that Qt.include works correctly from Qt resources. Change-Id: Idb67af3da4b0cc91edbd3d2746d074fd68ed8bf0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Synchronize PathView gesture grabbing with other items.Martin Jones2014-08-065-9/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PathView didn't attempt to grab the gesture at the same event as other items. This prevented PathView from rightfully claiming the gesture before lower items in the stack. Use the same threshold test for PathView as used elsewhere. Task-number: QTBUG-37859 Change-Id: Ic57cb805ac979e41c3e35d86b2e7db781e61d69d Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
| | * Fix FBO recreated every time the QSG node is updated under some conditionsTaylor Braun-Jones2014-08-051-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When textureFollowsItemsSize is true and the item width/height are (1) not precise integer values or (2) less than the minimum FBO width/height, then QQuickFramebufferObject will delete and recreate the FBO every time the QSG node is updated. This patch fixes the issue. Task-number: QTBUG-40548 Change-Id: I532aaaa88a5c604ee7cc1fd8f0acb0601c5a94fb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | V4 JIT: generate code for int32 comparisons.Erik Verbruggen2014-08-125-5/+48
| | | | | | | | | | | | | | | Change-Id: I5e88fb3df7b01f4f515ce4d2e451a5a6f5ba92ad Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Doc: Add a keyword for XMLHttpRequestTopi Reinio2014-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make the search term 'XMLHttpRequest' return relevant results in the Assistant, add a keyword for it. Task-number: QTBUG-40240 Change-Id: I44b0d397cd014d2468e6302d4293c959ec8c8802 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* | | Doc: Remove duplicated wordsTopi Reinio2014-08-1221-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | Removes duplicated (repeated) words and fixes other minor documentation issues. Change-Id: I891f2b3e60194b207737425c1dcc1d35a5bd921a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* | | V4 JIT: fix LookupCall on ARMErik Verbruggen2014-08-122-15/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To generate a LookupCall, the register r8 was used on ARM instead of the ReturnValue register. The reason is that the ReturnValue register is also the register for the first argument. However, now that we use callee-saved registers (r8 among them), this would clobber any value stored in r8. The fix is to actually use r0 to calculate the value, because the first argument holds the lookup table, and the call is relative to that. This leaves r8 free to be used by the register allocator. Change-Id: I5095bf69d27e16111ad32d9e5d5691c7bce14516 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Remove Item.windowAlan Alpert2014-08-122-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Window is a type in a different import, so we can't just casually use it in Item. Note that this API was going to be new in the next release, so it can be safely removed (at least until we do it right). Change-Id: I9e3eb5f65ea5f46d30fb7905d0f9c479daaccbff Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | Write memory events into tracefiles generated by qmlprofilerUlf Hermann2014-08-126-0/+38
| | | | | | | | | | | | | | | Change-Id: Ic01505194f29967ed1aad16fe36e14dc5532ae25 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | V4 JIT: tune generated instructions for inplace binopsErik Verbruggen2014-08-127-212/+300
|/ / | | | | | | | | | | | | | | | | | | Generate better code for in-place binary operations where the right-hand side is either a constant or a memory address. Now that the JIT can do this, also tell the register allocator not to un-spill that right-hand side. Change-Id: I0ab852f6b92f90dfed99c05fbaf91aad2549ecf4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix the nine patch node factory function (part 1)Simon Hausmann2014-08-122-2/+3
| | | | | | | | | | Change-Id: I5981190dd43082715a7159efd478469365caf3a6 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Add more complete comparison function to QQuickShaderEffectMaterial.Michael Brasser2014-08-122-1/+11
| | | | | | | | | | | | Task-number: QTBUG-37914 Change-Id: I3646991a9a7e43dcc5681fca0d8a5e24c9a427bd Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Add OpenGLInfo attached typeJ-P Nurmi2014-08-119-2/+439
| | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Introduced OpenGLInfo attached type that provides information about the currently used OpenGL version. Change-Id: Ibdf365decf9d6331cf91c0bf541e493ced02a417 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Finish render() support for QQuickWidgetLaszlo Agocs2014-08-113-7/+42
| | | | | | | | | | | | | | | | | | The enablers are already in. Now we just need to use the virtual in QQuickWidgetPrivate and test it. Task-number: QTBUG-39562 Change-Id: I1faf5a0a244ba4169fb8f9b0dae657304038b60e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Remove setDefaultFormat() from QQuickWindowLaszlo Agocs2014-08-115-70/+27
| | | | | | | | | | | | | | Replaced by QSurfaceFormat::setDefaultFormat(). Change-Id: If4e37b75ccb55d556d80b0079be89e5a521f6dbb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Added interface for the QStyle rendering in QtQuick ControlsSimon Hausmann2014-08-083-0/+26
| | | | | | | | | | | | | | This allows a scene graph backend to customize the style rendering Change-Id: I6048df47ed3705d81140d63a21257f704a0e0a82 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Protect against crashes with invalid openglContext()Simon Hausmann2014-08-083-7/+9
| | | | | | | | | | | | | | | | | | 1) Don't fail the assertion in the animator jobs if we don't have a context 2) Delegate the opengl context check in QQuickWindow::createTextureFromImage to the QSGContext Change-Id: I1b248895dcd6db406f1af8866fd0052dd7564899 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Improve support for node iteration in the internal APISimon Hausmann2014-08-084-4/+96
| | | | | | | | | | | | | | | | Added a new node visitor that allows easier traversal of the specialized node types such as the image or rectangle nodes. Change-Id: I45a7d3e1513b4a4db9d07998a6bcee9eba34044e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Cleanup: Remove remainders of dirty state usageSimon Hausmann2014-08-084-32/+6
| | | | | | | | | | Change-Id: I4c379562af27a7eb2a47aee21090eff84fe84c55 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Allow re-implementing renderSceneSimon Hausmann2014-08-081-1/+1
| | | | | | | | | | Change-Id: Ic8e5e9ebbc5bbd1a7950807d6921304482cbde68 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Make the QtQuick window surface type configurableSimon Hausmann2014-08-083-1/+9
| | | | | | | | | | | | | | The default remains OpenGLSurface. Change-Id: I96b400b7aa9c2b0435ea0614598e1b1f32b6d6b2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Say hello to the Declarative State Machine FrameworkBrett Stottlemyer2014-08-0844-3/+3629
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Declarative State Machine Framework extends Qt's State Machine Framework (QSM) into QML to provide types for creating and executing state graphs in QML. This gives you the power of deterministic state machines, but declaratively and without having to write all of the boilerplate code. It is an alternative to the existing QML State type, intended for more complex models. [ChangeLog][QtQML] The Declarative State Machine Framework extends Qt's State Machine Framework (QSM) into QML. This gives you the power of deterministic state machines, but declaratively. Change-Id: I02390ba7f1baed50935364530925bd75087299cb Reviewed-by: Sebastian Sauer <sebastian.sauer@kdab.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* | Do not emit Timer.onTriggered while executing arbitrary JS codeGunnar Sletta2014-08-082-8/+37
| | | | | | | | | | | | | | Task-number: QTBUG-39371 Change-Id: Ibf232560918d30961bd979e14aac3ae7d2f264eb Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* | Add Window attached property on ItemShawn Rutledge2014-08-088-0/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An Item sometimes needs to know a few things about the window in which it is being displayed; this attached property can expose them without needing to go up the heirarchy to find the window. Instead of adding the QQuickWindow pointer as a property on Item as in 8f49f50a169db85401eb37daf4fe3a0fc3280603, having an attached property means that it will not be found by introspection; and it solves the problem that Window is in the QtQuick.Window module: you must import the module to use the attached property, instead of having access to a pointer whose type might not be defined if you didn't import it. The Window attached property is created on-demand (so the memory cost adds up if you use it in too many places); the tradeoff is that it can exist even when the item is not yet being shown in a window, so bindings at startup work. The API is purposely incomplete compared to that in QQuickWindow so that we can introduce what is needed in a controlled fasion over time. For now we know of use cases for visibility, active and activeFocusItem. [ChangeLog][QtQuick][Window] Added Item.Window attached property Change-Id: I649404cbd1383326678aa2144f790b2f2542dbbc Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge "Merge branch '5.3' into dev" into refs/staging/devGunnar Sletta2014-08-0816-45/+487
|\ \
| * | Merge branch '5.3' into devGunnar Sletta2014-08-0716-45/+487
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcontext2d.cpp src/quick/items/context2d/qquickcontext2dtexture.cpp Change-Id: I1a9b911b3a92333a5dddbaf43275f71bad2006f0
| | * Run autotests for Canvas.renderTarget == FramebufferObject also.Gunnar Sletta2014-08-021-2/+2
| | | | | | | | | | | | | | | Change-Id: Id1729966b3b2b75a3bd4ad387b3d7914266fb3a5 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * More QQuickCanvas cleanup handling.Gunnar Sletta2014-08-014-28/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid calling into QQuickContext2D from QQuickContext2DTexture after QQuickContext2D has been deleted. We acheive this by 1. Giving the texture a direct pointer to the gl context and and surface, so that it doesn't need to go through m_context to get to them (which may have been deleted). 2. Protect access to QQuickContext2DTexture::m_context with a mutex and make sure it is set to 0 in a safe manner when the QQuickContext2D object is deleted. Change-Id: Ie0a30f9fc46f844224838a7cdf2f28a62e8ce322 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>