Improve performance on touch event delivery.
authorMartin Jones <martin.jones@nokia.com>
Thu, 24 Nov 2011 07:22:31 +0000 (17:22 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 24 Nov 2011 22:51:11 +0000 (23:51 +0100)
commitfa031fa3f540516e681b3bb6d6dde84f3aa28b1a
treef89fa6e93b34e255e0fd293454a912c176f0dc3f
parent95a982475d6778bb8745270f3eaa1f4bfe2545b7
Improve performance on touch event delivery.

We continuously constructed and sorted the paint ordered items for every
touch event (and paint), even though the list in most cases is identical
to the childItems list, and when it is different it rarely changes.

Detect when we can just use the childItems list directly, and otherwise
cache the ordered items list.

Change-Id: I5db0f19fc021d0c95aa6f8372ae47e6ce138d5ad
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/declarative/items/qquickitem.cpp
src/declarative/items/qquickitem_p.h
tests/auto/declarative/qquickitem/data/order.1.qml [new file with mode: 0644]
tests/auto/declarative/qquickitem/data/order.2.qml [new file with mode: 0644]
tests/auto/declarative/qquickitem/qquickitem.pro
tests/auto/declarative/qquickitem/tst_qquickitem.cpp