diff options
-rw-r--r-- | system/hwc3/HostFrameComposer.cpp | 15 | ||||
-rw-r--r-- | system/hwc3/HostFrameComposer.h | 3 |
2 files changed, 8 insertions, 10 deletions
diff --git a/system/hwc3/HostFrameComposer.cpp b/system/hwc3/HostFrameComposer.cpp index d440b880..8f232dcc 100644 --- a/system/hwc3/HostFrameComposer.cpp +++ b/system/hwc3/HostFrameComposer.cpp @@ -524,10 +524,7 @@ HWC3::Error HostFrameComposer::presentDisplay( *outDisplayFence = std::move(flushCompleteFence); } else { - rcEnc->rcSetDisplayColorBuffer( - rcEnc, displayInfo.hostDisplayId, - hostCon->grallocHelper()->getHostHandle(displayClientTarget.getBuffer())); - post(hostCon, rcEnc, displayClientTarget.getBuffer()); + post(hostCon, rcEnc, displayInfo.hostDisplayId, displayClientTarget.getBuffer()); *outDisplayFence = std::move(fence); } } @@ -696,10 +693,7 @@ HWC3::Error HostFrameComposer::presentDisplay( displayId, compositionResult->getDrmBuffer(), displayClientTargetFence); *outDisplayFence = std::move(flushFence); } else { - rcEnc->rcSetDisplayColorBuffer( - rcEnc, displayInfo.hostDisplayId, - hostCon->grallocHelper()->getHostHandle(displayClientTarget.getBuffer())); - post(hostCon, rcEnc, displayClientTarget.getBuffer()); + post(hostCon, rcEnc, displayInfo.hostDisplayId, displayClientTarget.getBuffer()); *outDisplayFence = std::move(displayClientTargetFence); } ALOGV("%s fallback to post, returns outRetireFence %d", __FUNCTION__, @@ -712,10 +706,13 @@ HWC3::Error HostFrameComposer::presentDisplay( } void HostFrameComposer::post(HostConnection* hostCon, ExtendedRCEncoderContext* rcEnc, - buffer_handle_t h) { + uint32_t hostDisplayId, buffer_handle_t h) { assert(cb && "native_handle_t::from(h) failed"); hostCon->lock(); + rcEnc->rcSetDisplayColorBuffer( + rcEnc, hostDisplayId, + hostCon->grallocHelper()->getHostHandle(h)); rcEnc->rcFBPost(rcEnc, hostCon->grallocHelper()->getHostHandle(h)); hostCon->flush(); hostCon->unlock(); diff --git a/system/hwc3/HostFrameComposer.h b/system/hwc3/HostFrameComposer.h index e90f7cfd..2cd9854a 100644 --- a/system/hwc3/HostFrameComposer.h +++ b/system/hwc3/HostFrameComposer.h @@ -74,7 +74,8 @@ class HostFrameComposer : public FrameComposer { private: HWC3::Error createHostComposerDisplayInfo(Display* display, uint32_t hostDisplayId); - void post(HostConnection* hostCon, ExtendedRCEncoderContext* rcEnc, buffer_handle_t h); + void post(HostConnection* hostCon, ExtendedRCEncoderContext* rcEnc, uint32_t hostDisplayId, + buffer_handle_t h); bool mIsMinigbm = false; |