@@ -426,8 +426,8 @@ void EventThread::onVsync(nsecs_t vsyncTime, nsecs_t wakeupTime, nsecs_t readyTi
426426
427427 LOG_FATAL_IF (!mVSyncState );
428428 mVsyncTracer = (mVsyncTracer + 1 ) % 2 ;
429- mPendingEvents .push_back (makeVSync (mVSyncState -> displayId , wakeupTime, ++ mVSyncState -> count ,
430- vsyncTime, readyTime));
429+ mPendingEvents .push_back (makeVSync (mVsyncSchedule -> getPhysicalDisplayId () , wakeupTime,
430+ ++ mVSyncState -> count , vsyncTime, readyTime));
431431 mCondition .notify_all ();
432432}
433433
@@ -486,9 +486,9 @@ void EventThread::threadMain(std::unique_lock<std::mutex>& lock) {
486486 if (event->header .type == DisplayEventReceiver::DISPLAY_EVENT_HOTPLUG) {
487487 if (event->hotplug .connectionError == 0 ) {
488488 if (event->hotplug .connected && !mVSyncState ) {
489- mVSyncState .emplace (event-> header . displayId );
490- } else if (!event->hotplug .connected && mVSyncState &&
491- mVSyncState -> displayId == event->header .displayId ) {
489+ mVSyncState .emplace ();
490+ } else if (!event->hotplug .connected &&
491+ mVsyncSchedule -> getPhysicalDisplayId () == event->header .displayId ) {
492492 mVSyncState .reset ();
493493 }
494494 } else {
@@ -559,7 +559,7 @@ void EventThread::threadMain(std::unique_lock<std::mutex>& lock) {
559559 const auto now = systemTime (SYSTEM_TIME_MONOTONIC);
560560 const auto deadlineTimestamp = now + timeout.count ();
561561 const auto expectedVSyncTime = deadlineTimestamp + timeout.count ();
562- mPendingEvents .push_back (makeVSync (mVSyncState -> displayId , now,
562+ mPendingEvents .push_back (makeVSync (mVsyncSchedule -> getPhysicalDisplayId () , now,
563563 ++mVSyncState ->count , expectedVSyncTime,
564564 deadlineTimestamp));
565565 }
@@ -739,7 +739,7 @@ void EventThread::dump(std::string& result) const {
739739 StringAppendF (&result, " %s: state=%s VSyncState=" , mThreadName , toCString (mState ));
740740 if (mVSyncState ) {
741741 StringAppendF (&result, " {displayId=%s, count=%u%s}\n " ,
742- to_string (mVSyncState -> displayId ).c_str (), mVSyncState ->count ,
742+ to_string (mVsyncSchedule -> getPhysicalDisplayId () ).c_str (), mVSyncState ->count ,
743743 mVSyncState ->synthetic ? " , synthetic" : " " );
744744 } else {
745745 StringAppendF (&result, " none\n " );
0 commit comments