SurfaceFlinger: remove ISurfaceComposer::eEarlyWakeup
This flag is deprecated.
Test: build
Bug: 159125966
Change-Id: I7422ba741a25c2247097cd4530dd84da50f02fe1
diff --git a/services/surfaceflinger/Scheduler/VsyncModulator.cpp b/services/surfaceflinger/Scheduler/VsyncModulator.cpp
index 1f821be..1e16cf6 100644
--- a/services/surfaceflinger/Scheduler/VsyncModulator.cpp
+++ b/services/surfaceflinger/Scheduler/VsyncModulator.cpp
@@ -57,7 +57,6 @@
ALOGW_IF(!mExplicitEarlyWakeup, "%s: Unexpected EarlyEnd", __FUNCTION__);
mExplicitEarlyWakeup = false;
break;
- case Schedule::Early:
case Schedule::Late:
// No change to mExplicitEarlyWakeup for non-explicit states.
break;
@@ -67,7 +66,7 @@
ATRACE_INT("mExplicitEarlyWakeup", mExplicitEarlyWakeup);
}
- if (!mExplicitEarlyWakeup && (schedule == Schedule::Early || schedule == Schedule::EarlyEnd)) {
+ if (!mExplicitEarlyWakeup && schedule == Schedule::EarlyEnd) {
mEarlyTransactionFrames = MIN_EARLY_TRANSACTION_FRAMES;
mEarlyTransactionStartTime = mNow();
}
diff --git a/services/surfaceflinger/Scheduler/VsyncModulator.h b/services/surfaceflinger/Scheduler/VsyncModulator.h
index 355a14a..f02680b 100644
--- a/services/surfaceflinger/Scheduler/VsyncModulator.h
+++ b/services/surfaceflinger/Scheduler/VsyncModulator.h
@@ -30,7 +30,6 @@
// fixed number of frames, respectively.
enum class TransactionSchedule {
Late, // Default.
- Early, // Deprecated.
EarlyStart,
EarlyEnd
};
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 7d75657..73554df 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3474,7 +3474,6 @@
ATRACE_INT("TransactionQueue", mTransactionQueue.size());
const auto schedule = [](uint32_t flags) {
- if (flags & eEarlyWakeup) return TransactionSchedule::Early;
if (flags & eExplicitEarlyWakeupEnd) return TransactionSchedule::EarlyEnd;
if (flags & eExplicitEarlyWakeupStart) return TransactionSchedule::EarlyStart;
return TransactionSchedule::Late;
@@ -3528,11 +3527,6 @@
permissions |= Permission::ROTATE_SURFACE_FLINGER;
}
- // TODO(b/159125966): Remove eEarlyWakeup completely as no client should use this flag
- if (flags & eEarlyWakeup) {
- ALOGW("eEarlyWakeup is deprecated. Use eExplicitEarlyWakeup[Start|End]");
- }
-
if (!(permissions & Permission::ACCESS_SURFACE_FLINGER) &&
(flags & (eExplicitEarlyWakeupStart | eExplicitEarlyWakeupEnd))) {
ALOGE("Only WindowManager is allowed to use eExplicitEarlyWakeup[Start|End] flags");
diff --git a/services/surfaceflinger/tests/unittests/VsyncModulatorTest.cpp b/services/surfaceflinger/tests/unittests/VsyncModulatorTest.cpp
index 106da81..17648d5 100644
--- a/services/surfaceflinger/tests/unittests/VsyncModulatorTest.cpp
+++ b/services/surfaceflinger/tests/unittests/VsyncModulatorTest.cpp
@@ -101,24 +101,6 @@
CHECK_REFRESH(1, kLate, kLate);
}
-TEST_F(VsyncModulatorTest, EarlyStartWithEarly) {
- EXPECT_EQ(kEarly, mVsyncModulator.setTransactionSchedule(Schedule::EarlyStart));
-
- CHECK_COMMIT(kEarly, kEarly);
- CHECK_REFRESH(5 * MIN_EARLY_TRANSACTION_FRAMES, std::nullopt, kEarly);
-
- EXPECT_EQ(kEarly, mVsyncModulator.setTransactionSchedule(Schedule::Early));
-
- CHECK_COMMIT(kEarly, kEarly);
- CHECK_REFRESH(5 * MIN_EARLY_TRANSACTION_FRAMES, std::nullopt, kEarly);
-
- EXPECT_EQ(kEarly, mVsyncModulator.setTransactionSchedule(Schedule::EarlyEnd));
-
- CHECK_COMMIT(kEarly, kEarly);
- CHECK_REFRESH(MIN_EARLY_TRANSACTION_FRAMES - 1, kEarly, kEarly);
- CHECK_REFRESH(1, kLate, kLate);
-}
-
TEST_F(VsyncModulatorTest, EarlyStartWithMoreTransactions) {
EXPECT_EQ(kEarly, mVsyncModulator.setTransactionSchedule(Schedule::EarlyStart));