diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-02-13 14:02:51 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-02-13 14:02:51 -0800 |
| commit | a17032eeb91f709360b6271b71b85e67f729bcc1 (patch) | |
| tree | 98cc862fc7d3633f93b942630776e9802452f212 /include/ui/InputTransport.h | |
| parent | 7a29d84f0150b49215726d08a69d343df74e02bc (diff) | |
| parent | 2d34e0cfe7e2586b75a6f2c6646dd2e1e52c973f (diff) | |
| download | frameworks_base-a17032eeb91f709360b6271b71b85e67f729bcc1.zip frameworks_base-a17032eeb91f709360b6271b71b85e67f729bcc1.tar.gz frameworks_base-a17032eeb91f709360b6271b71b85e67f729bcc1.tar.bz2 | |
Merge "Accurately track the sequence numbers of batched events."
Diffstat (limited to 'include/ui/InputTransport.h')
| -rw-r--r-- | include/ui/InputTransport.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/ui/InputTransport.h b/include/ui/InputTransport.h index 46b56ff..1f738cd 100644 --- a/include/ui/InputTransport.h +++ b/include/ui/InputTransport.h @@ -306,12 +306,23 @@ private: // Batched motion events per device and source. struct Batch { - uint32_t seq; + uint32_t seq; // sequence number of last input message batched in the event MotionEvent event; }; Vector<Batch> mBatches; + // Chain of batched sequence numbers. When multiple input messages are combined into + // a batch, we append a record here that associates the last sequence number in the + // batch with the previous one. When the finished signal is sent, we traverse the + // chain to individually finish all input messages that were part of the batch. + struct SeqChain { + uint32_t seq; // sequence number of batched input message + uint32_t chain; // sequence number of previous batched input message + }; + Vector<SeqChain> mSeqChains; + ssize_t findBatch(int32_t deviceId, int32_t source) const; + status_t sendUnchainedFinishedSignal(uint32_t seq, bool handled); static void initializeKeyEvent(KeyEvent* event, const InputMessage* msg); static void initializeMotionEvent(MotionEvent* event, const InputMessage* msg); |
