diff options
11 files changed, 78 insertions, 62 deletions
diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp index 4c9fb0655b..55be398bd0 100644 --- a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp +++ b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp @@ -666,7 +666,7 @@ void LayerSnapshotBuilder::updateFrameRateFromChildSnapshot(LayerSnapshot& snaps 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 dc8694c930..168267bb50 100644 --- a/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp +++ b/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp @@ -122,8 +122,7 @@ RequestedLayerState::RequestedLayerState(const LayerCreationArgs& args) 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 5890050caa..415f55ae66 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -1160,7 +1160,7 @@ bool Layer::setDefaultFrameRateCompatibility(FrameRateCompatibility compatibilit 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 40882f442c..78a3a7cd5c 100644 --- a/services/surfaceflinger/Layer.h +++ b/services/surfaceflinger/Layer.h @@ -111,7 +111,7 @@ public: }; 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 0000000000..405c982494 --- /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 6b5327aa64..b98b8007ac 100644 --- a/services/surfaceflinger/Scheduler/LayerHistory.cpp +++ b/services/surfaceflinger/Scheduler/LayerHistory.cpp @@ -76,12 +76,12 @@ void trace(const LayerInfo& info, LayerHistory::LayerVoteType type, int fps) { 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 875bdc84f5..dd96930a06 100644 --- a/services/surfaceflinger/Scheduler/LayerInfo.cpp +++ b/services/surfaceflinger/Scheduler/LayerInfo.cpp @@ -455,7 +455,7 @@ bool LayerInfo::RefreshRateHistory::isConsistent() const { 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 129b4c44d4..6286b285cf 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 @@ public: 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 7e3e61f6fb..cc7a45c78f 100644 --- a/services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp +++ b/services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp @@ -152,7 +152,7 @@ TEST_F(LayerHistoryTest, singleLayerNoVoteDefaultCompatibility) { 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 @@ TEST_F(LayerHistoryTest, singleLayerMinVoteDefaultCompatibility) { 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 1a9233d12c..69316bf4e5 100644 --- a/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp +++ b/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp @@ -315,14 +315,11 @@ TEST_F(LayerSnapshotTest, NoLayerVoteForParentWithChildVotes) { 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 @@ TEST_F(LayerSnapshotTest, framerate) { // 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 @@ TEST_F(LayerSnapshotTest, framerate) { // 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 @@ TEST_F(LayerSnapshotTest, framerate) { // 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 @@ TEST_F(LayerSnapshotTest, frameRateWithCategory) { // 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 @@ TEST_F(LayerSnapshotTest, frameRateWithCategory) { 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 @@ TEST_F(LayerSnapshotTest, frameRateWithCategory) { // 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 @@ TEST_F(LayerSnapshotTest, frameRateSelectionStrategy) { // 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 50e07fc92c..4cc78febee 100644 --- a/services/surfaceflinger/tests/unittests/mock/MockLayer.h +++ b/services/surfaceflinger/tests/unittests/mock/MockLayer.h @@ -25,7 +25,7 @@ public: 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 @@ public: 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()); }; |