From a524a098e9280897a965bae16efd27469ff01ea4 Mon Sep 17 00:00:00 2001 From: Marin Shalamanov Date: Mon, 27 Jul 2020 21:39:55 +0200 Subject: Use type safe display IDs. Use a type safe wrapper around uint64_t for display ids. We also modify the format of the EDID generated physical display IDs by setting bit 62 to 1, which will indicate that the display id is stable across reboot. Bug: 160679868 Test: m && flash device Test: take screnshot on device Test: atest surfaceflinger_unittest Change-Id: Ie2c7c2b737e0882fa4208c059caa85b7ded922b2 --- libs/gui/DisplayEventDispatcher.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libs/gui/DisplayEventDispatcher.cpp') diff --git a/libs/gui/DisplayEventDispatcher.cpp b/libs/gui/DisplayEventDispatcher.cpp index b33bc9e556..51fbb9748b 100644 --- a/libs/gui/DisplayEventDispatcher.cpp +++ b/libs/gui/DisplayEventDispatcher.cpp @@ -121,9 +121,8 @@ int DisplayEventDispatcher::handleEvent(int, int events, void*) { PhysicalDisplayId vsyncDisplayId; uint32_t vsyncCount; if (processPendingEvents(&vsyncTimestamp, &vsyncDisplayId, &vsyncCount)) { - ALOGV("dispatcher %p ~ Vsync pulse: timestamp=%" PRId64 - ", displayId=%" ANDROID_PHYSICAL_DISPLAY_ID_FORMAT ", count=%d", - this, ns2ms(vsyncTimestamp), vsyncDisplayId, vsyncCount); + ALOGV("dispatcher %p ~ Vsync pulse: timestamp=%" PRId64 ", displayId=%s, count=%d", this, + ns2ms(vsyncTimestamp), to_string(vsyncDisplayId).c_str(), vsyncCount); mWaitingForVsync = false; dispatchVsync(vsyncTimestamp, vsyncDisplayId, vsyncCount); } -- cgit v1.2.3-59-g8ed1b