summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2013-08-16 14:55:39 -0700
committerAndy McFadden <fadden@android.com>2013-08-16 15:15:16 -0700
commit3c25621ad7d13f64d3ab95a27fa970fbc9998f73 (patch)
tree2115e7f38faf3ac66c885f9be003d2fc1082220a /services/surfaceflinger
parenta33b62cc4700c68a3481d415a55e1a7b688981e1 (diff)
downloadframeworks_native-3c25621ad7d13f64d3ab95a27fa970fbc9998f73.zip
frameworks_native-3c25621ad7d13f64d3ab95a27fa970fbc9998f73.tar.gz
frameworks_native-3c25621ad7d13f64d3ab95a27fa970fbc9998f73.tar.bz2
Re-enable frame dropping for non-auto timestamps
This change adds an entire field to note whether the timestamp was auto-generated by Surface or supplied by the application. The value is used when deciding whether or not to drop frames based on buffer presentation timestamps. If a desired presentation time was set explicitly, BufferQueue will use that value to decide if a frame should be dropped. If the timestamp was generated by Surface at the time the buffer was queued, the timestamp is ignored. Bug 10151804 Change-Id: Ibd571a7578351063b813cbdad2ddbeed70655ba5
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r--services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
index 30b0084..89c87c7 100644
--- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
@@ -185,7 +185,7 @@ void VirtualDisplaySurface::onFrameCommitted() {
sp<Fence> outFence = mHwc.getLastRetireFence(mDisplayId);
VDS_LOGV("onFrameCommitted: queue sink sslot=%d", sslot);
status_t result = mSource[SOURCE_SINK]->queueBuffer(sslot,
- QueueBufferInput(systemTime(),
+ QueueBufferInput(systemTime(), false,
Rect(mSinkBufferWidth, mSinkBufferHeight),
NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, false, outFence),
&qbo);
@@ -309,12 +309,13 @@ status_t VirtualDisplaySurface::queueBuffer(int pslot,
// Extract the GLES release fence for HWC to acquire
int64_t timestamp;
+ bool isAutoTimestamp;
Rect crop;
int scalingMode;
uint32_t transform;
bool async;
- input.deflate(&timestamp, &crop, &scalingMode, &transform,
- &async, &mFbFence);
+ input.deflate(&timestamp, &isAutoTimestamp, &crop, &scalingMode,
+ &transform, &async, &mFbFence);
mFbProducerSlot = pslot;
}