diff options
author | Marin Shalamanov <shalamanov@google.com> | 2020-12-29 20:35:13 +0100 |
---|---|---|
committer | Marin Shalamanov <shalamanov@google.com> | 2021-01-29 18:00:27 +0100 |
commit | a903d03540b9ad9a8c36c3d73ead9aed58dc716a (patch) | |
tree | 4c4562b7e37cda1c334c5c112067d65d9f14d096 /services/surfaceflinger/tests/unittests/SurfaceFlinger_SetPowerModeInternalTest.cpp | |
parent | 1c3cd7709e55c5f04817cf4d86214878ac3ff8f3 (diff) |
SF: Query display modes only once during display creation / update
Currently HWComposer::getActiveMode / getModes is called multiple
times when creating or updating a display. This is unnecessary
and risky because the getActiveMode may return a different value
if a hotplug event has ocured in between.
In this CL we call getActiveMode and getModes only once and propagate
the values using DisplayDeviceState.
Bug: 159590486
Test: presubmit
Change-Id: I97418163426a0ae19f79bc2912a7d725c953ad01
Diffstat (limited to 'services/surfaceflinger/tests/unittests/SurfaceFlinger_SetPowerModeInternalTest.cpp')
-rw-r--r-- | services/surfaceflinger/tests/unittests/SurfaceFlinger_SetPowerModeInternalTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/tests/unittests/SurfaceFlinger_SetPowerModeInternalTest.cpp b/services/surfaceflinger/tests/unittests/SurfaceFlinger_SetPowerModeInternalTest.cpp index 2117628ec3..65024202b8 100644 --- a/services/surfaceflinger/tests/unittests/SurfaceFlinger_SetPowerModeInternalTest.cpp +++ b/services/surfaceflinger/tests/unittests/SurfaceFlinger_SetPowerModeInternalTest.cpp @@ -105,7 +105,7 @@ struct EventThreadIsSupportedVariant : public EventThreadBaseSupportedVariant { struct DispSyncIsSupportedVariant { static void setupResetModelCallExpectations(DisplayTransactionTest* test) { - EXPECT_CALL(*test->mVsyncController, startPeriodTransition(DEFAULT_REFRESH_RATE)).Times(1); + EXPECT_CALL(*test->mVsyncController, startPeriodTransition(DEFAULT_VSYNC_PERIOD)).Times(1); EXPECT_CALL(*test->mVSyncTracker, resetModel()).Times(1); } }; |