diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-04-03 11:16:42 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-05 16:02:45 +0200 |
commit | 6dc8f47bb05a8acb3cbcc697e0dc05356a01d4cf (patch) | |
tree | 81c7ebe9b3a55f2c8c4cdbc2fe6115024d145435 /src/quick/items/qquickwindow_p.h | |
parent | c87ae78dd78f4a8cee040b5d27e7a6f2425f3aaf (diff) |
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.
[ChangeLog][QtQuick] QQuickWindow will compresses touch events
and delivers at most one touch event per frame.
Done-with: Robin Burchell <robin.burchell@jollamobile.com>
Change-Id: Ia0169bc4a3f0da67709b91ca65c326934b55d372
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/quick/items/qquickwindow_p.h')
-rw-r--r-- | src/quick/items/qquickwindow_p.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h index 872a054666..218425c08c 100644 --- a/src/quick/items/qquickwindow_p.h +++ b/src/quick/items/qquickwindow_p.h @@ -141,8 +141,10 @@ public: #endif bool deliverTouchPoints(QQuickItem *, QTouchEvent *, const QList<QTouchEvent::TouchPoint> &, QSet<int> *, QHash<QQuickItem *, QList<QTouchEvent::TouchPoint> > *); - bool deliverTouchEvent(QTouchEvent *); + void deliverTouchEvent(QTouchEvent *); + void reallyDeliverTouchEvent(QTouchEvent *); bool deliverTouchCancelEvent(QTouchEvent *); + void flushDelayedTouchEvent(); bool deliverHoverEvent(QQuickItem *, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, bool &accepted); bool deliverMatchingPointsToItem(QQuickItem *item, QTouchEvent *event, QSet<int> *acceptedNewPoints, const QSet<int> &matchingNewPoints, const QList<QTouchEvent::TouchPoint> &matchingPoints); QTouchEvent *touchEventForItemBounds(QQuickItem *target, const QTouchEvent &originalEvent); @@ -210,6 +212,8 @@ public: QSGRenderLoop *windowManager; QQuickRenderControl *renderControl; QQuickAnimatorController *animationController; + QTouchEvent *delayedTouch; + int touchRecursionGuard; QColor clearColor; |