BBQ: Clean up acquire states on BQ disconnect
When the producer disconnects, all buffers in the queue will
be freed. So clean up the bbq acquire state and handle any
pending release callbacks. If we do get a release callback for
a pending buffer for a disconnected queue, we cannot
release the buffer back to the queue. So track these
separately and drop the release callbacks as they come.
Transaction callbacks are still expected to come in the
order they were submitted regardless of buffer queue
state. So we can continue to handle the pending
transactions and transaction complete callbacks. When
the queue is reconnected, the queue will increment the
framenumbers starting from the last queued framenumber.
Bug: 201482894
Bug: 197269223
Test: atest BLASTBufferQueueTest
Change-Id: I36791661e2b6112401d85f9b50495931d82125e4
diff --git a/services/surfaceflinger/BufferStateLayer.cpp b/services/surfaceflinger/BufferStateLayer.cpp
index 2fac880..046486a 100644
--- a/services/surfaceflinger/BufferStateLayer.cpp
+++ b/services/surfaceflinger/BufferStateLayer.cpp
@@ -404,7 +404,7 @@
nsecs_t desiredPresentTime, bool isAutoTimestamp,
std::optional<nsecs_t> dequeueTime,
const FrameTimelineInfo& info) {
- ATRACE_CALL();
+ ATRACE_NAME(mSetBufferTraceTag.c_str());
const std::shared_ptr<renderengine::ExternalTexture>& buffer =
getBufferFromBufferData(bufferData);