summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-build-prod@system.gserviceaccount.com>2021-11-26 16:48:47 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-11-26 16:48:47 +0000
commiteb009cc2f3337df458237a923472f4463baf49bd (patch)
tree7c0a52325af534dc47cf5d3e870d331c8b78d1dc
parentf1f87d6a4f222fe0166f3420e7dfa61f012859a2 (diff)
parente8561aca56c869da74639459fc1a6acc3ff972c5 (diff)
Merge "sf: Call EndUnifiedDraw on external disconnect" into s-keystone-qcom-dev
-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 47ae4dec6e..23e33d197b 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3519,14 +3519,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();
}