diff options
author | Mathias Agopian <mathias@google.com> | 2012-01-31 18:24:27 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-02-01 20:43:06 -0800 |
commit | 99ce5cdeb383216dee95af4d90e47406b0948ea1 (patch) | |
tree | 4f96f44e8e55a6c72b4e640704868f23a5e7c72b /libs | |
parent | 93bfeedd3768e25c783e22ed88103c2c409894a4 (diff) | |
download | frameworks_native-99ce5cdeb383216dee95af4d90e47406b0948ea1.zip frameworks_native-99ce5cdeb383216dee95af4d90e47406b0948ea1.tar.gz frameworks_native-99ce5cdeb383216dee95af4d90e47406b0948ea1.tar.bz2 |
separate transactions from updates
with this changes, SF transactions are handled as soon as possible
but do not trigger updates. the update is delayed until the next
vsync.
this allows us to work much better without requiring triple-buffering.
Change-Id: I1fa10794d0cf742129f0877698b7b1e1f2ec7401
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gui/DisplayEventReceiver.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/gui/DisplayEventReceiver.cpp b/libs/gui/DisplayEventReceiver.cpp index 3b3ccaa..6a4763d 100644 --- a/libs/gui/DisplayEventReceiver.cpp +++ b/libs/gui/DisplayEventReceiver.cpp @@ -80,7 +80,13 @@ status_t DisplayEventReceiver::requestNextVsync() { ssize_t DisplayEventReceiver::getEvents(DisplayEventReceiver::Event* events, size_t count) { - ssize_t size = mDataChannel->read(events, sizeof(events[0])*count); + return DisplayEventReceiver::getEvents(mDataChannel, events, count); +} + +ssize_t DisplayEventReceiver::getEvents(const sp<BitTube>& dataChannel, + Event* events, size_t count) +{ + ssize_t size = dataChannel->read(events, sizeof(events[0])*count); ALOGE_IF(size<0, "DisplayEventReceiver::getEvents error (%s)", strerror(-size)); |