From 3c25621ad7d13f64d3ab95a27fa970fbc9998f73 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Fri, 16 Aug 2013 14:55:39 -0700 Subject: 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 --- services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'services/surfaceflinger') 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 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(×tamp, &crop, &scalingMode, &transform, - &async, &mFbFence); + input.deflate(×tamp, &isAutoTimestamp, &crop, &scalingMode, + &transform, &async, &mFbFence); mFbProducerSlot = pslot; } -- cgit v1.1