Home
last modified time | relevance | path

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

1234

/frameworks/native/services/surfaceflinger/Scheduler/include/scheduler/
DFps.h39 class Fps {
41 constexpr Fps() = default;
43 static constexpr Fps fromValue(float frequency) { in fromValue()
44 return frequency > 0.f ? Fps(frequency, static_cast<nsecs_t>(1e9f / frequency)) : Fps(); in fromValue()
47 static constexpr Fps fromPeriodNsecs(nsecs_t period) { in fromPeriodNsecs()
48 return period > 0 ? Fps(1e9f / period, period) : Fps(); in fromPeriodNsecs()
60 constexpr Fps(float frequency, nsecs_t period) : mFrequency(frequency), mPeriod(period) {} in Fps() function
67 Fps min = Fps::fromValue(0.f);
68 Fps max = Fps::fromValue(std::numeric_limits<float>::max());
70 bool includes(Fps) const;
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/
DFpsOps.h25 inline bool operator==(Fps lhs, Fps rhs) {
29 inline bool operator<(Fps lhs, Fps rhs) {
33 inline bool operator!=(Fps lhs, Fps rhs) {
37 inline bool operator>(Fps lhs, Fps rhs) {
41 inline bool operator<=(Fps lhs, Fps rhs) {
45 inline bool operator>=(Fps lhs, Fps rhs) {
DVSyncPredictorTest.cpp74 const auto refreshRate = Fps::fromPeriodNsecs(period); in displayMode()
531 Fps::fromPeriodNsecs(divisor * mPeriod))) in TEST_F()
551 const auto renderRateFps = Fps::fromPeriodNsecs(mPeriod * 2); in TEST_F()
571 EXPECT_TRUE(tracker.isVSyncInPhase(mNow + 1 * mPeriod, Fps::fromPeriodNsecs(mPeriod * 2))); in TEST_F()
572 EXPECT_FALSE(tracker.isVSyncInPhase(mNow + 2 * mPeriod, Fps::fromPeriodNsecs(mPeriod * 2))); in TEST_F()
573 EXPECT_TRUE(tracker.isVSyncInPhase(mNow + 3 * mPeriod, Fps::fromPeriodNsecs(mPeriod * 2))); in TEST_F()
575 EXPECT_FALSE(tracker.isVSyncInPhase(mNow + 5 * mPeriod, Fps::fromPeriodNsecs(mPeriod * 4))); in TEST_F()
576 EXPECT_TRUE(tracker.isVSyncInPhase(mNow + 3 * mPeriod, Fps::fromPeriodNsecs(mPeriod * 4))); in TEST_F()
577 EXPECT_FALSE(tracker.isVSyncInPhase(mNow + 4 * mPeriod, Fps::fromPeriodNsecs(mPeriod * 4))); in TEST_F()
578 EXPECT_FALSE(tracker.isVSyncInPhase(mNow + 6 * mPeriod, Fps::fromPeriodNsecs(mPeriod * 4))); in TEST_F()
[all …]
DFpsTest.cpp27 EXPECT_FALSE(Fps().isValid()); in TEST()
33 EXPECT_FALSE(Fps::fromPeriodNsecs(0).isValid()); in TEST()
35 const Fps fps = Fps::fromPeriodNsecs(16'666'667); in TEST()
72 const auto fps = Fps::fromPeriodNsecs(16'666'665); in TEST()
DSurfaceFlinger_NotifyExpectedPresentTest.cpp122 static constexpr Fps kFps60Hz = 60_Hz;
123 static constexpr int32_t kFrameInterval5HzNs = static_cast<Fps>(5_Hz).getPeriodNsecs();
125 static constexpr int32_t kFrameInterval120HzNs = static_cast<Fps>(120_Hz).getPeriodNsecs();
127 Period::fromNs(static_cast<Fps>(240_Hz).getPeriodNsecs());
319 static constexpr Period kTimeoutNs = Period::fromNs(static_cast<Fps>(1_Hz).getPeriodNsecs()); in TEST_F()
323 Fps::fromValue(0))); in TEST_F()
324 static constexpr int32_t kFrameIntervalNs120Hz = static_cast<Fps>(120_Hz).getPeriodNsecs(); in TEST_F()
325 static constexpr int32_t kFrameIntervalNs96Hz = static_cast<Fps>(96_Hz).getPeriodNsecs(); in TEST_F()
326 static constexpr int32_t kFrameIntervalNs80Hz = static_cast<Fps>(80_Hz).getPeriodNsecs(); in TEST_F()
327 static constexpr int32_t kFrameIntervalNs60Hz = static_cast<Fps>(60_Hz).getPeriodNsecs(); in TEST_F()
[all …]
DSchedulerTest.cpp574 const auto refreshRate = Fps::fromPeriodNsecs(500); in TEST_F()
575 auto frameRate = Fps::fromPeriodNsecs(1000); in TEST_F()
602 EXPECT_EQ(Fps::fromPeriodNsecs(1000), in TEST_F()
605 EXPECT_EQ(Fps::fromPeriodNsecs(1000), in TEST_F()
611 EXPECT_EQ(Fps::fromPeriodNsecs(1000), in TEST_F()
615 frameRate = Fps::fromPeriodNsecs(2000); in TEST_F()
619 EXPECT_EQ(Fps::fromPeriodNsecs(2000), in TEST_F()
622 EXPECT_EQ(Fps::fromPeriodNsecs(2000), in TEST_F()
708 void frameRateTestScenario(Fps layerFps, int8_t frameRateCompatibility, Fps displayFps,
709 Fps expectedChoreographerFps);
[all …]
DLayerInfoTest.cpp42 static constexpr Fps LO_FPS = 30_Hz;
43 static constexpr Fps HI_FPS = 90_Hz;
51 void setLastRefreshRate(Fps fps) { in setLastRefreshRate()
88 ASSERT_EQ(kExpectedFps, Fps::fromPeriodNsecs(*averageFrameTime)); in TEST_F()
105 ASSERT_EQ(kExpectedFps, Fps::fromPeriodNsecs(*averageFrameTime)); in TEST_F()
167 ASSERT_EQ(kExpectedFps, Fps::fromPeriodNsecs(*averageFrameTime)); in TEST_F()
196 ASSERT_EQ(kExpectedFps, Fps::fromPeriodNsecs(*averageFrameTime)); in TEST_F()
/frameworks/native/services/surfaceflinger/Scheduler/
DVsyncConfiguration.h42 virtual VsyncConfigSet getConfigsForRefreshRate(Fps fps) const = 0;
45 virtual void setRefreshRateFps(Fps fps) = 0;
58 explicit VsyncConfiguration(Fps currentFps);
61 VsyncConfigSet getConfigsForRefreshRate(Fps fps) const override EXCLUDES(mLock);
77 void setRefreshRateFps(Fps fps) override EXCLUDES(mLock) { in setRefreshRateFps()
88 VsyncConfigSet getConfigsForRefreshRateLocked(Fps fps) const REQUIRES(mLock);
90 mutable ftl::SmallMap<Fps, VsyncConfigSet, 2, FpsApproxEqual> mOffsetsCache GUARDED_BY(mLock);
91 Fps mRefreshRateFps GUARDED_BY(mLock);
101 explicit PhaseOffsets(Fps currentRefreshRate);
105 PhaseOffsets(Fps currentRefreshRate, nsecs_t vsyncPhaseOffsetNs, nsecs_t sfVSyncPhaseOffsetNs,
[all …]
DRefreshRateSelector.h53 static constexpr Fps kMinSupportedFrameRate = 20_Hz;
173 Fps desiredRefreshRate;
249 Fps pacesetterFps;
260 Fps pacesetterFps = {}) const EXCLUDES(mLock);
271 void setActiveMode(DisplayModeId, Fps renderFrameRate) EXCLUDES(mLock);
277 Fps findClosestKnownFrameRate(Fps frameRate) const;
358 static int getFrameRateDivisor(Fps displayRefreshRate, Fps layerFrameRate);
362 static bool isFractionalPairOrMultiple(Fps, Fps);
364 using UidToFrameRateOverride = std::map<uid_t, Fps>;
368 Fps displayFrameRate, GlobalSignals) const
[all …]
DLayerInfo.h59 static constexpr Fps kMinFpsForFrequentLayer = 10_Hz;
72 Fps fps;
98 Fps rate;
109 FrameRateVote(Fps rate, FrameRateCompatibility type,
119 FrameRate(Fps rate, FrameRateCompatibility type,
157 static Seamlessness getSeamlessness(Fps rate, Seamlessness seamlessness) { in getSeamlessness()
198 mLayerVote = {mDefaultVote, Fps(), Seamlessness::Default, FrameRateCategory::Default}; in resetLayerVote()
222 Fps getFps(nsecs_t now) const;
253 Fps calculated;
255 Fps reported;
[all …]
DLayerHistory.h99 std::pair<Fps, Fps> getGameFrameRateOverride(uid_t uid) const EXCLUDES(mLock);
100 std::pair<Fps, Fps> getGameFrameRateOverrideLocked(uid_t uid) const REQUIRES(mLock);
161 std::map<uid_t, std::pair<Fps, Fps>> mGameFrameRateOverride GUARDED_BY(mLock);
DLayerInfo.cpp48 mLayerVote({defaultVote, Fps()}), in LayerInfo()
158 Fps LayerInfo::getFps(nsecs_t now) const { in getFps()
169 return Fps(); in getFps()
174 return Fps::fromPeriodNsecs(totalTime / (numFrames - 1)); in getFps()
273 std::optional<Fps> LayerInfo::calculateRefreshRateIfPossible(const RefreshRateSelector& selector, in calculateRefreshRateIfPossible()
283 const auto refreshRate = Fps::fromPeriodNsecs(*averageFrameTime); in calculateRefreshRateIfPossible()
323 votes.push_back({voteType, Fps(), Seamlessness::Default, mLayerVote.category, in getRefreshRateVote()
342 votes.push_back({LayerHistory::LayerVoteType::Max, Fps()}); in getRefreshRateVote()
350 votes.push_back({LayerHistory::LayerVoteType::Max, Fps()}); in getRefreshRateVote()
363 votes.push_back({LayerHistory::LayerVoteType::Min, Fps()}); in getRefreshRateVote()
[all …]
DLayerHistory.cpp432 mGameFrameRateOverride[uid].first = Fps::fromValue(frameRateOverride.frameRateHz); in updateGameModeFrameRateOverride()
437 mGameFrameRateOverride[uid].first = Fps(); in updateGameModeFrameRateOverride()
446 mGameFrameRateOverride[uid].second = Fps::fromValue(frameRateOverride.frameRateHz); in updateGameDefaultFrameRateOverride()
451 mGameFrameRateOverride[uid].second = Fps(); in updateGameDefaultFrameRateOverride()
456 std::pair<Fps, Fps> LayerHistory::getGameFrameRateOverride(uid_t uid) const { in getGameFrameRateOverride()
458 return std::pair<Fps, Fps>(); in getGameFrameRateOverride()
466 std::pair<Fps, Fps> LayerHistory::getGameFrameRateOverrideLocked(uid_t uid) const { in getGameFrameRateOverrideLocked()
468 return std::pair<Fps, Fps>(); in getGameFrameRateOverrideLocked()
474 return std::pair<Fps, Fps>(Fps(), Fps()); in getGameFrameRateOverrideLocked()
DVSyncPredictor.h67 bool isVSyncInPhase(nsecs_t timePoint, Fps frameRate) final EXCLUDES(mMutex);
78 void setRenderRate(Fps, bool applyImmediately) final EXCLUDES(mMutex);
99 VsyncTimeline(TimePoint knownVsync, Period idealPeriod, std::optional<Fps> renderRateOpt);
105 bool isVSyncInPhase(Model, nsecs_t vsync, Fps frameRate);
107 void setRenderRate(std::optional<Fps> renderRateOpt) { mRenderRateOpt = renderRateOpt; } in setRenderRate()
115 std::optional<Fps> mRenderRateOpt;
164 std::optional<Fps> mRenderRateOpt GUARDED_BY(mMutex);
DScheduler.h90 Fps activeRefreshRate, TimeStats&);
192 void updatePhaseConfiguration(Fps);
193 void resetPhaseConfiguration(Fps) REQUIRES(kMainThreadContext);
198 void setRenderRate(PhysicalDisplayId, Fps, bool applyImmediately);
269 bool isVsyncInPhase(TimePoint expectedVsyncTime, Fps frameRate) const;
311 std::optional<Fps> getFrameRateOverride(uid_t) const EXCLUDES(mDisplayLock);
317 Fps getPacesetterRefreshRate() const EXCLUDES(mDisplayLock) { in getPacesetterRefreshRate()
321 Fps getNextFrameInterval(PhysicalDisplayId, TimePoint currentExpectedPresentTime) const
329 bool updateFrameRateOverrides(GlobalSignals, Fps displayRefreshRate) EXCLUDES(mPolicyLock);
451 bool updateFrameRateOverridesLocked(GlobalSignals, Fps displayRefreshRate)
[all …]
DRefreshRateSelector.cpp69 std::vector<Fps> constructKnownFrameRates(const DisplayModes& modes) { in constructKnownFrameRates()
70 std::vector<Fps> knownFrameRates = {24_Hz, 30_Hz, 45_Hz, 60_Hz, 72_Hz}; in constructKnownFrameRates()
107 std::pair<unsigned, unsigned> divisorRange(Fps vsyncRate, Fps peakFps, FpsRange range, in divisorRange()
164 Fps fps; in createFrameRateModes()
220 const Fps existingModeFps = existingIter->second->second->getPeakFps(); in createFrameRateModes()
328 Fps refreshRate) const { in calculateNonExactMatchingLayerScoreLocked()
352 mFrameRatesThatFavorsAtLeast60.end(), [&](Fps fps) { in calculateNonExactMatchingLayerScoreLocked()
404 float RefreshRateSelector::calculateDistanceScoreLocked(Fps referenceRate, Fps refreshRate) const { in calculateDistanceScoreLocked()
413 float RefreshRateSelector::calculateDistanceScoreFromMaxLocked(Fps refreshRate) const { in calculateDistanceScoreFromMaxLocked()
418 float RefreshRateSelector::calculateLayerScoreLocked(const LayerRequirement& layer, Fps refreshRate, in calculateLayerScoreLocked()
[all …]
/frameworks/native/services/surfaceflinger/
DRefreshRateOverlay.h56 void changeRefreshRate(Fps, Fps);
57 void changeRenderRate(Fps);
74 const Buffers& getOrCreateBuffers(Fps, Fps, bool);
93 std::optional<Fps> mRefreshRate;
94 std::optional<Fps> mRenderFps;
DDisplayDevice.h192 void enableRefreshRateOverlay(bool enable, bool setByHwc, Fps refreshRate, Fps renderFps,
195 void updateRefreshRateOverlayRate(Fps refreshRate, Fps renderFps, bool setByHwc = false);
208 Fps getAdjustedRefreshRate() const { return mAdjustedRefreshRate; } in getAdjustedRefreshRate()
212 void adjustRefreshRate(Fps pacesetterDisplayRefreshRate);
246 const Fps mRequestedRefreshRate;
250 Fps mAdjustedRefreshRate = 0_Hz;
289 Fps requestedRefreshRate;
321 Fps requestedRefreshRate;
/frameworks/native/services/surfaceflinger/Display/
DDisplayModeController.h47 using ActiveModeListener = ftl::Function<void(PhysicalDisplayId, Fps vsyncRate, Fps renderFps)>;
94 void finalizeModeChange(PhysicalDisplayId, DisplayModeId, Fps vsyncRate, Fps renderFps)
97 void setActiveMode(PhysicalDisplayId, DisplayModeId, Fps vsyncRate, Fps renderFps)
128 void setActiveModeLocked(PhysicalDisplayId, DisplayModeId, Fps vsyncRate, Fps renderFps)
/frameworks/native/services/surfaceflinger/TimeStats/
DTimeStats.h97 Fps displayRefreshRate, std::optional<Fps> renderRate,
101 Fps displayRefreshRate, std::optional<Fps> renderRate,
116 Fps refreshRate;
117 std::optional<Fps> renderRate;
126 static bool isOptApproxEqual(std::optional<Fps> lhs, std::optional<Fps> rhs) { in isOptApproxEqual()
269 Fps displayRefreshRate, std::optional<Fps> renderRate, SetFrameRateVote,
272 const std::shared_ptr<FenceTime>& presentFence, Fps displayRefreshRate,
273 std::optional<Fps> renderRate, SetFrameRateVote, GameMode) override;
295 void flushAvailableRecordsToStatsLocked(int32_t layerId, Fps displayRefreshRate,
296 std::optional<Fps> renderRate, SetFrameRateVote,
/frameworks/native/services/surfaceflinger/FrameTimeline/
DFrameTimeline.h188 void setRenderRate(Fps renderRate);
190 Fps getRenderRate() const;
204 void onPresent(nsecs_t presentTime, int32_t displayFrameJankType, Fps refreshRate,
205 Fps displayFrameRenderRate, nsecs_t displayDeadlineDelta,
208 void onCommitNotComposited(Fps refreshRate, Fps displayFrameRenderRate);
239 void classifyJankLocked(int32_t displayFrameJankType, const Fps& refreshRate,
240 Fps displayFrameRenderRate, nsecs_t* outDeadlineDelta) REQUIRES(mMutex);
265 Fps mDisplayFrameRenderRate GUARDED_BY(mMutex);
267 std::optional<Fps> mRenderRate GUARDED_BY(mMutex);
313 virtual void setSfWakeUp(int64_t token, nsecs_t wakeupTime, Fps refreshRate,
[all …]
/frameworks/native/services/surfaceflinger/Scheduler/tests/
DFrameTargeterTest.cpp62 Duration frameDuration, Fps refreshRate, Fps peakRefreshRate, in Frame()
162 constexpr Fps kRefreshRate = 120_Hz; in TEST_F()
175 constexpr Fps kRefreshRate = 60_Hz; in TEST_F()
192 constexpr Fps kRefreshRate = 120_Hz; in TEST_F()
213 constexpr Fps kRefreshRate = 120_Hz; in TEST_F()
238 constexpr Fps kRefreshRate = 120_Hz; in TEST_F()
239 constexpr Fps kPeakRefreshRate = 240_Hz; in TEST_F()
263 constexpr Fps kRefreshRate = 120_Hz; in TEST_F()
264 constexpr Fps kPeakRefreshRate = 240_Hz; in TEST_F()
294 constexpr Fps kRefreshRate = 60_Hz; in TEST_F()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/mock/
DMockTimeStats.h49 (int32_t, uint64_t, nsecs_t, Fps, std::optional<Fps>, SetFrameRateVote, GameMode),
52 (int32_t, uint64_t, const std::shared_ptr<FenceTime>&, Fps, std::optional<Fps>,
/frameworks/native/services/surfaceflinger/tests/unittests/mock/DisplayHardware/
DMockDisplayMode.h24 DisplayModeId modeId, Fps displayRefreshRate, int32_t group = 0,
36 DisplayModeId modeId, Fps refreshRate, int32_t group = 0,
43 Fps refreshRate) { in createDisplayMode()
48 DisplayModeId modeId, Fps displayRefreshRate, std::optional<hal::VrrConfig> vrrConfig,
/frameworks/native/services/surfaceflinger/DisplayHardware/
DDisplayMode.h85 mDisplayMode->mVsyncRate = Fps::fromPeriodNsecs(vsyncPeriod); in setVsyncPeriod()
146 Fps getPeakFps() const { in getPeakFps()
148 ? Fps::fromPeriodNsecs(mVrrConfig->minFrameIntervalNs) in getPeakFps()
152 Fps getVsyncRate() const { return mVsyncRate; } in getVsyncRate()
178 Fps mVsyncRate;

1234