Home
last modified time | relevance | path

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

123

/frameworks/native/services/surfaceflinger/Scheduler/
DLayerInfo.cpp272 const auto refreshRate = Fps::fromPeriodNsecs(*averageFrameTime); in calculateRefreshRateIfPossible() local
273 const bool refreshRateConsistent = mRefreshRateHistory.add(refreshRate, now); in calculateRefreshRateIfPossible()
275 const auto knownRefreshRate = selector.findClosestKnownFrameRate(refreshRate); in calculateRefreshRateIfPossible()
279 if (std::abs(mLastRefreshRate.calculated.getValue() - refreshRate.getValue()) > in calculateRefreshRateIfPossible()
282 mLastRefreshRate.calculated = refreshRate; in calculateRefreshRateIfPossible()
287 to_string(refreshRate).c_str(), to_string(mLastRefreshRate.reported).c_str()); in calculateRefreshRateIfPossible()
290 to_string(refreshRate).c_str(), to_string(mLastRefreshRate.reported).c_str()); in calculateRefreshRateIfPossible()
336 auto refreshRate = calculateRefreshRateIfPossible(selector, now); in getRefreshRateVote() local
337 if (refreshRate.has_value()) { in getRefreshRateVote()
338 ALOGV("%s calculated refresh rate: %s", mName.c_str(), to_string(*refreshRate).c_str()); in getRefreshRateVote()
[all …]
DScheduler.cpp253 const auto [refreshRate, period] = [this] { in makeGetVsyncPeriodFunction()
262 const Period currentPeriod = period != Period::zero() ? period : refreshRate.getPeriod(); in makeGetVsyncPeriodFunction()
269 const auto divisor = RefreshRateSelector::getFrameRateDivisor(refreshRate, *frameRate); in makeGetVsyncPeriodFunction()
482 std::optional<Fps> refreshRate) { in resyncToHardwareVsyncLocked() argument
491 if (!refreshRate) { in resyncToHardwareVsyncLocked()
492 refreshRate = display.selectorPtr->getActiveMode().modePtr->getFps(); in resyncToHardwareVsyncLocked()
494 if (refreshRate->isValid()) { in resyncToHardwareVsyncLocked()
496 display.schedulePtr->startPeriodTransition(refreshRate->getPeriod(), kForce); in resyncToHardwareVsyncLocked()
694 const Fps refreshRate = pacesetterSelectorPtr()->getActiveMode().modePtr->getFps(); in kernelIdleTimerCallback() local
699 if (state == TimerState::Reset && refreshRate > FPS_THRESHOLD_FOR_KERNEL_TIMER) { in kernelIdleTimerCallback()
[all …]
DRefreshRateSelector.cpp293 Fps refreshRate) const { in calculateNonExactMatchingLayerScoreLocked()
296 const auto displayPeriod = refreshRate.getPeriodNsecs(); in calculateNonExactMatchingLayerScoreLocked()
320 if (refreshRate < 60_Hz) { in calculateNonExactMatchingLayerScoreLocked()
332 const float multiplier = refreshRate.getValue() / layer.desiredRefreshRate.getValue(); in calculateNonExactMatchingLayerScoreLocked()
340 isFractionalPairOrMultiple(refreshRate, layer.desiredRefreshRate)) { in calculateNonExactMatchingLayerScoreLocked()
375 float RefreshRateSelector::calculateDistanceScoreFromMax(Fps refreshRate) const { in calculateDistanceScoreFromMax()
377 const float ratio = refreshRate.getValue() / maxFps.getValue(); in calculateDistanceScoreFromMax()
382 float RefreshRateSelector::calculateLayerScoreLocked(const LayerRequirement& layer, Fps refreshRate, in calculateLayerScoreLocked() argument
391 return calculateDistanceScoreFromMax(refreshRate); in calculateLayerScoreLocked()
395 const int divisor = getFrameRateDivisor(refreshRate, layer.desiredRefreshRate); in calculateLayerScoreLocked()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/mock/DisplayHardware/
DMockDisplayMode.h24 DisplayModeId modeId, Fps refreshRate, int32_t group = 0,
30 .setVsyncPeriod(refreshRate.getPeriodNsecs())
37 Fps refreshRate) { in createDisplayMode() argument
38 return createDisplayMode(modeId, refreshRate, {}, {}, displayId); in createDisplayMode()
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenrecord/
DScreenMediaRecorder.java143 int refreshRate = (int) wm.getDefaultDisplay().getRefreshRate(); in prepare() local
144 int[] dimens = getSupportedSize(metrics.widthPixels, metrics.heightPixels, refreshRate); in prepare()
147 refreshRate = dimens[2]; in prepare()
148 int vidBitRate = width * height * refreshRate / VIDEO_FRAME_RATE in prepare()
155 mMediaRecorder.setVideoFrameRate(refreshRate); in prepare()
209 private int[] getSupportedSize(final int screenWidth, final int screenHeight, int refreshRate) in getSupportedSize() argument
238 if (maxRate < refreshRate) { in getSupportedSize()
239 refreshRate = maxRate; in getSupportedSize()
241 Log.d(TAG, "Screen size supported at rate " + refreshRate); in getSupportedSize()
242 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], new int[0]); in createMode()
126 public static Display.Mode createMode(int width, int height, float refreshRate, in createMode() argument
129 return new Display.Mode(NEXT_DISPLAY_MODE_ID.getAndIncrement(), width, height, refreshRate, in createMode()
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.java284 float refreshRate, long presentationDeadlineNanos, in OverlayDisplayDevice() argument
289 mRefreshRate = refreshRate; in OverlayDisplayDevice()
298 mModes[i] = createMode(mode.mWidth, mode.mHeight, refreshRate); in OverlayDisplayDevice()
465 public void onWindowCreated(SurfaceTexture surfaceTexture, float refreshRate, in onWindowCreated() argument
470 DEFAULT_MODE_INDEX, refreshRate, presentationDeadlineNanos, in onWindowCreated()
DWifiDisplayAdapter.java389 float refreshRate = 60.0f; // TODO: get this for real in addDisplayDeviceLocked() local
395 refreshRate, deviceFlags, address, surface); in addDisplayDeviceLocked()
606 int width, int height, float refreshRate, int flags, String address, in WifiDisplayDevice() argument
613 mRefreshRate = refreshRate; in WifiDisplayDevice()
617 mMode = createMode(width, height, refreshRate); in WifiDisplayDevice()
DPersistentDataStore.java338 public boolean setUserPreferredRefreshRate(DisplayDevice displayDevice, float refreshRate) { in setUserPreferredRefreshRate() argument
344 if (state.setRefreshRate(refreshRate)) { in setUserPreferredRefreshRate()
721 public boolean setRefreshRate(float refreshRate) { in setRefreshRate() argument
722 if (refreshRate == mRefreshRate) { in setRefreshRate()
725 mRefreshRate = refreshRate; in setRefreshRate()
758 String refreshRate = parser.nextText(); in loadFromXml() local
759 mRefreshRate = Float.parseFloat(refreshRate); in loadFromXml()
/frameworks/base/services/core/java/com/android/server/wm/
DRefreshRatePolicy.java193 FrameRateVote(float refreshRate, @Surface.FrameRateCompatibility int compatibility) { in FrameRateVote() argument
194 update(refreshRate, compatibility); in FrameRateVote()
201 boolean update(float refreshRate, @Surface.FrameRateCompatibility int compatibility) { in update() argument
202 if (!refreshRateEquals(refreshRate) || mCompatibility != compatibility) { in update()
203 mRefreshRate = refreshRate; in update()
235 private boolean refreshRateEquals(float refreshRate) { in refreshRateEquals() argument
236 return mRefreshRate <= refreshRate + RefreshRateRange.FLOAT_TOLERANCE in refreshRateEquals()
237 && mRefreshRate >= refreshRate - RefreshRateRange.FLOAT_TOLERANCE; in refreshRateEquals()
/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/base/core/java/android/view/
DDisplay.java2056 public static boolean isRefreshRateValid(float refreshRate) { in isRefreshRateValid() argument
2057 return refreshRate > 0.0f; in isRefreshRateValid()
2103 public Mode(int width, int height, float refreshRate) { in Mode() argument
2104 this(INVALID_MODE_ID, width, height, refreshRate, new float[0], new int[0]); in Mode()
2111 public Mode(int modeId, int width, int height, float refreshRate) { in Mode() argument
2112 this(modeId, width, height, refreshRate, new float[0], new int[0]); in Mode()
2118 public Mode(int modeId, int width, int height, float refreshRate, in Mode() argument
2123 mRefreshRate = refreshRate; in Mode()
2217 public boolean matches(int width, int height, float refreshRate) { in matches() argument
2220 Float.floatToIntBits(mRefreshRate) == Float.floatToIntBits(refreshRate); in matches()
[all …]
/frameworks/base/libs/hwui/
DDeviceInfo.h51 static void setRefreshRate(float refreshRate) { in setRefreshRate() argument
52 get()->mVsyncPeriod = static_cast<int64_t>(1000000000 / refreshRate); in setRefreshRate()
/frameworks/native/libs/gui/aidl/android/gui/
DDisplayMode.aidl32 float refreshRate = 0.0f;
/frameworks/native/services/surfaceflinger/tests/
DDisplayConfigs_test.cpp78 setSpecs.primaryRanges.physical.min = modes[i].refreshRate; in TEST_F()
79 setSpecs.primaryRanges.physical.max = modes[i].refreshRate; in TEST_F()
/frameworks/native/services/surfaceflinger/tests/unittests/
DFrameTimelineTest.cpp468 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F() local
481 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate); in TEST_F()
499 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F() local
512 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate); in TEST_F()
522 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F() local
525 TimeStats::JankyFramesInfo{refreshRate, std::nullopt, sUidOne, in TEST_F()
540 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate); in TEST_F()
550 Fps refreshRate = Fps::fromPeriodNsecs(11); in TEST_F() local
553 TimeStats::JankyFramesInfo{refreshRate, std::nullopt, sUidOne, in TEST_F()
569 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/libs/ui/include_vndk/ui/
DDisplayMode.h40 float refreshRate = 0; member
/frameworks/native/libs/ui/include/ui/
DDisplayMode.h40 float refreshRate = 0; member
/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/base/services/core/java/com/android/server/display/mode/
DDisplayModeDirector.java1135 public void setDefaultRefreshRate(float refreshRate) { in setDefaultRefreshRate() argument
1137 mDefaultRefreshRate = refreshRate; in setDefaultRefreshRate()
1860 public void onDeviceConfigRefreshRateInLowZoneChanged(int refreshRate) { in onDeviceConfigRefreshRateInLowZoneChanged() argument
1861 if (refreshRate == -1) { in onDeviceConfigRefreshRateInLowZoneChanged()
1869 } else if (refreshRate != mRefreshRateInLowZone) { in onDeviceConfigRefreshRateInLowZoneChanged()
1870 mRefreshRateInLowZone = refreshRate; in onDeviceConfigRefreshRateInLowZoneChanged()
1906 public void onDeviceConfigRefreshRateInHighZoneChanged(int refreshRate) { in onDeviceConfigRefreshRateInHighZoneChanged() argument
1907 if (refreshRate == -1) { in onDeviceConfigRefreshRateInHighZoneChanged()
1915 } else if (refreshRate != mRefreshRateInHighZone) { in onDeviceConfigRefreshRateInHighZoneChanged()
1916 mRefreshRateInHighZone = refreshRate; in onDeviceConfigRefreshRateInHighZoneChanged()
[all …]
/frameworks/native/services/surfaceflinger/TimeStats/
DTimeStats.h119 Fps refreshRate; member
134 return isApproxEqual(refreshRate, o.refreshRate) &&
144 os << "\n .refreshRate = " << info.refreshRate;
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/
DLocalDisplayAdapterTest.java413 FakeDisplay display = new FakeDisplay(PORT_A, modes, 0, displayMode.refreshRate); in testAfterDisplayChange_DefaultDisplayModeIsUpdated()
435 displayMode2.refreshRate)); in testAfterDisplayChange_DefaultDisplayModeIsUpdated()
469 FakeDisplay display = new FakeDisplay(PORT_A, modes, 0, displayMode.refreshRate); in testAfterDisplayChange_DisplayModesAreUpdated()
931 displayMode3.width, displayMode3.height, displayMode3.refreshRate)); in testGetSystemPreferredDisplayMode()
1101 x -> x.matches(mode.width, mode.height, mode.refreshRate))).isTrue(); in assertModeIsSupported()
1115 .anyMatch(x -> x.matches(mode.width, mode.height, mode.refreshRate) in assertModeIsSupported()
1202 float refreshRate) { in createFakeDisplayMode() argument
1203 return createFakeDisplayMode(id, width, height, refreshRate, /* group */ 0); in createFakeDisplayMode()
1207 float refreshRate, int group) { in createFakeDisplayMode() argument
1212 mode.refreshRate = refreshRate; in createFakeDisplayMode()
[all …]

123