diff options
| author | 2015-05-12 12:56:16 -0700 | |
|---|---|---|
| committer | 2015-05-13 09:43:35 -0700 | |
| commit | e64a79cd8525d502723feea2190d2a85450194ee (patch) | |
| tree | 4c43a2048544e05453e97b2b7d2ca08d7c4f6c5f /libs/gui/ConsumerBase.cpp | |
| parent | f183395296328a0eb96065c1e426b91bbd11b54b (diff) | |
Fix PTS handling for buffer replacement
This changes the way that SurfaceFlinger's shadow buffer management
works such that instead of tracking the size of the shadow queue in the
BufferQueue, SF tracks the last frame number it has seen, and passes
that into the acquireBuffer call. BufferQueueConsumer then ensures that
it never returns a buffer newer than that frame number, even if that
means that it must return PRESENT_LATER for an otherwise valid buffer.
Change-Id: I3fcb45f683ed660c3f18a8b85ae1f8a962ba6f0e
(cherry picked from commit a4650a50a0b35e9e4342d6600b6eb24fd94bb8e5)
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
| -rw-r--r-- | libs/gui/ConsumerBase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp index aa9443acfa..072ab44bc4 100644 --- a/libs/gui/ConsumerBase.cpp +++ b/libs/gui/ConsumerBase.cpp @@ -211,8 +211,8 @@ void ConsumerBase::dumpLocked(String8& result, const char* prefix) const { } status_t ConsumerBase::acquireBufferLocked(BufferItem *item, - nsecs_t presentWhen) { - status_t err = mConsumer->acquireBuffer(item, presentWhen); + nsecs_t presentWhen, uint64_t maxFrameNumber) { + status_t err = mConsumer->acquireBuffer(item, presentWhen, maxFrameNumber); if (err != NO_ERROR) { return err; } |