summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp
diff options
context:
space:
mode:
authorDominik Laskowski <domlaskowski@google.com>2020-07-14 19:02:41 -0700
committerDominik Laskowski <domlaskowski@google.com>2020-08-03 15:58:27 -0700
commit8b01cc0b0bd9bb32e4802234147ceb493ceb9d0a (patch)
tree6ae834482af84ac65309a93b9e4b06db68cfc628 /services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp
parent60a04cae26687f12069f7b178a3036c828edd418 (diff)
SF: Remove EventControlThread
EventControlThread was a HWC workaround dating back to K for toggling VSYNC off the main thread, but as of R it defers back to main only to incur context switches. Clean up TestableScheduler construction to skip creating DispSync and timer threads, which fixes several gMock warnings of unexpected calls. Remove virtual destructors for non-polymorphic interfaces. Bug: 160012986 Test: systrace Test: libsurfaceflinger_unittest Change-Id: I01360016a7dba79dc905f250753e6fce34af0a90
Diffstat (limited to 'services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp')
-rw-r--r--services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp b/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp
index 0d6c799763..6c01f85fc7 100644
--- a/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp
+++ b/services/surfaceflinger/tests/unittests/SetFrameRateTest.cpp
@@ -33,7 +33,6 @@
#include "TestableSurfaceFlinger.h"
#include "mock/DisplayHardware/MockComposer.h"
#include "mock/MockDispSync.h"
-#include "mock/MockEventControlThread.h"
#include "mock/MockEventThread.h"
#include "mock/MockMessageQueue.h"
@@ -182,8 +181,7 @@ void SetFrameRateTest::setupScheduler() {
EXPECT_CALL(*primaryDispSync, getPeriod())
.WillRepeatedly(Return(FakeHwcDisplayInjector::DEFAULT_REFRESH_RATE));
EXPECT_CALL(*primaryDispSync, expectedPresentTime(_)).WillRepeatedly(Return(0));
- mFlinger.setupScheduler(std::move(primaryDispSync),
- std::make_unique<mock::EventControlThread>(), std::move(eventThread),
+ mFlinger.setupScheduler(std::move(primaryDispSync), std::move(eventThread),
std::move(sfEventThread));
}