diff options
author | Ady Abraham <adyabr@google.com> | 2019-11-13 18:56:40 -0800 |
---|---|---|
committer | Ady Abraham <adyabr@google.com> | 2019-12-05 17:15:53 -0800 |
commit | 2139f73d98f3f0d31f0f90bcca7f4537c66e5e70 (patch) | |
tree | 0f40676d9a6fda3fe18ce690a227611f53a0b5fd /services/surfaceflinger/tests/unittests/EventThreadTest.cpp | |
parent | fbbd4fe4a5b0e6167db3406b4078b6b2ea8d5f3c (diff) |
SurfaceFlinger: use config groups
Composer 2.4 adds a new attribute for configs groups. This change
groups configs according to their group and store them in
RefreshRateConfigs.
Test: rev up composer to 2.4 and test refresh rate switching
Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Test: adb shell /data/nativetest64/SurfaceFlinger_test/SurfaceFlinger_test
Bug: 141329414
Fixes: 139751853
Change-Id: Ic0bcd3da4bf6b73efa11a60c2594948ce030362f
Diffstat (limited to 'services/surfaceflinger/tests/unittests/EventThreadTest.cpp')
-rw-r--r-- | services/surfaceflinger/tests/unittests/EventThreadTest.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/services/surfaceflinger/tests/unittests/EventThreadTest.cpp b/services/surfaceflinger/tests/unittests/EventThreadTest.cpp index 2662f52581..80bca021ab 100644 --- a/services/surfaceflinger/tests/unittests/EventThreadTest.cpp +++ b/services/surfaceflinger/tests/unittests/EventThreadTest.cpp @@ -26,6 +26,7 @@ #include "AsyncCallRecorder.h" #include "Scheduler/EventThread.h" +#include "Scheduler/HwcStrongTypes.h" using namespace std::chrono_literals; using namespace std::placeholders; @@ -34,6 +35,7 @@ using testing::_; using testing::Invoke; namespace android { + namespace { constexpr PhysicalDisplayId INTERNAL_DISPLAY_ID = 111; @@ -448,17 +450,17 @@ TEST_F(EventThreadTest, postHotplugExternalConnect) { } TEST_F(EventThreadTest, postConfigChangedPrimary) { - mThread->onConfigChanged(INTERNAL_DISPLAY_ID, 7); + mThread->onConfigChanged(INTERNAL_DISPLAY_ID, HwcConfigIndexType(7)); expectConfigChangedEventReceivedByConnection(INTERNAL_DISPLAY_ID, 7); } TEST_F(EventThreadTest, postConfigChangedExternal) { - mThread->onConfigChanged(EXTERNAL_DISPLAY_ID, 5); + mThread->onConfigChanged(EXTERNAL_DISPLAY_ID, HwcConfigIndexType(5)); expectConfigChangedEventReceivedByConnection(EXTERNAL_DISPLAY_ID, 5); } TEST_F(EventThreadTest, postConfigChangedPrimary64bit) { - mThread->onConfigChanged(DISPLAY_ID_64BIT, 7); + mThread->onConfigChanged(DISPLAY_ID_64BIT, HwcConfigIndexType(7)); expectConfigChangedEventReceivedByConnection(DISPLAY_ID_64BIT, 7); } @@ -468,7 +470,7 @@ TEST_F(EventThreadTest, suppressConfigChanged) { createConnection(suppressConnectionEventRecorder, ISurfaceComposer::eConfigChangedSuppress); - mThread->onConfigChanged(INTERNAL_DISPLAY_ID, 9); + mThread->onConfigChanged(INTERNAL_DISPLAY_ID, HwcConfigIndexType(9)); expectConfigChangedEventReceivedByConnection(INTERNAL_DISPLAY_ID, 9); auto args = suppressConnectionEventRecorder.waitForCall(); |