Home
last modified time | relevance | path

Searched refs:Fps (Results 1 – 25 of 46) sorted by relevance

12

/frameworks/native/services/surfaceflinger/tests/unittests/
DFpsTest.cpp25 Fps fpsDefault; in TEST()
28 Fps fps1(60.0f); in TEST()
30 Fps fps2 = Fps::fromPeriodNsecs(static_cast<nsecs_t>(1e9f / 60.0f)); in TEST()
37 const Fps::EqualsInBuckets equalsInBuckets; in TEST()
38 const Fps::EqualsWithMargin equalsWithMargin; in TEST()
40 EXPECT_TRUE(Fps(60.0f).equalsWithMargin(Fps(60.f))); in TEST()
41 EXPECT_TRUE(Fps(60.0f).equalsWithMargin(Fps(60.f - kEpsilon))); in TEST()
42 EXPECT_TRUE(Fps(60.0f).equalsWithMargin(Fps(60.f + kEpsilon))); in TEST()
44 EXPECT_TRUE(equalsInBuckets(Fps(60.0f), Fps(60.0f))); in TEST()
45 EXPECT_TRUE(equalsInBuckets(Fps(60.0f), Fps(60.0f - kEpsilon))); in TEST()
[all …]
DRefreshRateConfigsTest.cpp58 Fps findClosestKnownFrameRate(const RefreshRateConfigs& refreshRateConfigs, Fps frameRate) { in findClosestKnownFrameRate()
62 std::vector<Fps> getKnownFrameRate(const RefreshRateConfigs& refreshRateConfigs) { in getKnownFrameRate()
104 DisplayModePtr mConfig60 = createDisplayMode(HWC_CONFIG_ID_60, 0, Fps(60.0f).getPeriodNsecs());
105 DisplayModePtr mConfig90 = createDisplayMode(HWC_CONFIG_ID_90, 0, Fps(90.0f).getPeriodNsecs());
107 createDisplayMode(HWC_CONFIG_ID_90, 1, Fps(90.0f).getPeriodNsecs());
109 createDisplayMode(HWC_CONFIG_ID_90, 0, Fps(90.0f).getPeriodNsecs(), ui::Size(111, 222));
110 DisplayModePtr mConfig72 = createDisplayMode(HWC_CONFIG_ID_72, 0, Fps(72.0f).getPeriodNsecs());
112 createDisplayMode(HWC_CONFIG_ID_72, 1, Fps(72.0f).getPeriodNsecs());
114 createDisplayMode(HWC_CONFIG_ID_120, 0, Fps(120.0f).getPeriodNsecs());
116 createDisplayMode(HWC_CONFIG_ID_120, 1, Fps(120.0f).getPeriodNsecs());
[all …]
DLayerInfoTest.cpp36 void setLastRefreshRate(Fps fps) { in setLastRefreshRate()
50 constexpr auto kExpectedFps = Fps(50.0f); in TEST_F()
61 const auto averageFps = Fps::fromPeriodNsecs(*averageFrameTime); in TEST_F()
68 constexpr auto kExpectedFps = Fps(50.0f); in TEST_F()
77 setLastRefreshRate(Fps(20.0f)); // Set to some valid value in TEST_F()
80 const auto averageFps = Fps::fromPeriodNsecs(*averageFrameTime); in TEST_F()
87 const auto period = Fps(50.0f).getPeriodNsecs(); in TEST_F()
127 constexpr auto kExpectedFps = Fps(50.0f); in TEST_F()
129 constexpr auto kSmallPeriod = Fps(250.0f).getPeriodNsecs(); in TEST_F()
144 const auto averageFps = Fps::fromPeriodNsecs(*averageFrameTime); in TEST_F()
[all …]
DVsyncConfigurationTest.cpp35 TestableWorkDuration(Fps currentFps, nsecs_t sfDuration, nsecs_t appDuration, in TestableWorkDuration()
47 : mWorkDuration(Fps(60.0f), 10'500'000, 20'500'000, 16'000'000, 16'500'000, 13'500'000, in WorkDurationTest()
59 mWorkDuration.setRefreshRateFps(Fps(60.0f)); in TEST_F()
61 auto offsets = mWorkDuration.getConfigsForRefreshRate(Fps(60.0f)); in TEST_F()
84 mWorkDuration.setRefreshRateFps(Fps(90.0f)); in TEST_F()
86 auto offsets = mWorkDuration.getConfigsForRefreshRate(Fps(90.0f)); in TEST_F()
109 TestableWorkDuration phaseOffsetsWithDefaultValues(Fps(60.0f), -1, -1, -1, -1, -1, -1, 0); in TEST_F()
133 const auto testForRefreshRate = [&](Fps refreshRate) { in TEST_F()
141 testForRefreshRate(Fps(90.0f)); in TEST_F()
142 testForRefreshRate(Fps(60.0f)); in TEST_F()
[all …]
DLayerHistoryTest.cpp52 static constexpr Fps LO_FPS{30.f};
55 static constexpr Fps HI_FPS{90.f};
97 void recordFramesAndExpect(const sp<mock::MockLayer>& layer, nsecs_t& time, Fps frameRate, in recordFramesAndExpect()
98 Fps desiredRefreshRate, int numFrames) { in recordFramesAndExpect()
299 Return(Layer::FrameRate(Fps(73.4f), Layer::FrameRateCompatibility::Default))); in TEST_F()
312 EXPECT_TRUE(Fps(73.4f).equalsWithMargin(history().summarize(time)[0].desiredRefreshRate)); in TEST_F()
321 EXPECT_TRUE(Fps(73.4f).equalsWithMargin(history().summarize(time)[0].desiredRefreshRate)); in TEST_F()
331 Layer::FrameRate(Fps(73.4f), Layer::FrameRateCompatibility::ExactOrMultiple))); in TEST_F()
345 EXPECT_TRUE(Fps(73.4f).equalsWithMargin(history().summarize(time)[0].desiredRefreshRate)); in TEST_F()
355 EXPECT_TRUE(Fps(73.4f).equalsWithMargin(history().summarize(time)[0].desiredRefreshRate)); in TEST_F()
[all …]
DSchedulerTest.cpp56 .setVsyncPeriod(Fps(60.f).getPeriodNsecs())
61 .setVsyncPeriod(Fps(120.f).getPeriodNsecs())
214 EXPECT_EQ(1, mFlinger.calculateMaxAcquiredBufferCount(Fps(60), 30ms)); in TEST_F()
215 EXPECT_EQ(2, mFlinger.calculateMaxAcquiredBufferCount(Fps(90), 30ms)); in TEST_F()
216 EXPECT_EQ(3, mFlinger.calculateMaxAcquiredBufferCount(Fps(120), 30ms)); in TEST_F()
218 EXPECT_EQ(2, mFlinger.calculateMaxAcquiredBufferCount(Fps(60), 40ms)); in TEST_F()
220 EXPECT_EQ(1, mFlinger.calculateMaxAcquiredBufferCount(Fps(60), 10ms)); in TEST_F()
224 return arg.getFps().equalsWithMargin(Fps(120.f));
DFrameTimelineTest.cpp257 mFrameTimeline->setSfWakeUp(token1, 20, Fps::fromPeriodNsecs(11)); in TEST_F()
287 mFrameTimeline->setSfWakeUp(sfToken1, 22, Fps::fromPeriodNsecs(11)); in TEST_F()
330 mFrameTimeline->setSfWakeUp(sfToken, 22 + frameTimeFactor, Fps::fromPeriodNsecs(11)); in TEST_F()
352 mFrameTimeline->setSfWakeUp(sfToken, 22 + frameTimeFactor, Fps::fromPeriodNsecs(11)); in TEST_F()
395 mFrameTimeline->setSfWakeUp(sfToken, 22, Fps::fromPeriodNsecs(11)); in TEST_F()
412 mFrameTimeline->setSfWakeUp(sfToken, 22, Fps::fromPeriodNsecs(11)); in TEST_F()
429 mFrameTimeline->setSfWakeUp(sfToken, 22, Fps::fromPeriodNsecs(11)); in TEST_F()
438 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F()
466 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F()
486 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F()
[all …]
DFakeVsyncConfiguration.h29 VsyncConfigSet getConfigsForRefreshRate(Fps) const override { return getCurrentConfigs(); } in getConfigsForRefreshRate()
42 void setRefreshRateFps(Fps) override {} in setRefreshRateFps()
DSetFrameRateTest.cpp111 const FrameRate FRAME_RATE_VOTE1 = FrameRate(Fps(67.f), FrameRateCompatibility::Default);
113 FrameRate(Fps(14.f), FrameRateCompatibility::ExactOrMultiple);
114 const FrameRate FRAME_RATE_VOTE3 = FrameRate(Fps(99.f), FrameRateCompatibility::NoVote);
115 const FrameRate FRAME_RATE_TREE = FrameRate(Fps(0.f), FrameRateCompatibility::NoVote);
116 const FrameRate FRAME_RATE_NO_VOTE = FrameRate(Fps(0.f), FrameRateCompatibility::Default);
/frameworks/native/services/surfaceflinger/
DFps.h31 class Fps {
33 static constexpr Fps fromPeriodNsecs(nsecs_t period) { return Fps(1e9f / period, period); } in fromPeriodNsecs()
35 Fps() = default;
36 explicit constexpr Fps(float fps) in Fps() function
43 bool equalsWithMargin(const Fps& other) const { return std::abs(fps - other.fps) < kMargin; } in equalsWithMargin()
46 bool lessThanWithMargin(const Fps& other) const { return fps + kMargin < other.fps; } in lessThanWithMargin()
48 bool greaterThanWithMargin(const Fps& other) const { return fps > other.fps + kMargin; } in greaterThanWithMargin()
50 bool lessThanOrEqualWithMargin(const Fps& other) const { return !greaterThanWithMargin(other); } in lessThanOrEqualWithMargin()
52 bool greaterThanOrEqualWithMargin(const Fps& other) const { return !lessThanWithMargin(other); } in greaterThanOrEqualWithMargin()
60 inline static bool comparesLess(const Fps& left, const Fps& right) { in comparesLess()
[all …]
/frameworks/native/services/surfaceflinger/Scheduler/
DVsyncConfiguration.h43 virtual VsyncConfigSet getConfigsForRefreshRate(Fps fps) const = 0;
46 virtual void setRefreshRateFps(Fps fps) = 0;
59 explicit VsyncConfiguration(Fps currentFps);
62 VsyncConfigSet getConfigsForRefreshRate(Fps fps) const override EXCLUDES(mLock);
78 void setRefreshRateFps(Fps fps) override EXCLUDES(mLock) { in setRefreshRateFps()
89 VsyncConfigSet getConfigsForRefreshRateLocked(Fps fps) const REQUIRES(mLock);
91 mutable std::unordered_map<Fps, VsyncConfigSet, std::hash<Fps>, Fps::EqualsInBuckets>
93 std::atomic<Fps> mRefreshRateFps GUARDED_BY(mLock);
103 explicit PhaseOffsets(Fps currentRefreshRate);
107 PhaseOffsets(Fps currentRefreshRate, nsecs_t vsyncPhaseOffsetNs, nsecs_t sfVSyncPhaseOffsetNs,
[all …]
DLayerInfo.h54 static constexpr Fps kMinFpsForFrequentLayer{10.0f};
65 Fps fps{0.0f};
88 Fps rate;
96 FrameRate(Fps rate, FrameRateCompatibility type,
113 static Seamlessness getSeamlessness(Fps rate, Seamlessness seamlessness) { in getSeamlessness()
158 void resetLayerVote() { mLayerVote = {mDefaultVote, Fps(0.0f), Seamlessness::Default}; } in resetLayerVote()
208 Fps calculated{0.0f};
210 Fps reported{0.0f};
229 bool add(Fps refreshRate, nsecs_t now);
236 Fps refreshRate{0.0f};
[all …]
DRefreshRateConfigs.h67 RefreshRate(DisplayModeId modeId, DisplayModePtr mode, Fps fps, ConstructorTag) in RefreshRate()
74 Fps getFps() const { return fps; } in getFps()
78 bool inPolicy(Fps minRefreshRate, Fps maxRefreshRate) const { in inPolicy()
105 const Fps fps{0.0f};
112 Fps min{0.0f};
113 Fps max{std::numeric_limits<float>::max()};
228 Fps desiredRefreshRate{0.0f};
274 std::optional<Fps> onKernelTimerChanged(std::optional<DisplayModeId> desiredActiveModeId,
303 Fps findClosestKnownFrameRate(Fps frameRate) const;
343 static int getFrameRateDivider(Fps displayFrameRate, Fps layerFrameRate);
[all …]
DRefreshRateStats.h43 RefreshRateStats(TimeStats& timeStats, Fps currentRefreshRate, in RefreshRateStats()
60 void setRefreshRate(Fps currRefreshRate) { in setRefreshRate()
138 Fps mCurrentRefreshRate;
141 std::unordered_map<Fps, int64_t /* duration in ms */, std::hash<Fps>, Fps::EqualsInBuckets>
DRefreshRateConfigs.cpp43 std::vector<Fps> constructKnownFrameRates(const DisplayModes& modes) { in constructKnownFrameRates()
44 std::vector<Fps> knownFrameRates = {Fps(24.0f), Fps(30.0f), Fps(45.0f), Fps(60.0f), Fps(72.0f)}; in constructKnownFrameRates()
49 const auto refreshRate = Fps::fromPeriodNsecs(mode->getVsyncPeriod()); in constructKnownFrameRates()
54 std::sort(knownFrameRates.begin(), knownFrameRates.end(), Fps::comparesLess); in constructKnownFrameRates()
56 Fps::EqualsWithMargin()), in constructKnownFrameRates()
117 Fps(mConfig.frameRateMultipleThreshold)) && in isVoteAllowed()
119 Fps(mConfig.frameRateMultipleThreshold / 2))) { in isVoteAllowed()
519 const std::vector<LayerRequirement>& layers, Fps displayFrameRate, bool touch) const { in getFrameRateOverrides()
603 std::optional<Fps> RefreshRateConfigs::onKernelTimerChanged( in onKernelTimerChanged()
835 [&](Fps min, Fps max, const char* listName, in constructAvailableRefreshRates()
[all …]
DLayerInfo.cpp45 mLayerVote({defaultVote, Fps(0.0f)}), in LayerInfo()
99 return Fps::fromPeriodNsecs(totalTime / (numFrames - 1)) in isFrequent()
187 std::optional<Fps> LayerInfo::calculateRefreshRateIfPossible(nsecs_t now) { in calculateRefreshRateIfPossible()
196 const auto refreshRate = Fps::fromPeriodNsecs(*averageFrameTime); in calculateRefreshRateIfPossible()
232 return {LayerHistory::LayerVoteType::Max, Fps(0.0f)}; in getRefreshRateVote()
240 return {LayerHistory::LayerVoteType::Min, Fps(0.0f)}; in getRefreshRateVote()
257 return {LayerHistory::LayerVoteType::Max, Fps(0.0f)}; in getRefreshRateVote()
283 bool LayerInfo::RefreshRateHistory::add(Fps refreshRate, nsecs_t now) { in add()
DVsyncConfiguration.cpp43 VsyncConfiguration::VsyncConfiguration(Fps currentFps) : mRefreshRateFps(currentFps) {} in VsyncConfiguration()
45 PhaseOffsets::VsyncConfigSet VsyncConfiguration::getConfigsForRefreshRate(Fps fps) const { in getConfigsForRefreshRate()
50 PhaseOffsets::VsyncConfigSet VsyncConfiguration::getConfigsForRefreshRateLocked(Fps fps) const { in getConfigsForRefreshRateLocked()
90 PhaseOffsets::PhaseOffsets(Fps currentRefreshRate) in PhaseOffsets()
112 PhaseOffsets::PhaseOffsets(Fps currentFps, nsecs_t vsyncPhaseOffsetNs, nsecs_t sfVSyncPhaseOffsetNs, in PhaseOffsets()
356 WorkDuration::WorkDuration(Fps currentRefreshRate) in WorkDuration()
367 WorkDuration::WorkDuration(Fps currentRefreshRate, nsecs_t sfDuration, nsecs_t appDuration, in WorkDuration()
DVSyncTracker.h78 virtual bool isVSyncInPhase(nsecs_t timePoint, Fps frameRate) const = 0;
DScheduler.cpp207 std::optional<Fps> Scheduler::getFrameRateOverride(uid_t uid) const { in getFrameRateOverride()
216 return std::make_optional<Fps>(iter->second); in getFrameRateOverride()
223 return std::make_optional<Fps>(iter->second); in getFrameRateOverride()
692 constexpr Fps FPS_THRESHOLD_FOR_KERNEL_TIMER{65.0f}; in kernelIdleTimerCallback()
768 scheduler::RefreshRateConfigs::GlobalSignals consideredSignals, Fps displayRefreshRate) { in updateFrameRateOverrides()
781 [](const std::pair<uid_t, Fps>& a, const std::pair<uid_t, Fps>& b) { in updateFrameRateOverrides()
906 mFrameRateOverridesFromBackdoor[frameRateOverride.uid] = Fps(frameRateOverride.frameRateHz); in setPreferredRefreshRateForUid()
/frameworks/native/services/surfaceflinger/TimeStats/
DTimeStats.h103 Fps displayRefreshRate, std::optional<Fps> renderRate,
107 Fps displayRefreshRate, std::optional<Fps> renderRate,
122 Fps refreshRate;
123 std::optional<Fps> renderRate;
133 return Fps::EqualsInBuckets{}(refreshRate, o.refreshRate) &&
136 Fps::EqualsInBuckets{}(*renderRate, *o.renderRate))) &&
257 Fps displayRefreshRate, std::optional<Fps> renderRate,
260 const std::shared_ptr<FenceTime>& presentFence, Fps displayRefreshRate,
261 std::optional<Fps> renderRate, SetFrameRateVote frameRateVote,
282 void flushAvailableRecordsToStatsLocked(int32_t layerId, Fps displayRefreshRate,
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/mock/
DMockTimeStats.h52 void(int32_t, uint64_t, nsecs_t, Fps, std::optional<Fps>, SetFrameRateVote,
55 void(int32_t, uint64_t, const std::shared_ptr<FenceTime>&, Fps, std::optional<Fps>,
DMockVSyncTracker.h36 MOCK_CONST_METHOD2(isVSyncInPhase, bool(nsecs_t, Fps));
DMockFrameTimeline.h34 MOCK_METHOD3(setSfWakeUp, void(int64_t, nsecs_t, Fps));
/frameworks/native/services/surfaceflinger/FrameTimeline/
DFrameTimeline.h177 void setRenderRate(Fps renderRate);
191 void onPresent(nsecs_t presentTime, int32_t displayFrameJankType, Fps refreshRate,
222 void classifyJankLocked(int32_t displayFrameJankType, const Fps& refreshRate,
246 std::optional<Fps> mRenderRate GUARDED_BY(mMutex);
292 virtual void setSfWakeUp(int64_t token, nsecs_t wakeupTime, Fps refreshRate) = 0;
367 void onSfWakeUp(int64_t token, Fps refreshRate, std::optional<TimelineItem> predictions,
429 Fps mRefreshRate;
446 void setSfWakeUp(int64_t token, nsecs_t wakeupTime, Fps refreshRate) override;
/frameworks/native/services/surfaceflinger/DisplayHardware/
DDisplayMode.h68 mDisplayMode->mFps = Fps::fromPeriodNsecs(vsyncPeriod); in setVsyncPeriod()
119 Fps getFps() const { return mFps; } in getFps()
142 Fps mFps;

12