platform/upstream/qtdeclarative.git
10 years agoV4 IR: Add loop peeling.
Erik Verbruggen [Wed, 23 Jul 2014 10:22:11 +0000 (12:22 +0200)]
V4 IR: Add loop peeling.

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>
10 years agoV4 IR: add immediate dominator re-calculation.
Erik Verbruggen [Wed, 23 Jul 2014 10:17:28 +0000 (12:17 +0200)]
V4 IR: add immediate dominator re-calculation.

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>
10 years agoDoc: Removing url variable from qdocconf file.
Topi Reinio [Fri, 15 Aug 2014 11:10:55 +0000 (13:10 +0200)]
Doc: Removing url variable from qdocconf file.

-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>
10 years agoFix setContextObject to re-evaluate bindings
Alex Montgomery [Fri, 15 Aug 2014 16:41:56 +0000 (09:41 -0700)]
Fix setContextObject to re-evaluate bindings

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>
10 years agoFix cursorShape with QQuickWidget
Laszlo Agocs [Thu, 14 Aug 2014 11:34:30 +0000 (13:34 +0200)]
Fix cursorShape with QQuickWidget

Task-number: QTBUG-40729
Change-Id: If3b2f8ca8795da1ac7c626db9c872f735d1e7b5d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
10 years agoCleanup
Simon Hausmann [Wed, 6 Aug 2014 12:59:34 +0000 (14:59 +0200)]
Cleanup

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>
10 years agoFix flicker when showing QQuickWidget
Laszlo Agocs [Thu, 14 Aug 2014 10:58:55 +0000 (12:58 +0200)]
Fix flicker when showing QQuickWidget

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>
10 years agoV4 JIT: fix int32 to double conversion code
Erik Verbruggen [Thu, 14 Aug 2014 08:56:54 +0000 (10:56 +0200)]
V4 JIT: fix int32 to double conversion code

Missing else: two (nearly identical) conversions would get generated.

Change-Id: I745120f81d42bf28fbce7ab6a62da909a8e14458
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 JIT: add d8-d15 as available FP registers on ARM.
Erik Verbruggen [Fri, 8 Aug 2014 13:36:37 +0000 (15:36 +0200)]
V4 JIT: add d8-d15 as available FP registers on ARM.

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>
10 years agoV4 JIT: support saving used callee saved FP registers.
Erik Verbruggen [Tue, 12 Aug 2014 14:28:49 +0000 (16:28 +0200)]
V4 JIT: support saving used callee saved FP registers.

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>
10 years agoV4 JIT: calculate used registers and only save those.
Erik Verbruggen [Tue, 12 Aug 2014 12:30:42 +0000 (14:30 +0200)]
V4 JIT: calculate used registers and only save those.

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>
10 years agoV4 JIT: parameterize the prologue and epilogue generation
Erik Verbruggen [Tue, 12 Aug 2014 07:40:11 +0000 (09:40 +0200)]
V4 JIT: parameterize the prologue and epilogue generation

... 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>
10 years agoPropagate the accepted flag back in QQuickWidget mouse handlers
Laszlo Agocs [Thu, 14 Aug 2014 12:08:34 +0000 (14:08 +0200)]
Propagate the accepted flag back in QQuickWidget mouse handlers

Task-number: QTBUG-40784
Change-Id: Ieff4b38358f241aebeb16ec877e05179b01cc004
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoQQuickWidget: resolve samples also when rendering is triggered from resize
Laszlo Agocs [Tue, 12 Aug 2014 09:58:58 +0000 (11:58 +0200)]
QQuickWidget: resolve samples also when rendering is triggered from resize

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>
10 years agoMerge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Frederik Gladhorn [Thu, 14 Aug 2014 09:37:06 +0000 (11:37 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4

10 years agoMerge remote-tracking branch 'origin/5.3' into 5.4
Frederik Gladhorn [Thu, 14 Aug 2014 09:35:11 +0000 (11:35 +0200)]
Merge remote-tracking branch 'origin/5.3' into 5.4

Change-Id: I2e06c2fcd8aa9d5d090f0568be75272ec82f7b20

10 years agoReinitialize in QQuickWidget properly after hide and show
Laszlo Agocs [Tue, 12 Aug 2014 08:10:30 +0000 (10:10 +0200)]
Reinitialize in QQuickWidget properly after hide and show

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>
10 years agoSilence unused parameter warning in release builds.
Erik Verbruggen [Mon, 4 Aug 2014 11:24:57 +0000 (13:24 +0200)]
Silence unused parameter warning in release builds.

Change-Id: I02e5dd0bf511056c876c4e418334cad96657703e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 JIT: fix stack use below stack pointer
Erik Verbruggen [Tue, 5 Aug 2014 08:51:57 +0000 (10:51 +0200)]
V4 JIT: fix stack use below stack pointer

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>
10 years agoIgnore extra arguments passed to Context2D functions.
Mitch Curtis [Mon, 11 Aug 2014 14:41:02 +0000 (16:41 +0200)]
Ignore extra arguments passed to Context2D functions.

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>
10 years agoDisable threaded FBO canvas drawing when not supported.
Gunnar Sletta [Tue, 12 Aug 2014 13:06:04 +0000 (15:06 +0200)]
Disable threaded FBO canvas drawing when not supported.

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>
10 years agoCreate rectangle nodes in the text editing through the context
Lars Knoll [Fri, 8 Aug 2014 18:29:19 +0000 (20:29 +0200)]
Create rectangle nodes in the text editing through the context

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>
10 years agoAdd QQuickWidget::setClearColor()
Laszlo Agocs [Thu, 24 Jul 2014 08:23:12 +0000 (10:23 +0200)]
Add QQuickWidget::setClearColor()

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>
10 years agoV4 IR: change IR printing to be more readable.
Erik Verbruggen [Tue, 5 Aug 2014 12:11:16 +0000 (14:11 +0200)]
V4 IR: change IR printing to be more readable.

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>
10 years agoV4 RegAlloc: fix callee saved register range handling
Erik Verbruggen [Fri, 8 Aug 2014 14:05:54 +0000 (16:05 +0200)]
V4 RegAlloc: fix callee saved register range handling

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>
10 years agoDoc: fixed a broken table
Leena Miettinen [Wed, 13 Aug 2014 09:04:41 +0000 (11:04 +0200)]
Doc: fixed a broken table

In "Importing QML Document Directories" by
adding a missing \row command.

Change-Id: Ie98ee34b2f66472b0ca692d2acdea870247448a0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoV4 JIT: fix JS stack frame size calculation.
Erik Verbruggen [Tue, 12 Aug 2014 14:56:39 +0000 (16:56 +0200)]
V4 JIT: fix JS stack frame size calculation.

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>
10 years agoAvoid qmake warnings about wrong includes
Laszlo Agocs [Wed, 13 Aug 2014 08:23:04 +0000 (10:23 +0200)]
Avoid qmake warnings about wrong includes

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>
10 years agoItemView: use categorized logging for delegate lifecycle
Shawn Rutledge [Tue, 12 Aug 2014 11:42:19 +0000 (13:42 +0200)]
ItemView: use categorized logging for delegate lifecycle

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>
10 years agoV4 RegAlloc: fix use position calculation for phi node arguments.
Erik Verbruggen [Mon, 11 Aug 2014 11:20:07 +0000 (13:20 +0200)]
V4 RegAlloc: fix use position calculation for phi node arguments.

The correct calculation was already done, but the value was discarded.

Change-Id: I600aeb9414736a3b7924a4a607233ab9bf6c02b6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4 JIT: tweak generated int32 to double conversion code
Erik Verbruggen [Thu, 7 Aug 2014 12:33:55 +0000 (14:33 +0200)]
V4 JIT: tweak generated int32 to double conversion code

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>
10 years agoRemove QQuickWindow::glslVersion & glslIsCoreProfile
J-P Nurmi [Sun, 10 Aug 2014 10:22:56 +0000 (12:22 +0200)]
Remove QQuickWindow::glslVersion & glslIsCoreProfile

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>
10 years agoFix the nine patch node factory function (part 2)
Simon Hausmann [Sat, 9 Aug 2014 07:28:10 +0000 (09:28 +0200)]
Fix the nine patch node factory function (part 2)

Change-Id: I9edb6b0052d3b02cc412f56ae73e02652af0c93c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMerge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Simon Hausmann [Tue, 12 Aug 2014 10:34:35 +0000 (12:34 +0200)]
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4

10 years agoCorrect strokeRect documentation.
Mitch Curtis [Tue, 12 Aug 2014 09:36:26 +0000 (11:36 +0200)]
Correct strokeRect documentation.

Change-Id: I81c61f3b32819e45e15b2be472e71e48fac0c148
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
10 years agoV4 JIT: generate code for int32 comparisons.
Erik Verbruggen [Tue, 22 Jul 2014 09:56:33 +0000 (11:56 +0200)]
V4 JIT: generate code for int32 comparisons.

Change-Id: I5e88fb3df7b01f4f515ce4d2e451a5a6f5ba92ad
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoSilence harmless compiler warning.
Gunnar Sletta [Mon, 11 Aug 2014 12:30:35 +0000 (14:30 +0200)]
Silence harmless compiler warning.

AlignJustify is not a tested value, but the compiler warning
can throw you off, so best to keep it quiet.

Change-Id: I0b3d717dfe2c11fc4367e7eceb5b83009c4e0a30
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
10 years agoDoc: Add a keyword for XMLHttpRequest
Topi Reinio [Tue, 12 Aug 2014 08:52:42 +0000 (10:52 +0200)]
Doc: Add a keyword for XMLHttpRequest

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>
10 years agobenchmarks: Skip compilation of (and mark with FIXME) a few benchmarks that don't...
Robin Burchell [Mon, 11 Aug 2014 10:41:00 +0000 (12:41 +0200)]
benchmarks: Skip compilation of (and mark with FIXME) a few benchmarks that don't build.

Change-Id: I4d2e9bf3a520636c568a6b58e311994693446c97
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agobenchmarks/particles: fix projects to actually build
Robin Burchell [Mon, 11 Aug 2014 10:35:47 +0000 (12:35 +0200)]
benchmarks/particles: fix projects to actually build

Change-Id: I3edb05279119b921b50a0329dfd47f0ff2cdb9bc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoFix compilation of tst_compilation (:-P) benchmark.
Robin Burchell [Mon, 11 Aug 2014 10:13:46 +0000 (12:13 +0200)]
Fix compilation of tst_compilation (:-P) benchmark.

Change-Id: I7bbf24d816a356f100d7e2c5a8e7a81218f0f54d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoDoc: Remove duplicated words
Topi Reinio [Mon, 11 Aug 2014 13:34:21 +0000 (15:34 +0200)]
Doc: Remove duplicated words

Removes duplicated (repeated) words and fixes other minor
documentation issues.

Change-Id: I891f2b3e60194b207737425c1dcc1d35a5bd921a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
10 years agoV4 JIT: fix LookupCall on ARM
Erik Verbruggen [Mon, 11 Aug 2014 11:15:34 +0000 (13:15 +0200)]
V4 JIT: fix LookupCall on ARM

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>
10 years agoRemove Item.window
Alan Alpert [Thu, 7 Aug 2014 04:18:45 +0000 (21:18 -0700)]
Remove Item.window

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>
10 years agoWrite memory events into tracefiles generated by qmlprofiler
Ulf Hermann [Mon, 16 Jun 2014 11:33:33 +0000 (13:33 +0200)]
Write memory events into tracefiles generated by qmlprofiler

Change-Id: Ic01505194f29967ed1aad16fe36e14dc5532ae25
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoMerge remote-tracking branch 'origin/5.3' into 5.4
Simon Hausmann [Tue, 12 Aug 2014 08:03:53 +0000 (10:03 +0200)]
Merge remote-tracking branch 'origin/5.3' into 5.4

Conflicts:
src/qml/jsruntime/qv4include.cpp
src/quick/items/qquickrendercontrol.cpp
src/quick/items/qquickrendercontrol_p.h
src/quickwidgets/qquickwidget.cpp

Change-Id: Ib2dc0051a38cd283a37a7665eb4a76f6f7ec8b15

10 years agoV4 JIT: tune generated instructions for inplace binops
Erik Verbruggen [Fri, 27 Jun 2014 12:37:50 +0000 (14:37 +0200)]
V4 JIT: tune generated instructions for inplace binops

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>
10 years agoFix the nine patch node factory function (part 1)
Simon Hausmann [Sat, 9 Aug 2014 07:27:42 +0000 (09:27 +0200)]
Fix the nine patch node factory function (part 1)

Change-Id: I5981190dd43082715a7159efd478469365caf3a6
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAdd more complete comparison function to QQuickShaderEffectMaterial.
Michael Brasser [Fri, 8 Aug 2014 15:57:46 +0000 (10:57 -0500)]
Add more complete comparison function to QQuickShaderEffectMaterial.

Task-number: QTBUG-37914
Change-Id: I3646991a9a7e43dcc5681fca0d8a5e24c9a427bd
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAdd OpenGLInfo attached type
J-P Nurmi [Sat, 9 Aug 2014 21:42:20 +0000 (23:42 +0200)]
Add OpenGLInfo attached type

[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>
10 years agoFinish render() support for QQuickWidget
Laszlo Agocs [Thu, 7 Aug 2014 13:41:58 +0000 (15:41 +0200)]
Finish render() support for QQuickWidget

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>
10 years agoRemove setDefaultFormat() from QQuickWindow
Laszlo Agocs [Thu, 7 Aug 2014 15:19:50 +0000 (17:19 +0200)]
Remove setDefaultFormat() from QQuickWindow

Replaced by QSurfaceFormat::setDefaultFormat().

Change-Id: If4e37b75ccb55d556d80b0079be89e5a521f6dbb
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAvoid double deletion when deleting an incubating component.
Martin Jones [Sat, 9 Aug 2014 12:01:08 +0000 (22:01 +1000)]
Avoid double deletion when deleting an incubating component.

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>
10 years agoAdded interface for the QStyle rendering in QtQuick Controls
Simon Hausmann [Fri, 8 Aug 2014 14:33:14 +0000 (16:33 +0200)]
Added interface for the QStyle rendering in QtQuick Controls

This allows a scene graph backend to customize the style rendering

Change-Id: I6048df47ed3705d81140d63a21257f704a0e0a82
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoProtect against crashes with invalid openglContext()
Simon Hausmann [Fri, 8 Aug 2014 11:00:45 +0000 (13:00 +0200)]
Protect against crashes with invalid openglContext()

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>
10 years agoImprove support for node iteration in the internal API
Simon Hausmann [Fri, 8 Aug 2014 10:10:44 +0000 (12:10 +0200)]
Improve support for node iteration in the internal API

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>
10 years agoCleanup: Remove remainders of dirty state usage
Simon Hausmann [Fri, 8 Aug 2014 08:43:27 +0000 (10:43 +0200)]
Cleanup: Remove remainders of dirty state usage

Change-Id: I4c379562af27a7eb2a47aee21090eff84fe84c55
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoAllow re-implementing renderScene
Simon Hausmann [Fri, 8 Aug 2014 08:33:23 +0000 (10:33 +0200)]
Allow re-implementing renderScene

Change-Id: Ic8e5e9ebbc5bbd1a7950807d6921304482cbde68
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoMake the QtQuick window surface type configurable
Simon Hausmann [Fri, 8 Aug 2014 08:32:53 +0000 (10:32 +0200)]
Make the QtQuick window surface type configurable

The default remains OpenGLSurface.

Change-Id: I96b400b7aa9c2b0435ea0614598e1b1f32b6d6b2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
10 years agoSay hello to the Declarative State Machine Framework
Brett Stottlemyer [Thu, 31 Jul 2014 06:45:14 +0000 (09:45 +0300)]
Say hello to the Declarative State Machine Framework

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>
10 years agoDo not emit Timer.onTriggered while executing arbitrary JS code
Gunnar Sletta [Fri, 30 May 2014 13:45:27 +0000 (15:45 +0200)]
Do not emit Timer.onTriggered while executing arbitrary JS code

Task-number: QTBUG-39371
Change-Id: Ibf232560918d30961bd979e14aac3ae7d2f264eb
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
10 years agoAdd Window attached property on Item
Shawn Rutledge [Thu, 7 Aug 2014 11:57:50 +0000 (13:57 +0200)]
Add Window attached property on Item

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>
10 years agoMerge "Merge branch '5.3' into dev" into refs/staging/dev
Gunnar Sletta [Fri, 8 Aug 2014 09:05:12 +0000 (11:05 +0200)]
Merge "Merge branch '5.3' into dev" into refs/staging/dev

10 years agoV4 IR: extend BasicBlockSet functionality.
Erik Verbruggen [Wed, 23 Jul 2014 10:04:07 +0000 (12:04 +0200)]
V4 IR: extend BasicBlockSet functionality.

To be used in later patches.

Change-Id: I379addaea225482bcbfd7a0b03dbdbaa254dd579
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4: change string flattening to be iterative and use a worklist.
Erik Verbruggen [Wed, 6 Aug 2014 09:05:43 +0000 (11:05 +0200)]
V4: change string flattening to be iterative and use a worklist.

And not recursive, because that might blow out of stack space.

Task-number: QTBUG-39520
Change-Id: Id961d4af03a543d3efa173f976626cf2dae4f483
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoV4: add more line number information.
Erik Verbruggen [Tue, 5 Aug 2014 14:43:11 +0000 (16:43 +0200)]
V4: add more line number information.

Change-Id: Ibd3e747918dc0bc939fcbd173585fb1e4d4f08fb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdd support for conditional breakpoints and evaluate.
Erik Verbruggen [Fri, 4 Jul 2014 15:01:02 +0000 (17:01 +0200)]
Add support for conditional breakpoints and evaluate.

Also centralized the context state saver and added line number saving, so that the
JS jobs for evaluation of breakpoint conditions don't change the state of the current
engine context.

Task-number: QTBUG-37119
Task-number: QTCREATORBUG-11516
Change-Id: Ia21b3d64e239e5b67f3c07e1c006d8e6748f29b6
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAdd declarative QQuickTextMetrics API from QQuickFontMetrics invokables
Mitch Curtis [Tue, 5 Aug 2014 15:42:54 +0000 (17:42 +0200)]
Add declarative QQuickTextMetrics API from QQuickFontMetrics invokables

This allows use of a declarative API for the functions in QFontMetricsF
which take parameters. This solves the problem of QML expressions that
use QML methods not being re-evaluated when the internal data changes,
by allowing the user to set the arguments as properties of a
TextMetrics object, that would otherwise have to be passed to QML
methods.

For example:

    FontMetrics {
        id: fontMetrics
    }

    property rect r: fontMetrics.boundingRect("Blah")

At some point, the font of the FontMetrics object is changed, but r
will still represent the original bounding rect. Instead, the user will
now write:

    TextMetrics {
        id: textMetrics
        text: "Blah"
    }

    property rect r: textMetrics.boundingRect

The QML methods remain in QQuickFontMetrics for those who need an
imperative API.

[ChangeLog][QtQuick] Added QQuickTextMetrics, which provides a
declarative API for the functions in QFontMetricsF which take
arguments.

Change-Id: I019dc4639531906fc751ba61281cc1c695742287
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoInvalidate the scenegraph properly in the rendercontrol
Laszlo Agocs [Tue, 5 Aug 2014 12:53:34 +0000 (14:53 +0200)]
Invalidate the scenegraph properly in the rendercontrol

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>
10 years agoFix crash when loading invalid QML with behavior on invalid group property
Simon Hausmann [Fri, 1 Aug 2014 08:13:06 +0000 (10:13 +0200)]
Fix crash when loading invalid QML with behavior on invalid group property

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>
10 years agoFix crash when animators are deleted just after being started.
Gunnar Sletta [Wed, 6 Aug 2014 09:01:06 +0000 (11:01 +0200)]
Fix crash when animators are deleted just after being started.

Change-Id: I35850e279dae596edb9a1b93143d6aa195221b41
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
10 years agoMultiPointTouchArea: Guard _mouseTouchPoint with a QPointer.
Robin Burchell [Wed, 6 Aug 2014 11:51:19 +0000 (13:51 +0200)]
MultiPointTouchArea: Guard _mouseTouchPoint with a QPointer.

The touch point can be deleted (for instance, on ungrab()) without
_mouseTouchPoint being reset occurs.

This caused a crash on tst_qquickmultipointtoucharea::inFlickable with
MallocScribble=1 enabled on OS X (use-after-free).

Change-Id: Ife9f59d75827285b18bb1772ddbee30d79a3f0b5
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoFix use-after-free in testcase.
Erik Verbruggen [Wed, 6 Aug 2014 13:18:08 +0000 (15:18 +0200)]
Fix use-after-free in testcase.

The call to setActive does a deleteLater on the window. Then the QTRY_*
macros run the event loop, thereby deleting the window. So, after
wrapping the window in a QPointer, that pointer must either be null, or
the window shouldn't be visible.

Change-Id: Ib3fc5c5284bd5dae378a0f6a17117b262b9a3687
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
10 years agoHandle scene graph invalidation
Gunnar Sletta [Tue, 5 Aug 2014 10:07:42 +0000 (10:07 +0000)]
Handle scene graph invalidation

Change-Id: Icff592a4ae48444a36406a65c1c04a3a6da77616
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMake sure texture factories are delete before libraries are unloaded.
Gunnar Sletta [Thu, 7 Aug 2014 09:13:03 +0000 (11:13 +0200)]
Make sure texture factories are delete before libraries are unloaded.

Because scene graph adaptations and custom implementations can
instantiate QQuickTextureFactories, we need to make sure that
their destructors are called before their libraries are unloaded
to avoid crashes on shutdown.

Change-Id: I17d38e2909aabcb4ea7bf4eecc29df86c8479fdb
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
10 years agoQQuickText::itemChange must call QQuickItem::itemChange
Shawn Rutledge [Thu, 7 Aug 2014 14:06:38 +0000 (16:06 +0200)]
QQuickText::itemChange must call QQuickItem::itemChange

The need for this was documented, but not done in this case.
d5e612fb3e9753c762b741d135fabd2b1f8ae1a6
So it was not possible to use the windowChanged signal inside a Text.

Change-Id: I4e3a49ca898cbd09b5731bd133cf93c212062fa2
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
10 years agoTextInput::displayText: include partial input from an input method
J-P Nurmi [Fri, 25 Jul 2014 13:49:36 +0000 (15:49 +0200)]
TextInput::displayText: include partial input from an input method

[ChangeLog][QtQuick][Important Behavior Changes] TextInput::displayText
now includes also partial input from an input method and thus matches with
the actual displayed text.

Task-number: QTBUG-40329
Change-Id: I407f464938c550d73eba1351283ec751aa293380
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
10 years agoListView: add support for "pull back" header & footer
J-P Nurmi [Mon, 3 Mar 2014 14:53:27 +0000 (15:53 +0100)]
ListView: add support for "pull back" header & footer

[ChangeLog][QtQuick][ListView] Introduced headerPositioning and
footerPositioning properties to control whether header and footer
are positioned inline, as overlays, or so that they slide away and
can be pulled back regardless of the content position.

Change-Id: Ifef1faf1ce6acf2b55cd1b6408e22ec2de841409
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
10 years agoRename QQuickRenderControl::stop() to invalidate()
Laszlo Agocs [Thu, 7 Aug 2014 08:05:04 +0000 (10:05 +0200)]
Rename QQuickRenderControl::stop() to invalidate()

To be consistent.

Change-Id: Ia78bf4a27e8ccb1a4f0a44865e810f1070c39e5d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoAccelerate property lookups for C++-based QObject singletons.
Michael Brasser [Wed, 23 Jul 2014 17:43:38 +0000 (12:43 -0500)]
Accelerate property lookups for C++-based QObject singletons.

Change-Id: Icbdf06a077014db5dd57cba42f84591433ec4196
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoAllow simple ShaderEffects to be batched by the renderer.
Michael Brasser [Wed, 23 Apr 2014 02:19:50 +0000 (21:19 -0500)]
Allow simple ShaderEffects to be batched by the renderer.

Identical ShaderEffects that use the standard vertex shader with a
single source texture, and that set supportsAtlasTextures, are now
candidates for batching.

Task-number: QTBUG-37914
Change-Id: Ib0ce58647a8c7c48e88bd84cf2645f1a8f28691f
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
10 years agoTemporarily mark grab()/item.layer tests insignificant under ANGLE
Andrew Knight [Thu, 7 Aug 2014 12:44:50 +0000 (15:44 +0300)]
Temporarily mark grab()/item.layer tests insignificant under ANGLE

This is to pass CI while the issue is being fixed.

Task-number: QTBUG-40649
Change-Id: I9b095ce0ce0a3c51956ab81d09975b6cc6ce3592
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
10 years agoDisable tests on failing ANGLE config
Gunnar Sletta [Thu, 7 Aug 2014 17:55:42 +0000 (20:55 +0300)]
Disable tests on failing ANGLE config

Task-number: QTBUG-40658
Change-Id: I9a00083213de4d31216813351a406ec460d146fa
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
10 years agoMerge branch '5.3' into dev
Gunnar Sletta [Thu, 7 Aug 2014 09:31:23 +0000 (11:31 +0200)]
Merge branch '5.3' into dev

Conflicts:
src/quick/items/context2d/qquickcontext2d.cpp
src/quick/items/context2d/qquickcontext2dtexture.cpp

Change-Id: I1a9b911b3a92333a5dddbaf43275f71bad2006f0

10 years agoDon't try to reload QQuick images when changing to null screen
Taylor Braun-Jones [Thu, 31 Jul 2014 23:47:04 +0000 (19:47 -0400)]
Don't try to reload QQuick images when changing to null screen

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>
10 years agoClarify Component.onCompleted/onDestruction docs
Gunnar Sletta [Tue, 5 Aug 2014 06:16:14 +0000 (08:16 +0200)]
Clarify Component.onCompleted/onDestruction docs

Change-Id: I86bb6b85043282f4f46a685e30b435a2f7430430
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
10 years agoFix fbo creation and resize logic in QQuickWidget
Laszlo Agocs [Tue, 5 Aug 2014 15:16:56 +0000 (17:16 +0200)]
Fix fbo creation and resize logic in QQuickWidget

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>
10 years agoFix Qt.include with cached compilation units and resources
Simon Hausmann [Mon, 4 Aug 2014 13:27:24 +0000 (15:27 +0200)]
Fix Qt.include with cached compilation units and resources

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>
10 years agoSynchronize PathView gesture grabbing with other items.
Martin Jones [Wed, 23 Jul 2014 06:07:31 +0000 (16:07 +1000)]
Synchronize PathView gesture grabbing with other items.

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>
10 years agoFix Flickable mouse grab issue.
Robert Griebl [Thu, 31 Jul 2014 13:43:42 +0000 (15:43 +0200)]
Fix Flickable mouse grab issue.

This issue cannot be reproduced on the desktop with a mouse (at least I
could not).  It can however reliably be reproduced on iMX6 embedded hardware
with a touch-screen.  It seems like the TS driver is reporting mouse events
with a much more coarse granularity than the USB mouse driver, which in turn
triggers this bug.
(Qt4's declarative, as well as Qt5's quick1 and 2 all have the same issue)

Change-Id: Id151e3847bc8d77c7b405b9c4d4d5747a6e33ed0
Task-number: QTBUG-27185# Please enter the commit message for your changes. Lines starting
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
10 years agoIntroducing qmllint tool.
Sérgio Martins [Wed, 9 Jul 2014 12:28:23 +0000 (13:28 +0100)]
Introducing qmllint tool.

A command line program that returns 0 if a .qml file is syntactically
correct.

Ideal to integrate into continuous integration systems.

[ChangeLog][QtQml] Added QML linter tool.

Change-Id: Id420159298e9d2390acd870fee9cf1c3d08e2dec
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoUse the renamed qt_gl_global_share_context
Jocelyn Turcotte [Tue, 1 Jul 2014 17:20:25 +0000 (19:20 +0200)]
Use the renamed qt_gl_global_share_context

Change-Id: I438c33a1dc83fd0cd1ec08bb4e4a1257a3216ca2
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoFix FBO recreated every time the QSG node is updated under some conditions
Taylor Braun-Jones [Fri, 1 Aug 2014 14:48:37 +0000 (10:48 -0400)]
Fix FBO recreated every time the QSG node is updated under some conditions

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>
10 years agoFix uninitialized memory read
Lars Knoll [Mon, 4 Aug 2014 10:46:50 +0000 (12:46 +0200)]
Fix uninitialized memory read

Explicitly initialize the markBit to 0. This is important
for stack based execution contexts that can have uninitialized
data in the bit.

Change-Id: I50f1286949f1b4732e3a31b83b238bc7dcf7c7a7
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
10 years agoClean up Image and ShaderEffectSource properly.
Gunnar Sletta [Thu, 31 Jul 2014 09:40:03 +0000 (11:40 +0200)]
Clean up Image and ShaderEffectSource properly.

Change-Id: I9e3eb5f65ea5f46d30fb7905d0f9c479da367bf5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoSpeed up the test a bit..
Gunnar Sletta [Mon, 4 Aug 2014 08:10:10 +0000 (10:10 +0200)]
Speed up the test a bit..

Using hundreds of thousands of Items works, but it takes its
toll, so use a custom item to allocate QSGNodes directly which
are instantanous.

Change-Id: Iee5d8495b3d7d5abd24c14a53b2327e5efe9523b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMake ssa compile on Android with gcc 4.6
Laszlo Agocs [Thu, 31 Jul 2014 12:32:12 +0000 (14:32 +0200)]
Make ssa compile on Android with gcc 4.6

Avoid errors like

compiler/qv4ssa.cpp:660:59: error: no matching function for call to
'sort(QVector<QV4::IR::BasicBlock*>::iterator, QVector<QV4::IR::BasicBlock*>::iterator,
(anonymous namespace)::DominatorTree::calculateDFNodeIterOrder() const::Cmp)'

Change-Id: I4189bd621f1cef5e00b06f5b6b6dd430fefe653f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
10 years agoRun autotests for Canvas.renderTarget == FramebufferObject also.
Gunnar Sletta [Fri, 1 Aug 2014 09:25:55 +0000 (11:25 +0200)]
Run autotests for Canvas.renderTarget == FramebufferObject also.

Change-Id: Id1729966b3b2b75a3bd4ad387b3d7914266fb3a5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoMore QQuickCanvas cleanup handling.
Gunnar Sletta [Fri, 1 Aug 2014 09:22:31 +0000 (11:22 +0200)]
More QQuickCanvas cleanup handling.

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>
10 years agoMake canvas cleanup work propertly...
Gunnar Sletta [Wed, 30 Jul 2014 15:11:02 +0000 (17:11 +0200)]
Make canvas cleanup work propertly...

Depending on which mode we are in, we need to run cleanup
on the right thread and in the right way.

Image canvas doesn't contain any GL resources and can be nuked
right away. The actual QSGTexture is managed by the node, so we
don't need to worry about it.

For FBO it is a bit more complicated.
 - Threaded: We create a cleanup handler that runs makeCurrent
   deleteTexture and doneCurrent and then release the surface
   on the GUI thread.
 - Immediate: Same as threaded, just right away
 - Cooperative: Schedule the texture to be deleted on the
   next sync. The Context doesn't have its own GL context
   in this case, so don't worry about it.

Change-Id: I2d0ae7acfa05561faa52f3cacd767eb18cabaf02
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>