diff options
author | 2024-09-16 15:04:44 +0000 | |
---|---|---|
committer | 2024-09-16 15:04:44 +0000 | |
commit | ce73b49f8c377cb738157182ede5f2bc62a07b90 (patch) | |
tree | c6395a1a3cc465e2ba5fe5961a40d2f6e86b6c23 /libs/gui/BLASTBufferQueue.cpp | |
parent | b1d95d630073a3f7bddb44eb2e292d1f47c46cee (diff) | |
parent | 3118f969f488b738de1976917a0944705c209173 (diff) |
Merge "Add some tracing for release fences" into main
Diffstat (limited to 'libs/gui/BLASTBufferQueue.cpp')
-rw-r--r-- | libs/gui/BLASTBufferQueue.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp index 3c1971fd81..94998e5ab7 100644 --- a/libs/gui/BLASTBufferQueue.cpp +++ b/libs/gui/BLASTBufferQueue.cpp @@ -31,6 +31,7 @@ #include <sys/epoll.h> #include <sys/eventfd.h> +#include <gui/FenceMonitor.h> #include <gui/FrameRateUtils.h> #include <gui/GLConsumer.h> #include <gui/IProducerListener.h> @@ -475,6 +476,16 @@ void BLASTBufferQueue::releaseBufferCallbackLocked( ATRACE_CALL(); BQA_LOGV("releaseBufferCallback %s", id.to_string().c_str()); + if (CC_UNLIKELY(atrace_is_tag_enabled(ATRACE_TAG_GRAPHICS))) { + if (!mFenceMonitor) { + std::string monitorName = "release :"; + monitorName.append(mName.c_str()); + mFenceMonitor.emplace(monitorName.c_str()); + } + + mFenceMonitor->queueFence(releaseFence); + } + // Calculate how many buffers we need to hold before we release them back // to the buffer queue. This will prevent higher latency when we are running // on a lower refresh rate than the max supported. We only do that for EGL |