diff options
| author | 2023-03-03 11:07:50 -0500 | |
|---|---|---|
| committer | 2023-03-03 14:24:28 -0500 | |
| commit | aadc62d761cfda80a5aedab7643767292a7fcca9 (patch) | |
| tree | 5208e32a17f8d325c1730450b99c31fc22b9fea1 /libs/gui/LayerState.cpp | |
| parent | 1af0fb6ed00132a4f9c8f45eae420a7f552cd37a (diff) | |
Fix subtle bug in disableHardwareVsync
I54a1304a3428968134cc707b24d5b325927c31df introduced a bug in
disableHardwareVsync. If you pass false for `disallow`, it can switch
from the `Disallowed` state to the `Disabled` state, which is not
intended. Correct this by leaving the state unchanged if it's already
`Disallowed`.
Add tests. DisableDoesNotMakeAllowed catches the failure. While we're at
it, add a test that verifies that it disallows when it's intended to,
versions of the existing tests calling disableHardwareVsync that
pass true for `disallow`, and a test verifying that disable leaves it
allowed when passing `false`.
Bug: 241286146
Test: VsyncScheduleTest
Change-Id: I0036ba97b28bef64f9bae7c1c93f3c31e8733f48
Diffstat (limited to 'libs/gui/LayerState.cpp')
0 files changed, 0 insertions, 0 deletions