diff options
Diffstat (limited to 'libs/gui/BLASTBufferQueue.cpp')
| -rw-r--r-- | libs/gui/BLASTBufferQueue.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp index 3d854c2b92..a023067887 100644 --- a/libs/gui/BLASTBufferQueue.cpp +++ b/libs/gui/BLASTBufferQueue.cpp @@ -316,6 +316,11 @@ void BLASTBufferQueue::releaseBufferCallback(uint64_t graphicBufferId, std::unique_lock _lock{mMutex}; BQA_LOGV("releaseBufferCallback graphicBufferId=%" PRIu64, graphicBufferId); + if (mSurfaceControl != nullptr) { + mTransformHint = mSurfaceControl->getTransformHint(); + mBufferItemConsumer->setTransformHint(mTransformHint); + } + auto it = mSubmitted.find(graphicBufferId); if (it == mSubmitted.end()) { BQA_LOGE("ERROR: releaseBufferCallback without corresponding submitted buffer %" PRIu64, @@ -608,6 +613,14 @@ public: status_t setFrameTimelineInfo(const FrameTimelineInfo& frameTimelineInfo) override { return mBbq->setFrameTimelineInfo(frameTimelineInfo); } + protected: + uint32_t getTransformHint() const override { + if (mStickyTransform == 0 && !transformToDisplayInverse()) { + return mBbq->getLastTransformHint(); + } else { + return 0; + } + } }; // TODO: Can we coalesce this with frame updates? Need to confirm @@ -777,4 +790,12 @@ PixelFormat BLASTBufferQueue::convertBufferFormat(PixelFormat& format) { return convertedFormat; } +uint32_t BLASTBufferQueue::getLastTransformHint() const { + if (mSurfaceControl != nullptr) { + return mSurfaceControl->getTransformHint(); + } else { + return 0; + } +} + } // namespace android |