diff options
author | Alex Sarraf <asarraf@codeaurora.org> | 2021-11-08 12:03:19 -0800 |
---|---|---|
committer | Vishvanath Singh <quic_vishvana@quicinc.com> | 2021-12-13 22:50:46 +0530 |
commit | 2e5df2075168c35ddc2ea326d385585bac058abd (patch) | |
tree | ca774984c502085f6fa35c8e7ae32e9d86644a19 | |
parent | 53ceb7621b6c19e42f5ce7008cb902ccec66084d (diff) |
sf: Call EndUnifiedDraw on external disconnect
Call EndUnifiedDraw on external disconnect for
cleanup.
Change-Id: Id9cef55c40a1ed69a519382432b4f825d7e42274
CRs-Fixed: 3076641
-rwxr-xr-x | services/surfaceflinger/SurfaceFlinger.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 89bd84579c..8f7d293673 100755 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -3504,14 +3504,18 @@ void SurfaceFlinger::processDisplayHotplugEventsLocked() { updateInternalDisplaysPresentationMode(); } } - + uint32_t hwcDisplayId = static_cast<uint32_t>(event.hwcDisplayId); + bool isConnected = (event.connection == hal::Connection::CONNECTED); if (isDisplayExtnEnabled() && isInternalDisplay) { - uint32_t hwcDisplayId = static_cast<uint32_t>(event.hwcDisplayId); - bool isConnected = (event.connection == hal::Connection::CONNECTED); auto activeConfigId = getHwComposer().getActiveMode(displayId); LOG_ALWAYS_FATAL_IF(!activeConfigId, "HWC returned no active config"); updateDisplayExtension(hwcDisplayId, *activeConfigId, isConnected); } +#if defined(QTI_UNIFIED_DRAW) && defined(UNIFIED_DRAW_EXT) + if (mDisplayExtnIntf && !isConnected && !isInternalDisplay) { + mDisplayExtnIntf->EndUnifiedDraw(hwcDisplayId); + } +#endif processDisplayChangesLocked(); } |