Home
last modified time | relevance | path

Searched refs:refreshRate (Results 1 – 25 of 56) sorted by relevance

123

/frameworks/native/services/surfaceflinger/Scheduler/
DLayerInfo.cpp199 const auto refreshRate = Fps::fromPeriodNsecs(*averageFrameTime); in calculateRefreshRateIfPossible() local
200 const bool refreshRateConsistent = mRefreshRateHistory.add(refreshRate, now); in calculateRefreshRateIfPossible()
202 const auto knownRefreshRate = refreshRateConfigs.findClosestKnownFrameRate(refreshRate); in calculateRefreshRateIfPossible()
206 if (std::abs(mLastRefreshRate.calculated.getValue() - refreshRate.getValue()) > in calculateRefreshRateIfPossible()
209 mLastRefreshRate.calculated = refreshRate; in calculateRefreshRateIfPossible()
214 to_string(refreshRate).c_str(), to_string(mLastRefreshRate.reported).c_str()); in calculateRefreshRateIfPossible()
217 to_string(refreshRate).c_str(), to_string(mLastRefreshRate.reported).c_str()); in calculateRefreshRateIfPossible()
253 auto refreshRate = calculateRefreshRateIfPossible(refreshRateConfigs, now); in getRefreshRateVote() local
254 if (refreshRate.has_value()) { in getRefreshRateVote()
255 ALOGV("%s calculated refresh rate: %s", mName.c_str(), to_string(*refreshRate).c_str()); in getRefreshRateVote()
[all …]
DScheduler.cpp174 const Fps refreshRate = holdRefreshRateConfigs()->getActiveMode()->getFps(); in makeGetVsyncPeriodFunction() local
176 mVsyncSchedule->getTracker().currentPeriod() ?: refreshRate.getPeriodNsecs(); in makeGetVsyncPeriodFunction()
183 const auto divisor = RefreshRateConfigs::getFrameRateDivisor(refreshRate, *frameRate); in makeGetVsyncPeriodFunction()
428 void Scheduler::resyncToHardwareVsync(bool makeAvailable, Fps refreshRate) { in resyncToHardwareVsync() argument
440 setVsyncPeriod(refreshRate.getPeriodNsecs()); in resyncToHardwareVsync()
450 const auto refreshRate = [&] { in resync() local
454 resyncToHardwareVsync(false, refreshRate); in resync()
583 const Fps refreshRate = [&] { in kernelIdleTimerCallback() local
591 if (state == TimerState::Reset && refreshRate > FPS_THRESHOLD_FOR_KERNEL_TIMER) { in kernelIdleTimerCallback()
595 resyncToHardwareVsync(true /* makeAvailable */, refreshRate); in kernelIdleTimerCallback()
[all …]
DRefreshRateConfigs.cpp159 Fps refreshRate) const { in calculateNonExactMatchingLayerScoreLocked()
162 const auto displayPeriod = refreshRate.getPeriodNsecs(); in calculateNonExactMatchingLayerScoreLocked()
185 if (isFractionalPairOrMultiple(refreshRate, layer.desiredRefreshRate)) { in calculateNonExactMatchingLayerScoreLocked()
220 float RefreshRateConfigs::calculateLayerScoreLocked(const LayerRequirement& layer, Fps refreshRate, in calculateLayerScoreLocked() argument
229 const auto ratio = refreshRate.getValue() / maxRefreshRate->getFps().getValue(); in calculateLayerScoreLocked()
235 const int divisor = getFrameRateDivisor(refreshRate, layer.desiredRefreshRate); in calculateLayerScoreLocked()
248 if (getFrameRateDivisor(refreshRate, layer.desiredRefreshRate) > 0) { in calculateLayerScoreLocked()
256 return calculateNonExactMatchingLayerScoreLocked(layer, refreshRate) * seamlessness * in calculateLayerScoreLocked()
/frameworks/native/services/surfaceflinger/tests/
DDisplayConfigs_test.cpp88 modes[i].refreshRate, in TEST_F()
89 modes[i].refreshRate, in TEST_F()
90 modes[i].refreshRate, in TEST_F()
91 modes[i].refreshRate); in TEST_F()
109 ASSERT_EQ(primaryRefreshRateMin, modes[i].refreshRate); in TEST_F()
110 ASSERT_EQ(primaryRefreshRateMax, modes[i].refreshRate); in TEST_F()
111 ASSERT_EQ(appRequestRefreshRateMin, modes[i].refreshRate); in TEST_F()
112 ASSERT_EQ(appRequestRefreshRateMax, modes[i].refreshRate); in TEST_F()
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenrecord/
DScreenMediaRecorder.java142 int refreshRate = (int) wm.getDefaultDisplay().getRefreshRate(); in prepare() local
143 int[] dimens = getSupportedSize(metrics.widthPixels, metrics.heightPixels, refreshRate); in prepare()
146 refreshRate = dimens[2]; in prepare()
147 int vidBitRate = width * height * refreshRate / VIDEO_FRAME_RATE in prepare()
154 mMediaRecorder.setVideoFrameRate(refreshRate); in prepare()
208 private int[] getSupportedSize(final int screenWidth, final int screenHeight, int refreshRate) in getSupportedSize() argument
237 if (maxRate < refreshRate) { in getSupportedSize()
238 refreshRate = maxRate; in getSupportedSize()
240 Log.d(TAG, "Screen size supported at rate " + refreshRate); in getSupportedSize()
241 return new int[]{screenWidthAligned, screenHeightAligned, refreshRate}; in getSupportedSize()
[all …]
/frameworks/base/services/core/java/com/android/server/display/
DDisplayAdapter.java122 public static Display.Mode createMode(int width, int height, float refreshRate) { in createMode() argument
123 return createMode(width, height, refreshRate, new float[0]); in createMode()
126 public static Display.Mode createMode(int width, int height, float refreshRate, in createMode() argument
128 return new Display.Mode(NEXT_DISPLAY_MODE_ID.getAndIncrement(), width, height, refreshRate, in createMode()
DDisplayModeDirector.java479 final float refreshRate = mode.getRefreshRate(); in filterModes() local
483 if (refreshRate < (summary.minRefreshRate - FLOAT_TOLERANCE) in filterModes()
484 || refreshRate > (summary.maxRefreshRate + FLOAT_TOLERANCE)) { in filterModes()
490 + ", modeRefreshRate=" + refreshRate); in filterModes()
1225 public void setDefaultRefreshRate(float refreshRate) { in setDefaultRefreshRate() argument
1227 mDefaultRefreshRate = refreshRate; in setDefaultRefreshRate()
1893 public void onDeviceConfigRefreshRateInLowZoneChanged(int refreshRate) { in onDeviceConfigRefreshRateInLowZoneChanged() argument
1894 if (refreshRate == -1) { in onDeviceConfigRefreshRateInLowZoneChanged()
1902 } else if (refreshRate != mRefreshRateInLowZone) { in onDeviceConfigRefreshRateInLowZoneChanged()
1903 mRefreshRateInLowZone = refreshRate; in onDeviceConfigRefreshRateInLowZoneChanged()
[all …]
DDisplayManagerShellCommand.java240 final float refreshRate; in setUserPreferredDisplayMode() local
244 refreshRate = Float.parseFloat(refreshRateText); in setUserPreferredDisplayMode()
249 if ((width < 0 || height < 0) && refreshRate <= 0.0f) { in setUserPreferredDisplayMode()
266 displayId, new Display.Mode(width, height, refreshRate)); in setUserPreferredDisplayMode()
DOverlayDisplayAdapter.java282 float refreshRate, long presentationDeadlineNanos, in OverlayDisplayDevice() argument
287 mRefreshRate = refreshRate; in OverlayDisplayDevice()
296 mModes[i] = createMode(mode.mWidth, mode.mHeight, refreshRate); in OverlayDisplayDevice()
460 public void onWindowCreated(SurfaceTexture surfaceTexture, float refreshRate, in onWindowCreated() argument
465 DEFAULT_MODE_INDEX, refreshRate, presentationDeadlineNanos, in onWindowCreated()
DWifiDisplayAdapter.java387 float refreshRate = 60.0f; // TODO: get this for real in addDisplayDeviceLocked() local
393 refreshRate, deviceFlags, address, surface); in addDisplayDeviceLocked()
600 int width, int height, float refreshRate, int flags, String address, in WifiDisplayDevice() argument
607 mRefreshRate = refreshRate; in WifiDisplayDevice()
611 mMode = createMode(width, height, refreshRate); in WifiDisplayDevice()
DPersistentDataStore.java334 public boolean setUserPreferredRefreshRate(DisplayDevice displayDevice, float refreshRate) { in setUserPreferredRefreshRate() argument
340 if (state.setRefreshRate(refreshRate)) { in setUserPreferredRefreshRate()
706 public boolean setRefreshRate(float refreshRate) { in setRefreshRate() argument
707 if (refreshRate == mRefreshRate) { in setRefreshRate()
710 mRefreshRate = refreshRate; in setRefreshRate()
748 String refreshRate = parser.nextText(); in loadFromXml() local
749 mRefreshRate = Float.parseFloat(refreshRate); in loadFromXml()
/frameworks/native/services/surfaceflinger/tests/fakehwc/
DSFFakeHwc_test.cpp354 EXPECT_EQ(1e9f / 16'666'666, mode.refreshRate); in Test_HotplugOneConfig()
414 EXPECT_EQ(1e9f / 16'666'666, mode.refreshRate); in Test_HotplugTwoSeparateConfigs()
455 mode.refreshRate, in Test_HotplugTwoSeparateConfigs()
456 mode.refreshRate, in Test_HotplugTwoSeparateConfigs()
457 mode.refreshRate, in Test_HotplugTwoSeparateConfigs()
458 mode.refreshRate)); in Test_HotplugTwoSeparateConfigs()
467 EXPECT_EQ(1e9f / 11'111'111, mode.refreshRate); in Test_HotplugTwoSeparateConfigs()
522 EXPECT_EQ(1e9f / 16'666'666, mode.refreshRate); in Test_HotplugTwoConfigsSameGroup()
559 if (mode.refreshRate == 1e9f / 11'111'111) { in Test_HotplugTwoConfigsSameGroup()
562 mode.refreshRate, in Test_HotplugTwoConfigsSameGroup()
[all …]
/frameworks/base/core/jni/
Dandroid_hardware_display_DisplayManagerGlobal.cpp34 jfloat refreshRate) { in android_hardware_display_DisplayManagerGlobal_signalNativeCallbacks() argument
36 const nsecs_t vsyncPeriod = kNanosPerSecond / refreshRate; in android_hardware_display_DisplayManagerGlobal_signalNativeCallbacks()
/frameworks/native/libs/ui/
DDisplayMode.cpp33 FlattenableHelpers::getFlattenedSize(refreshRate) + in getFlattenedSize()
48 RETURN_IF_ERROR(FlattenableHelpers::flatten(&buffer, &size, refreshRate)); in flatten()
61 RETURN_IF_ERROR(FlattenableHelpers::unflatten(&buffer, &size, &refreshRate)); in unflatten()
/frameworks/base/core/java/android/view/
DDisplay.java1854 public static boolean isRefreshRateValid(float refreshRate) { in isRefreshRateValid() argument
1855 return refreshRate > 0.0f; in isRefreshRateValid()
1898 public Mode(int width, int height, float refreshRate) { in Mode() argument
1899 this(INVALID_MODE_ID, width, height, refreshRate, new float[0]); in Mode()
1906 public Mode(int modeId, int width, int height, float refreshRate) { in Mode() argument
1907 this(modeId, width, height, refreshRate, new float[0]); in Mode()
1913 public Mode(int modeId, int width, int height, float refreshRate, in Mode() argument
1918 mRefreshRate = refreshRate; in Mode()
2001 public boolean matches(int width, int height, float refreshRate) { in matches() argument
2004 Float.floatToIntBits(mRefreshRate) == Float.floatToIntBits(refreshRate); in matches()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/mock/DisplayHardware/
DMockDisplayMode.h24 DisplayModeId modeId, Fps refreshRate, int32_t group = 0,
30 .setVsyncPeriod(refreshRate.getPeriodNsecs())
/frameworks/base/libs/hwui/
DDeviceInfo.h49 static void setRefreshRate(float refreshRate) { in setRefreshRate() argument
50 get()->mVsyncPeriod = static_cast<int64_t>(1000000000 / refreshRate); in setRefreshRate()
/frameworks/native/services/surfaceflinger/tests/unittests/
DFrameTimelineTest.cpp440 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F() local
450 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate); in TEST_F()
468 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F() local
478 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate); in TEST_F()
488 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F() local
491 TimeStats::JankyFramesInfo{refreshRate, std::nullopt, sUidOne, in TEST_F()
503 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate); in TEST_F()
513 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F() local
516 TimeStats::JankyFramesInfo{refreshRate, std::nullopt, sUidOne, in TEST_F()
529 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate); in TEST_F()
[all …]
DVsyncConfigurationTest.cpp133 const auto testForRefreshRate = [&](Fps refreshRate) { in TEST_F() argument
134 phaseOffsetsWithDefaultValues.setRefreshRateFps(refreshRate); in TEST_F()
136 auto offsets = phaseOffsetsWithDefaultValues.getConfigsForRefreshRate(refreshRate); in TEST_F()
138 validateOffsets(offsets, std::chrono::nanoseconds(refreshRate.getPeriodNsecs())); in TEST_F()
/frameworks/native/services/surfaceflinger/FrameTimeline/
DFrameTimeline.h199 void onPresent(nsecs_t presentTime, int32_t displayFrameJankType, Fps refreshRate,
231 void classifyJankLocked(int32_t displayFrameJankType, const Fps& refreshRate,
301 virtual void setSfWakeUp(int64_t token, nsecs_t wakeupTime, Fps refreshRate) = 0;
377 void onSfWakeUp(int64_t token, Fps refreshRate, std::optional<TimelineItem> predictions,
456 void setSfWakeUp(int64_t token, nsecs_t wakeupTime, Fps refreshRate) override;
DFrameTimeline.cpp493 void SurfaceFrame::classifyJankLocked(int32_t displayFrameJankType, const Fps& refreshRate, in classifyJankLocked() argument
518 const nsecs_t deltaToVsync = refreshRate.getPeriodNsecs() > 0 in classifyJankLocked()
519 ? std::abs(presentDelta) % refreshRate.getPeriodNsecs() in classifyJankLocked()
542 deltaToVsync >= refreshRate.getPeriodNsecs() - in classifyJankLocked()
563 nsecs_t adjustedDeadline = mLastLatchTime + refreshRate.getPeriodNsecs(); in classifyJankLocked()
580 deltaToVsync >= refreshRate.getPeriodNsecs() - in classifyJankLocked()
599 void SurfaceFrame::onPresent(nsecs_t presentTime, int32_t displayFrameJankType, Fps refreshRate, in onPresent() argument
611 classifyJankLocked(displayFrameJankType, refreshRate, deadlineDelta); in onPresent()
615 mTimeStats->incrementJankyFrames({refreshRate, mRenderRate, mOwnerUid, mLayerName, in onPresent()
831 void FrameTimeline::setSfWakeUp(int64_t token, nsecs_t wakeUpTime, Fps refreshRate) { in setSfWakeUp() argument
[all …]
/frameworks/native/libs/ui/include/ui/
DDisplayMode.h38 float refreshRate = 0; member
/frameworks/native/libs/ui/include_vndk/ui/
DDisplayMode.h38 float refreshRate = 0; member
/frameworks/native/services/surfaceflinger/TimeStats/
DTimeStats.h117 Fps refreshRate; member
132 return isApproxEqual(refreshRate, o.refreshRate) &&
142 os << "\n .refreshRate = " << info.refreshRate;
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DPersistentDataStoreTest.java328 float refreshRate = 85.3f; in testStoreAndRestoreRefreshRate() local
330 mDataStore.setUserPreferredRefreshRate(testDisplayDevice, refreshRate); in testStoreAndRestoreRefreshRate()
363 float refreshRate = 85.3f; in testBrightnessInitialisesWithInvalidFloat() local
365 mDataStore.setUserPreferredRefreshRate(testDisplayDevice, refreshRate); in testBrightnessInitialisesWithInvalidFloat()

123