summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2013-08-02 15:31:45 -0700
committerAndy McFadden <fadden@android.com>2013-08-02 15:31:45 -0700
commit4b49e08385a96398aa2633e096fe916dc9f08768 (patch)
tree56f219a344195b6ca7910ec26dca7b87a7f5db0a /libs
parent14fab7dd794cd6bf29e6425340683c6221062b3c (diff)
downloadframeworks_native-4b49e08385a96398aa2633e096fe916dc9f08768.zip
frameworks_native-4b49e08385a96398aa2633e096fe916dc9f08768.tar.gz
frameworks_native-4b49e08385a96398aa2633e096fe916dc9f08768.tar.bz2
Roll back recent change
Disable dropping of frames based on timestamp. Resume auto- generating timestamps in Surface. Bug 10151804 Change-Id: I15de26158e1d7ef22a5b150e685a126dc48ae2b4
Diffstat (limited to 'libs')
-rw-r--r--libs/gui/BufferQueue.cpp2
-rw-r--r--libs/gui/Surface.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp
index e22679e..88159aa 100644
--- a/libs/gui/BufferQueue.cpp
+++ b/libs/gui/BufferQueue.cpp
@@ -855,7 +855,7 @@ status_t BufferQueue::acquireBuffer(BufferItem *buffer, nsecs_t expectedPresent)
//
// NOTE: code assumes monotonic time values from the system clock are
// positive.
- while (mQueue.size() > 1) {
+ while (false && mQueue.size() > 1) {
// If entry[1] is timely, drop entry[0] (and repeat). We apply
// an additional criteria here: we only drop the earlier buffer if
// our desiredPresent falls within +/- 1 second of the expected
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index e2ec643..cfd29fe 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -261,7 +261,9 @@ int Surface::queueBuffer(android_native_buffer_t* buffer, int fenceFd) {
Mutex::Autolock lock(mMutex);
int64_t timestamp;
if (mTimestamp == NATIVE_WINDOW_TIMESTAMP_AUTO) {
- timestamp = 0;
+ timestamp = systemTime(SYSTEM_TIME_MONOTONIC);
+ ALOGV("Surface::queueBuffer making up timestamp: %.2f ms",
+ timestamp / 1000000.f);
} else {
timestamp = mTimestamp;
}