SF: Use consistent names for display IDs
There are two types of display IDs: hwc2_display_t for HWC IDs, and
int32_t for SF IDs. The latter are confusingly referred to as "hwcId".
This CL renames them to "hwcDisplayId" and "displayId", respectively.
Note that int32_t will be replaced by DisplayId in a follow-up CL.
Bug: 74619554
Test: Build
Change-Id: Ia9b621d385c2bf842a2093b578140dc7a2eaea69
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 9f1e714..cd0635a 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -435,7 +435,7 @@
ATRACE_CALL();
Mutex::Autolock _l(mDisplayLock);
- auto displayId = display.getHwcDisplayId();
+ const auto displayId = display.getId();
if (displayId == DisplayDevice::DISPLAY_ID_INVALID) {
ALOGV("Skipping HWComposer prepare for non-HWC display");
return NO_ERROR;
@@ -723,11 +723,11 @@
++mRemainingHwcVirtualDisplays;
}
- auto hwcId = displayData.hwcDisplay->getId();
- mHwcDisplaySlots.erase(hwcId);
+ const auto hwcDisplayId = displayData.hwcDisplay->getId();
+ mHwcDisplaySlots.erase(hwcDisplayId);
displayData.reset();
- mHwcDevice->destroyDisplay(hwcId);
+ mHwcDevice->destroyDisplay(hwcDisplayId);
}
status_t HWComposer::setOutputBuffer(int32_t displayId,