summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Sarraf <asarraf@codeaurora.org>2021-11-08 12:03:19 -0800
committerRamakant Singh <ramakant@codeaurora.org>2021-11-26 14:23:36 +0000
commite8561aca56c869da74639459fc1a6acc3ff972c5 (patch)
treedf5b5a00934084079ff24b084854b4c5eb13f59d
parent449b4f121e9026e34d253492c866d4d1fff1e796 (diff)
sf: Call EndUnifiedDraw on external disconnect
Call EndUnifiedDraw on external disconnect for cleanup. Change-Id: Id9cef55c40a1ed69a519382432b4f825d7e42274 CRs-Fixed: 3076641
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 4aea4878e6..681d37fbb4 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3509,14 +3509,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();
}