Compress touch events in QQuickWindow.

Instead of sending multiple touch updates per frame, we
store the last one and flush the pending events just before
we enter into the scene graph sync phase.

Done-with: Robin Burchell <robin.burchell@jollamobile.com>
Change-Id: Ia0169bc4a3f0da67709b91ca65c326934b55d372
Support batching of rotated antialiased elements.

Change-Id: I67d961f23941ba5cfa16fd679b609cd0fc3071c7
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Prevent dangling pointer in QQuickShaderEffectSource.

Task-number: QTBUG-36931
Change-Id: Idb584a8703a8d93d2cbcd3feb7942476dc165a59
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Make sure we update filtering options on atlas textures.

We had had an optimization which tried to reduce state changes,
but filtering is also changed in QSGTexture::updateBindOptions
which Atlas::bind() didn't know anything about. Solution: don't
try to be so clever.

Task-number: QTBUG-35457
Change-Id: I39ac0106396921e1b652db2b2aa5a9923b35e825
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>

Conflicts:
	tests/auto/quick/scenegraph/tst_scenegraph.cpp
Don't sort batches when there are no changes.

On node removal we change the batch, but don't set rebuild
as everything else should be drawn as is. A sort after such a removal
could result on the order of batches being changed without the other
nodes being updated. This would then result in incorrect ordering
and nodes could be obscured.

Task-number: QTBUG-37222

Change-Id: I57dd2fbc945e8c10c949743f59315b3372a4b6f4
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Fix rendering issue with material changes from opaque <-> alpha

When I introduced the invalidation of z ranges, I forgot that we need
to rebuild render lists when nodes move from opaque to alpha batches
or vice versa as that sorting happens in buildRenderLists(). To remedy
this, make Batch::isMaterialCompatible report blending changes
separately and trigger a full rebuild in this case.

Task-number: QTBUG-37422
Change-Id: I020813cb531ed58353f8340fcad58dec8d7856dd
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Invalidate all batches potentially affected by a change.

When two separate changes have occurred, we need to not
only invalidate the batches directly overlapping those, but
also any batch which has render orders between the two. So,
keep track of the range of invalidated render orders and
invalidate everything in between.

Task-number: QTBUG-37422
Change-Id: Ie5a289d5c569b84917ec9ac52671173c566e69b3
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Use stable sort when cleaning batches.

Ensure valid batches do not change order. This was causing rendering
issues when m_rebuild was 0, as we would not re-sort the list in correct
render order after cleanup.

Change-Id: I912fb313d4029f96e263fad24d68462f252003df
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Merge pull request #11 from mbrasser-jolla/mer-stable

Fix potential crashes
Merge pull request #12 from sletta/selected-changes

[qtdeclarative] Cherry-pick selected rendering related fixes from Qt 5.3
Merge pull request #9 from sletta/touch

[qtdeclarative] Touch event compression in QQuickWindow.
Fix marking of prototype objects in internal class pool

As per reported bug, we have to protect ourselves against potential loops
and can mark the internal classes much simpler by just walking through
the memory pool they were allocated in.

Task-number: QTBUG-38299
Change-Id: I3ae96e8082e76d06f4321c5aa6d2e9645d2830a0