diff options
| author | 2020-04-06 16:25:31 -0700 | |
|---|---|---|
| committer | 2020-04-06 16:25:31 -0700 | |
| commit | c43b88edd15b73dc46010d3fb303cbde76ff0eac (patch) | |
| tree | 1cce35b7b94fd477ebcc83cca5f8be079d1b210a | |
| parent | 2dbf7c97a39db33331c21fbd95d5cfea0947eadd (diff) | |
SurfaceFlinger: fix app duration by reducing 16.6ms
App durations are programmed incorrectly with an additional 16.6ms
to the value. This change doesn't have a real impact since the durations
are translated to the same offsets in SurfaceFlinger.
Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Bug: 153381686
Change-Id: Ic433bfef4dfc53130e51e50975e527466e159d22
| -rw-r--r-- | services/surfaceflinger/tests/unittests/PhaseOffsetsTest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/services/surfaceflinger/tests/unittests/PhaseOffsetsTest.cpp b/services/surfaceflinger/tests/unittests/PhaseOffsetsTest.cpp index 8d49201c61..ce5993a38f 100644 --- a/services/surfaceflinger/tests/unittests/PhaseOffsetsTest.cpp +++ b/services/surfaceflinger/tests/unittests/PhaseOffsetsTest.cpp @@ -45,8 +45,8 @@ public: class PhaseDurationTest : public testing::Test { protected: PhaseDurationTest() - : mPhaseDurations(60.0f, 10'500'000, 20'500'000, 16'000'000, 33'500'000, 13'500'000, - 38'000'000) {} + : mPhaseDurations(60.0f, 10'500'000, 20'500'000, 16'000'000, 16'500'000, 13'500'000, + 21'000'000) {} ~PhaseDurationTest() = default; @@ -69,11 +69,11 @@ TEST_F(PhaseDurationTest, getOffsetsForRefreshRate_60Hz) { EXPECT_EQ(offsets.early.sf, 666'667); - EXPECT_EQ(offsets.early.app, 500'001); + EXPECT_EQ(offsets.early.app, 833'334); EXPECT_EQ(offsets.earlyGl.sf, 3'166'667); - EXPECT_EQ(offsets.earlyGl.app, 15'166'668); + EXPECT_EQ(offsets.earlyGl.app, 15'500'001); } TEST_F(PhaseDurationTest, getOffsetsForRefreshRate_90Hz) { @@ -88,11 +88,11 @@ TEST_F(PhaseDurationTest, getOffsetsForRefreshRate_90Hz) { EXPECT_EQ(offsets.early.sf, -4'888'889); - EXPECT_EQ(offsets.early.app, 6'055'555); + EXPECT_EQ(offsets.early.app, 833'333); EXPECT_EQ(offsets.earlyGl.sf, -2'388'889); - EXPECT_EQ(offsets.earlyGl.app, 4'055'555); + EXPECT_EQ(offsets.earlyGl.app, 9'944'444); } TEST_F(PhaseDurationTest, getOffsetsForRefreshRate_DefaultOffsets) { @@ -134,11 +134,11 @@ TEST_F(PhaseDurationTest, getOffsetsForRefreshRate_unknownRefreshRate) { EXPECT_EQ(offsets.early.sf, 52'027'208); - EXPECT_EQ(offsets.early.app, 18'527'208); + EXPECT_EQ(offsets.early.app, 35'527'208); EXPECT_EQ(offsets.earlyGl.sf, 54'527'208); - EXPECT_EQ(offsets.earlyGl.app, 16'527'208); + EXPECT_EQ(offsets.earlyGl.app, 33'527'208); } } // namespace |