summaryrefslogtreecommitdiff
path: root/libs/ultrahdr/jpegencoderhelper.cpp
diff options
context:
space:
mode:
author Leon Scroggins III <scroggo@google.com> 2023-11-27 17:32:51 -0500
committer Leon Scroggins III <scroggo@google.com> 2023-11-28 14:29:08 -0500
commit792ea80280c156b738730db0289f66b6cfd7326a (patch)
tree6cedb0609fad49791fb4eaefb65f7b0bb6239796 /libs/ultrahdr/jpegencoderhelper.cpp
parent4cd9cb2c952946f2e41b74f4f9697e0d43452b98 (diff)
Do not startPeriodTransition for OFF displays
Inspired by discussion in Ida666af9a3a9b2e940c1f861ce3b765f67738f1f. resyncAllToHardwareVsync calls resyncToHardwareVsyncLocked for *all* physical displays, even if they are turned off. This can be seen in dumpsys - for example, on a two-display device on which only one display has turned on since boot, mPeriodConfirmationInProgress may be set to 1 (true) for the display that is off. Correct this by checking Scheduler's record of the display's PowerMode. Skip resyncToHardwareVsyncLocked if the display is OFF. (This matches Scheduler::onHardwareVsyncRequest's decision of whether to call the mSchedulerCallback's requestHardwareVsync.) This prevents attempting to start a period transition, as well as making hardware VSYNCs allowed. Bug: 255601557 Test: adb shell dumpsys SurfaceFlinger --vsync Test: atest libsurfaceflinger_unittest:SchedulerTest Change-Id: I88e7451622c259056d26748c64fcaa0bdcb836b8
Diffstat (limited to 'libs/ultrahdr/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions