Change default value of mLayerLifecycleManagerEnabled to true
Force all unit tests to use new front end logic.
Flag: EXEMPT removing flagged code
Test: presubmit
Bug: 330785038
Change-Id: I2e38856debb3741684abbe8174fc1d720d1ac8ec
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index af504ca..b17fd49 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -1507,7 +1507,7 @@
bool mPowerHintSessionEnabled;
- bool mLayerLifecycleManagerEnabled = false;
+ bool mLayerLifecycleManagerEnabled = true;
// Whether a display should be turned on when initialized
bool mSkipPowerOnForQuiescent;
diff --git a/services/surfaceflinger/tests/unittests/CompositionTest.cpp b/services/surfaceflinger/tests/unittests/CompositionTest.cpp
index afbb455..23d3c16 100644
--- a/services/surfaceflinger/tests/unittests/CompositionTest.cpp
+++ b/services/surfaceflinger/tests/unittests/CompositionTest.cpp
@@ -114,7 +114,6 @@
mFlinger.setupComposer(std::unique_ptr<Hwc2::Composer>(mComposer));
mFlinger.setupPowerAdvisor(std::unique_ptr<Hwc2::PowerAdvisor>(mPowerAdvisor));
mFlinger.mutableMaxRenderTargetSize() = 16384;
- mFlinger.enableLayerLifecycleManager();
}
~CompositionTest() {
diff --git a/services/surfaceflinger/tests/unittests/SurfaceFlinger_ColorMatrixTest.cpp b/services/surfaceflinger/tests/unittests/SurfaceFlinger_ColorMatrixTest.cpp
index ff7612e..d638024 100644
--- a/services/surfaceflinger/tests/unittests/SurfaceFlinger_ColorMatrixTest.cpp
+++ b/services/surfaceflinger/tests/unittests/SurfaceFlinger_ColorMatrixTest.cpp
@@ -28,7 +28,6 @@
class ColorMatrixTest : public CommitAndCompositeTest {};
TEST_F(ColorMatrixTest, colorMatrixChanged) {
- mFlinger.enableLayerLifecycleManager();
EXPECT_COLOR_MATRIX_CHANGED(true, true);
mFlinger.mutableTransactionFlags() |= eTransactionNeeded;
@@ -46,7 +45,6 @@
}
TEST_F(ColorMatrixTest, colorMatrixChangedAfterDisplayTransaction) {
- mFlinger.enableLayerLifecycleManager();
EXPECT_COLOR_MATRIX_CHANGED(true, true);
mFlinger.mutableTransactionFlags() |= eTransactionNeeded;
diff --git a/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h b/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
index 216b66b..e3b2af1 100644
--- a/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
+++ b/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
@@ -733,10 +733,6 @@
return mFlinger->initTransactionTraceWriter();
}
- // Needed since mLayerLifecycleManagerEnabled is false by default and must
- // be enabled for tests to go through the new front end path.
- void enableLayerLifecycleManager() { mFlinger->mLayerLifecycleManagerEnabled = true; }
-
void notifyExpectedPresentIfRequired(PhysicalDisplayId displayId, Period vsyncPeriod,
TimePoint expectedPresentTime, Fps frameInterval,
std::optional<Period> timeoutOpt) {
diff --git a/services/surfaceflinger/tests/unittests/TransactionApplicationTest.cpp b/services/surfaceflinger/tests/unittests/TransactionApplicationTest.cpp
index 23c6842..e13fe49 100644
--- a/services/surfaceflinger/tests/unittests/TransactionApplicationTest.cpp
+++ b/services/surfaceflinger/tests/unittests/TransactionApplicationTest.cpp
@@ -58,7 +58,6 @@
mFlinger.setupMockScheduler();
mFlinger.setupRenderEngine(std::unique_ptr<renderengine::RenderEngine>(mRenderEngine));
mFlinger.flinger()->addTransactionReadyFilters();
- mFlinger.enableLayerLifecycleManager();
}
~TransactionApplicationTest() {