summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueue.cpp
diff options
context:
space:
mode:
author Brian Anderson <brianderson@google.com> 2016-07-25 12:48:08 -0700
committer Brian Anderson <brianderson@google.com> 2016-11-17 11:44:27 -0800
commit3890c3995c4a52439844faeb80b5503d42b977d8 (patch)
tree180b19a3ef1f44ca611b0feb2808379d175c6fc1 /libs/gui/BufferQueue.cpp
parentd6927fb1143398370c0885844bfb58923ef740b7 (diff)
Cache frame event history producer-side.
* Producer maintains a recent history of frames. * Producer only does a binder call if requested informatiVon doesn't exist in the cache. * Consumer sends fences to the producer, which can be queried for timestamps without a binder call. Test: adb shell /data/nativetest/libgui_test/libgui_test --gtest_filter=*GetFrameTimestamps* Change-Id: I8a64579407cc2935f5c659462cb227b07ba27e43
Diffstat (limited to 'libs/gui/BufferQueue.cpp')
-rw-r--r--libs/gui/BufferQueue.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp
index 6d4335e460..f76a282af6 100644
--- a/libs/gui/BufferQueue.cpp
+++ b/libs/gui/BufferQueue.cpp
@@ -61,15 +61,13 @@ void BufferQueue::ProxyConsumerListener::onSidebandStreamChanged() {
}
}
-bool BufferQueue::ProxyConsumerListener::addAndGetFrameTimestamps(
+void BufferQueue::ProxyConsumerListener::addAndGetFrameTimestamps(
const NewFrameEventsEntry* newTimestamps,
- uint64_t frameNumber, FrameTimestamps* outTimestamps) {
+ FrameEventHistoryDelta* outDelta) {
sp<ConsumerListener> listener(mConsumerListener.promote());
- if (listener == nullptr) {
- return false;
+ if (listener != nullptr) {
+ listener->addAndGetFrameTimestamps(newTimestamps, outDelta);
}
- return listener->addAndGetFrameTimestamps(
- newTimestamps, frameNumber, outTimestamps);
}
void BufferQueue::createBufferQueue(sp<IGraphicBufferProducer>* outProducer,