summaryrefslogtreecommitdiff
path: root/libs/jpegrecoverymap/jpegencoderhelper.cpp
diff options
context:
space:
mode:
author Leon Scroggins III <scroggo@google.com> 2023-02-07 16:40:21 -0500
committer Leon Scroggins III <scroggo@google.com> 2023-02-10 13:40:59 -0500
commitc275df4a90960863e30d028c7ea5d163635b134f (patch)
tree03700c9c8ce48708a576ff3f3fcd12472f66a804 /libs/jpegrecoverymap/jpegencoderhelper.cpp
parentc3cea29f1fb80e8c7412a8b75ec0d814d7f84bed (diff)
Move HwVsyncState into VsyncSchedule
In preparation for having a separate schedule per display, pull state which is logically for a single display into VsyncSchedule. This should be a pure refactor. Consolidate mPrimaryHWVsyncEnabled and mHWVsyncAvailable (now in VsyncSchedule) into a single enum which better captures the possible states. Move SF's record of the pending HWC VSYNC state into the same place, so it sits with other related logic. Remove the last HWC VSYNC state, which did not affect behavior. Move ISchedulerCallback into its own file, so that VsyncSchedule.cpp doesn't need to depend on Scheduler.h. Rename variables `makeUnavailable` and `makeAvailable` for clarity. Make addResyncSample return a boolean, instead of void with an out parameter. Remove VsyncSchedule's move constructor. Now that it has a mutex, it is no longer thread-safe. We don't actually need to move it anyway. Replace std::optional with std::unique_ptr for owning a VsyncSchedule. Factored out of If60218e85292c786b9fa70ecb33ee374d3a385e0. Relevant differences from that patch: - There is still only one VsyncSchedule. - When SF turns off a display, we still disable vsync on that display. In If60218e85292c786b9fa70ecb33ee374d3a385e0, this was redundant with the call to disableHardwareVsync shortly before it, but right now we only call disableHardwareVsync for the active display. - Hold the VSYNC lock for more time in resyncToHaredwareVsync. This better matches the original behavior. - Remove mLastHwVsyncState. - Recreate the code for storing and setting the pending VSYNC state. - Inline setVsyncPeriod at its only call-site. Bug: 255601557 Bug: 256196556 Bug: 241286146 Fixes: 266712910 Test: libsurfaceflinger_unittest Change-Id: I54a1304a3428968134cc707b24d5b325927c31df
Diffstat (limited to 'libs/jpegrecoverymap/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions