Pull out FrameRateCompatibility definition to avoid circular dependencies

Test: presubmit
Bug: 300701739
Change-Id: I7a1cc64a786fca5a7a273522dc4735439b44fd13
diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
index 4c9fb06..55be398 100644
--- a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
+++ b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
@@ -666,7 +666,7 @@
         return;
     }
 
-    using FrameRateCompatibility = scheduler::LayerInfo::FrameRateCompatibility;
+    using FrameRateCompatibility = scheduler::FrameRateCompatibility;
     if (snapshot.frameRate.isValid()) {
         // we already have a valid framerate.
         return;
diff --git a/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp b/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp
index fcc1e61..a4c7852 100644
--- a/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp
+++ b/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp
@@ -122,8 +122,7 @@
     isTrustedOverlay = false;
     dropInputMode = gui::DropInputMode::NONE;
     dimmingEnabled = true;
-    defaultFrameRateCompatibility =
-            static_cast<int8_t>(scheduler::LayerInfo::FrameRateCompatibility::Default);
+    defaultFrameRateCompatibility = static_cast<int8_t>(scheduler::FrameRateCompatibility::Default);
     frameRateCategory = static_cast<int8_t>(FrameRateCategory::Default);
     frameRateSelectionStrategy =
             static_cast<int8_t>(scheduler::LayerInfo::FrameRateSelectionStrategy::Self);
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 31b5e28..cbed0e7 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1160,7 +1160,7 @@
     return true;
 }
 
-scheduler::LayerInfo::FrameRateCompatibility Layer::getDefaultFrameRateCompatibility() const {
+scheduler::FrameRateCompatibility Layer::getDefaultFrameRateCompatibility() const {
     return mDrawingState.defaultFrameRateCompatibility;
 }
 
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index d5e2185..dbde96f 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -111,7 +111,7 @@
     };
 
     using FrameRate = scheduler::LayerInfo::FrameRate;
-    using FrameRateCompatibility = scheduler::LayerInfo::FrameRateCompatibility;
+    using FrameRateCompatibility = scheduler::FrameRateCompatibility;
     using FrameRateSelectionStrategy = scheduler::LayerInfo::FrameRateSelectionStrategy;
 
     struct State {
diff --git a/services/surfaceflinger/Scheduler/FrameRateCompatibility.h b/services/surfaceflinger/Scheduler/FrameRateCompatibility.h
new file mode 100644
index 0000000..405c982
--- /dev/null
+++ b/services/surfaceflinger/Scheduler/FrameRateCompatibility.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+namespace android::scheduler {
+// FrameRateCompatibility specifies how we should interpret the frame rate associated with
+// the layer.
+enum class FrameRateCompatibility {
+    Default, // Layer didn't specify any specific handling strategy
+
+    Min, // Layer needs the minimum frame rate.
+
+    Exact, // Layer needs the exact frame rate.
+
+    ExactOrMultiple, // Layer needs the exact frame rate (or a multiple of it) to present the
+                     // content properly. Any other value will result in a pull down.
+
+    NoVote, // Layer doesn't have any requirements for the refresh rate and
+            // should not be considered when the display refresh rate is determined.
+
+    ftl_last = NoVote
+};
+
+} // namespace android::scheduler
diff --git a/services/surfaceflinger/Scheduler/LayerHistory.cpp b/services/surfaceflinger/Scheduler/LayerHistory.cpp
index 6b5327a..b98b800 100644
--- a/services/surfaceflinger/Scheduler/LayerHistory.cpp
+++ b/services/surfaceflinger/Scheduler/LayerHistory.cpp
@@ -76,12 +76,12 @@
     ALOGD("%s: %s @ %d Hz", __FUNCTION__, info.getName().c_str(), fps);
 }
 
-LayerHistory::LayerVoteType getVoteType(LayerInfo::FrameRateCompatibility compatibility,
+LayerHistory::LayerVoteType getVoteType(FrameRateCompatibility compatibility,
                                         bool contentDetectionEnabled) {
     LayerHistory::LayerVoteType voteType;
-    if (!contentDetectionEnabled || compatibility == LayerInfo::FrameRateCompatibility::NoVote) {
+    if (!contentDetectionEnabled || compatibility == FrameRateCompatibility::NoVote) {
         voteType = LayerHistory::LayerVoteType::NoVote;
-    } else if (compatibility == LayerInfo::FrameRateCompatibility::Min) {
+    } else if (compatibility == FrameRateCompatibility::Min) {
         voteType = LayerHistory::LayerVoteType::Min;
     } else {
         voteType = LayerHistory::LayerVoteType::Heuristic;
diff --git a/services/surfaceflinger/Scheduler/LayerInfo.cpp b/services/surfaceflinger/Scheduler/LayerInfo.cpp
index 875bdc8..dd96930 100644
--- a/services/surfaceflinger/Scheduler/LayerInfo.cpp
+++ b/services/surfaceflinger/Scheduler/LayerInfo.cpp
@@ -455,7 +455,7 @@
     return consistent;
 }
 
-LayerInfo::FrameRateCompatibility LayerInfo::FrameRate::convertCompatibility(int8_t compatibility) {
+FrameRateCompatibility LayerInfo::FrameRate::convertCompatibility(int8_t compatibility) {
     switch (compatibility) {
         case ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_DEFAULT:
             return FrameRateCompatibility::Default;
diff --git a/services/surfaceflinger/Scheduler/LayerInfo.h b/services/surfaceflinger/Scheduler/LayerInfo.h
index 129b4c4..6286b28 100644
--- a/services/surfaceflinger/Scheduler/LayerInfo.h
+++ b/services/surfaceflinger/Scheduler/LayerInfo.h
@@ -28,6 +28,7 @@
 #include <scheduler/Fps.h>
 #include <scheduler/Seamlessness.h>
 
+#include "FrameRateCompatibility.h"
 #include "LayerHistory.h"
 #include "RefreshRateSelector.h"
 
@@ -78,24 +79,6 @@
 
     using RefreshRateVotes = ftl::SmallVector<LayerInfo::LayerVote, 2>;
 
-    // FrameRateCompatibility specifies how we should interpret the frame rate associated with
-    // the layer.
-    enum class FrameRateCompatibility {
-        Default, // Layer didn't specify any specific handling strategy
-
-        Min, // Layer needs the minimum frame rate.
-
-        Exact, // Layer needs the exact frame rate.
-
-        ExactOrMultiple, // Layer needs the exact frame rate (or a multiple of it) to present the
-                         // content properly. Any other value will result in a pull down.
-
-        NoVote, // Layer doesn't have any requirements for the refresh rate and
-                // should not be considered when the display refresh rate is determined.
-
-        ftl_last = NoVote
-    };
-
     enum class FrameRateSelectionStrategy {
         Self,
         OverrideChildren,
diff --git a/services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp b/services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp
index 7e3e61f..cc7a45c 100644
--- a/services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp
+++ b/services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp
@@ -152,7 +152,7 @@
     EXPECT_CALL(*layer, isVisible()).WillRepeatedly(Return(true));
     EXPECT_CALL(*layer, getFrameRateForLayerTree()).WillRepeatedly(Return(Layer::FrameRate()));
     EXPECT_CALL(*layer, getDefaultFrameRateCompatibility())
-            .WillOnce(Return(LayerInfo::FrameRateCompatibility::NoVote));
+            .WillOnce(Return(FrameRateCompatibility::NoVote));
 
     EXPECT_EQ(1, layerCount());
     EXPECT_EQ(0, activeLayerCount());
@@ -176,7 +176,7 @@
     EXPECT_CALL(*layer, isVisible()).WillRepeatedly(Return(true));
     EXPECT_CALL(*layer, getFrameRateForLayerTree()).WillRepeatedly(Return(Layer::FrameRate()));
     EXPECT_CALL(*layer, getDefaultFrameRateCompatibility())
-            .WillOnce(Return(LayerInfo::FrameRateCompatibility::Min));
+            .WillOnce(Return(FrameRateCompatibility::Min));
 
     EXPECT_EQ(1, layerCount());
     EXPECT_EQ(0, activeLayerCount());
diff --git a/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp b/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
index 1a9233d..69316bf 100644
--- a/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
+++ b/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
@@ -315,14 +315,11 @@
     UPDATE_AND_VERIFY(mSnapshotBuilder, STARTING_ZORDER);
 
     EXPECT_EQ(getSnapshot(11)->frameRate.vote.rate.getIntValue(), 90);
-    EXPECT_EQ(getSnapshot(11)->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Exact);
+    EXPECT_EQ(getSnapshot(11)->frameRate.vote.type, scheduler::FrameRateCompatibility::Exact);
     EXPECT_EQ(getSnapshot(111)->frameRate.vote.rate.getIntValue(), 90);
-    EXPECT_EQ(getSnapshot(111)->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Exact);
+    EXPECT_EQ(getSnapshot(111)->frameRate.vote.type, scheduler::FrameRateCompatibility::Exact);
     EXPECT_EQ(getSnapshot(1)->frameRate.vote.rate.getIntValue(), 0);
-    EXPECT_EQ(getSnapshot(1)->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::NoVote);
+    EXPECT_EQ(getSnapshot(1)->frameRate.vote.type, scheduler::FrameRateCompatibility::NoVote);
 }
 
 TEST_F(LayerSnapshotTest, CanCropTouchableRegion) {
@@ -550,20 +547,20 @@
     // verify parent is gets no vote
     EXPECT_FALSE(getSnapshot({.id = 1})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 1})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::NoVote);
+              scheduler::FrameRateCompatibility::NoVote);
     EXPECT_TRUE(getSnapshot({.id = 1})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     // verify layer and children get the requested votes
     EXPECT_TRUE(getSnapshot({.id = 11})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 11})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 11})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
     EXPECT_TRUE(getSnapshot({.id = 11})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     EXPECT_TRUE(getSnapshot({.id = 111})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 111})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 111})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
     EXPECT_TRUE(getSnapshot({.id = 111})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     // reparent and verify the child gets the new parent's framerate
@@ -574,23 +571,23 @@
     // verify parent is gets no vote
     EXPECT_FALSE(getSnapshot({.id = 1})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 1})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::NoVote);
+              scheduler::FrameRateCompatibility::NoVote);
 
     // verify layer and children get the requested votes
     EXPECT_TRUE(getSnapshot({.id = 11})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 11})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 11})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
 
     EXPECT_TRUE(getSnapshot({.id = 111})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 111})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 111})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
 
     EXPECT_TRUE(getSnapshot({.id = 122})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 122})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 122})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
     EXPECT_TRUE(getSnapshot({.id = 122})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     // reparent and verify the new parent gets no vote
@@ -601,30 +598,30 @@
     // verify old parent has invalid framerate (default)
     EXPECT_FALSE(getSnapshot({.id = 1})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 1})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
     EXPECT_TRUE(getSnapshot({.id = 1})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     // verify new parent get no vote
     EXPECT_FALSE(getSnapshot({.id = 2})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 2})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::NoVote);
+              scheduler::FrameRateCompatibility::NoVote);
     EXPECT_TRUE(getSnapshot({.id = 2})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     // verify layer and children get the requested votes (unchanged)
     EXPECT_TRUE(getSnapshot({.id = 11})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 11})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 11})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
 
     EXPECT_TRUE(getSnapshot({.id = 111})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 111})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 111})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
 
     EXPECT_TRUE(getSnapshot({.id = 122})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 122})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 122})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
 }
 
 TEST_F(LayerSnapshotTest, translateDataspace) {
@@ -653,33 +650,33 @@
     // verify parent 1 gets no vote
     EXPECT_FALSE(getSnapshot({.id = 1})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 1})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::NoVote);
+              scheduler::FrameRateCompatibility::NoVote);
     EXPECT_TRUE(getSnapshot({.id = 1})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     // verify layer 11 and children 111 get the requested votes
     EXPECT_TRUE(getSnapshot({.id = 11})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 11})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 11})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
     EXPECT_TRUE(getSnapshot({.id = 11})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     EXPECT_TRUE(getSnapshot({.id = 111})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 111})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 111})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
     EXPECT_TRUE(getSnapshot({.id = 111})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     // verify parent 12 gets no vote
     EXPECT_FALSE(getSnapshot({.id = 12})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 12})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::NoVote);
+              scheduler::FrameRateCompatibility::NoVote);
     EXPECT_TRUE(getSnapshot({.id = 12})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     // verify layer 122 and children 1221 get the requested votes
     EXPECT_FALSE(getSnapshot({.id = 122})->frameRate.vote.rate.isValid());
     EXPECT_TRUE(getSnapshot({.id = 122})->frameRate.isValid());
     EXPECT_EQ(getSnapshot({.id = 122})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
     EXPECT_EQ(getSnapshot({.id = 122})->frameRate.category, FrameRateCategory::Normal);
     EXPECT_TRUE(getSnapshot({.id = 122})->changes.test(RequestedLayerState::Changes::FrameRate));
     EXPECT_TRUE(
@@ -688,7 +685,7 @@
     EXPECT_FALSE(getSnapshot({.id = 1221})->frameRate.vote.rate.isValid());
     EXPECT_TRUE(getSnapshot({.id = 1221})->frameRate.isValid());
     EXPECT_EQ(getSnapshot({.id = 1221})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
     EXPECT_EQ(getSnapshot({.id = 1221})->frameRate.category, FrameRateCategory::Normal);
     EXPECT_TRUE(getSnapshot({.id = 1221})->changes.test(RequestedLayerState::Changes::FrameRate));
     EXPECT_TRUE(
@@ -713,32 +710,32 @@
     // verify parent is gets no vote
     EXPECT_FALSE(getSnapshot({.id = 1})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 1})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::NoVote);
+              scheduler::FrameRateCompatibility::NoVote);
 
     // verify layer 11 and children 111 get the requested votes
     EXPECT_TRUE(getSnapshot({.id = 11})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 11})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 11})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
 
     EXPECT_TRUE(getSnapshot({.id = 111})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 111})->frameRate.vote.rate.getValue(), 244.f);
     EXPECT_EQ(getSnapshot({.id = 111})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
 
     // verify layer 122 and children 1221 get the requested category vote (unchanged from
     // reparenting)
     EXPECT_FALSE(getSnapshot({.id = 122})->frameRate.vote.rate.isValid());
     EXPECT_TRUE(getSnapshot({.id = 122})->frameRate.isValid());
     EXPECT_EQ(getSnapshot({.id = 122})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
     EXPECT_EQ(getSnapshot({.id = 122})->frameRate.category, FrameRateCategory::Normal);
     EXPECT_TRUE(getSnapshot({.id = 122})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     EXPECT_FALSE(getSnapshot({.id = 1221})->frameRate.vote.rate.isValid());
     EXPECT_TRUE(getSnapshot({.id = 1221})->frameRate.isValid());
     EXPECT_EQ(getSnapshot({.id = 1221})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::Default);
+              scheduler::FrameRateCompatibility::Default);
     EXPECT_EQ(getSnapshot({.id = 1221})->frameRate.category, FrameRateCategory::Normal);
     EXPECT_TRUE(getSnapshot({.id = 1221})->changes.test(RequestedLayerState::Changes::FrameRate));
 }
@@ -762,7 +759,7 @@
     // verify parent 1 gets no vote
     EXPECT_FALSE(getSnapshot({.id = 1})->frameRate.vote.rate.isValid());
     EXPECT_EQ(getSnapshot({.id = 1})->frameRate.vote.type,
-              scheduler::LayerInfo::FrameRateCompatibility::NoVote);
+              scheduler::FrameRateCompatibility::NoVote);
     EXPECT_TRUE(getSnapshot({.id = 1})->changes.test(RequestedLayerState::Changes::FrameRate));
 
     // verify layer 12 and all descendants (121, 122, 1221) get the requested vote
diff --git a/services/surfaceflinger/tests/unittests/mock/MockLayer.h b/services/surfaceflinger/tests/unittests/mock/MockLayer.h
index 50e07fc..4cc78fe 100644
--- a/services/surfaceflinger/tests/unittests/mock/MockLayer.h
+++ b/services/surfaceflinger/tests/unittests/mock/MockLayer.h
@@ -25,7 +25,7 @@
     MockLayer(SurfaceFlinger* flinger, std::string name)
           : Layer(LayerCreationArgs(flinger, nullptr, std::move(name), 0, {})) {
         EXPECT_CALL(*this, getDefaultFrameRateCompatibility())
-                .WillOnce(testing::Return(scheduler::LayerInfo::FrameRateCompatibility::Default));
+                .WillOnce(testing::Return(scheduler::FrameRateCompatibility::Default));
     }
     explicit MockLayer(SurfaceFlinger* flinger) : MockLayer(flinger, "TestLayer") {}
 
@@ -34,8 +34,7 @@
     MOCK_CONST_METHOD0(isVisible, bool());
     MOCK_METHOD1(createClone, sp<Layer>(uint32_t));
     MOCK_CONST_METHOD0(getFrameRateForLayerTree, FrameRate());
-    MOCK_CONST_METHOD0(getDefaultFrameRateCompatibility,
-                       scheduler::LayerInfo::FrameRateCompatibility());
+    MOCK_CONST_METHOD0(getDefaultFrameRateCompatibility, scheduler::FrameRateCompatibility());
     MOCK_CONST_METHOD0(getOwnerUid, uid_t());
     MOCK_CONST_METHOD0(getDataSpace, ui::Dataspace());
 };