summaryrefslogtreecommitdiff
path: root/libs/gui/tests/EndToEndNativeInputTest.cpp
diff options
context:
space:
mode:
authorDominik Laskowski <domlaskowski@google.com>2019-11-21 11:14:45 -0800
committerDominik Laskowski <domlaskowski@google.com>2020-01-29 13:59:26 -0800
commit3cb3d4e3906eb43a01464e8862772295dab50f78 (patch)
treebcdf7a4b117cfa538d339c2d806c7e66178f6e1f /libs/gui/tests/EndToEndNativeInputTest.cpp
parent68d6b2f5a5cd7c749203519fbfd3ae796875657a (diff)
SF: Redesign API to query display information
The DisplayInfo list returned by ISurfaceComposer for display configs contains display information/state redundant across configs. Extract config information to DisplayConfig, and repurpose DisplayInfo for immutable information about a physical display. In a future CL, SF will populate DisplayInfo with additional data (e.g. connection type, EDID fields) on initial connection. DisplayConfigs retain the ability to reload on subsequent connections. Introduce ui::DisplayState for transactional state applicable to both physical and virtual displays. Bug: 144601064 Test: dumpsys display Change-Id: I72003e8ef71483ef483d0de85d28b859a6c9f5fc
Diffstat (limited to 'libs/gui/tests/EndToEndNativeInputTest.cpp')
-rw-r--r--libs/gui/tests/EndToEndNativeInputTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/gui/tests/EndToEndNativeInputTest.cpp b/libs/gui/tests/EndToEndNativeInputTest.cpp
index 04749e6d13..1a623e21dc 100644
--- a/libs/gui/tests/EndToEndNativeInputTest.cpp
+++ b/libs/gui/tests/EndToEndNativeInputTest.cpp
@@ -41,7 +41,7 @@
#include <input/InputTransport.h>
#include <input/Input.h>
-#include <ui/DisplayInfo.h>
+#include <ui/DisplayConfig.h>
#include <ui/Rect.h>
#include <ui/Region.h>
@@ -223,13 +223,13 @@ public:
const auto display = mComposerClient->getInternalDisplayToken();
ASSERT_NE(display, nullptr);
- DisplayInfo info;
- ASSERT_EQ(NO_ERROR, mComposerClient->getDisplayInfo(display, &info));
+ DisplayConfig config;
+ ASSERT_EQ(NO_ERROR, mComposerClient->getActiveDisplayConfig(display, &config));
// After a new buffer is queued, SurfaceFlinger is notified and will
// latch the new buffer on next vsync. Let's heuristically wait for 3
// vsyncs.
- mBufferPostDelay = int32_t(1e6 / info.fps) * 3;
+ mBufferPostDelay = static_cast<int32_t>(1e6 / config.refreshRate) * 3;
}
void TearDown() {