Home
last modified time | relevance | path

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

123

/frameworks/base/services/core/java/com/android/server/display/config/
DSupportedModeData.java28 public final float refreshRate; field in SupportedModeData
31 public SupportedModeData(float refreshRate, float vsyncRate) { in SupportedModeData() argument
32 this.refreshRate = refreshRate; in SupportedModeData()
39 + "refreshRate= " + refreshRate in toString()
/frameworks/native/services/surfaceflinger/Scheduler/
DLayerInfo.cpp283 const auto refreshRate = Fps::fromPeriodNsecs(*averageFrameTime); in calculateRefreshRateIfPossible() local
284 const auto closestKnownRefreshRate = mRefreshRateHistory.add(refreshRate, now, selector); in calculateRefreshRateIfPossible()
289 if (std::abs(mLastRefreshRate.calculated.getValue() - refreshRate.getValue()) > in calculateRefreshRateIfPossible()
292 mLastRefreshRate.calculated = refreshRate; in calculateRefreshRateIfPossible()
297 to_string(refreshRate).c_str(), to_string(mLastRefreshRate.reported).c_str()); in calculateRefreshRateIfPossible()
300 to_string(refreshRate).c_str(), to_string(mLastRefreshRate.reported).c_str()); in calculateRefreshRateIfPossible()
381 auto refreshRate = calculateRefreshRateIfPossible(selector, now); in getRefreshRateVote() local
382 if (refreshRate.has_value()) { in getRefreshRateVote()
383 ATRACE_FORMAT_INSTANT("calculated (%s)", to_string(*refreshRate).c_str()); in getRefreshRateVote()
384 ALOGV("%s calculated refresh rate: %s", mName.c_str(), to_string(*refreshRate).c_str()); in getRefreshRateVote()
[all …]
DRefreshRateSelector.cpp328 Fps refreshRate) const { in calculateNonExactMatchingLayerScoreLocked()
331 const auto displayPeriod = refreshRate.getPeriodNsecs(); in calculateNonExactMatchingLayerScoreLocked()
339 if (refreshRate >= layer.desiredRefreshRate) { in calculateNonExactMatchingLayerScoreLocked()
342 return calculateDistanceScoreLocked(layer.desiredRefreshRate, refreshRate); in calculateNonExactMatchingLayerScoreLocked()
349 if (refreshRate < 60_Hz) { in calculateNonExactMatchingLayerScoreLocked()
361 const float multiplier = refreshRate.getValue() / layer.desiredRefreshRate.getValue(); in calculateNonExactMatchingLayerScoreLocked()
369 isFractionalPairOrMultiple(refreshRate, layer.desiredRefreshRate)) { in calculateNonExactMatchingLayerScoreLocked()
404 float RefreshRateSelector::calculateDistanceScoreLocked(Fps referenceRate, Fps refreshRate) const { in calculateDistanceScoreLocked()
406 const float ratio = referenceRate >= refreshRate in calculateDistanceScoreLocked()
407 ? refreshRate.getValue() / referenceRate.getValue() in calculateDistanceScoreLocked()
[all …]
DScheduler.cpp306 const auto [refreshRate, period] = [this] { in getVsyncPeriod()
312 const auto refreshRate = frameRateMode.fps; in getVsyncPeriod() local
314 const auto numPeriod = RefreshRateSelector::getFrameRateDivisor(displayVsync, refreshRate); in getVsyncPeriod()
315 return std::make_pair(refreshRate, numPeriod * pacesetter.schedulePtr->period()); in getVsyncPeriod()
318 const Period currentPeriod = period != Period::zero() ? period : refreshRate.getPeriod(); in getVsyncPeriod()
325 const auto divisor = RefreshRateSelector::getFrameRateDivisor(refreshRate, *frameRate); in getVsyncPeriod()
479 void Scheduler::updatePhaseConfiguration(Fps refreshRate) { in updatePhaseConfiguration() argument
480 mRefreshRateStats->setRefreshRate(refreshRate); in updatePhaseConfiguration()
481 mVsyncConfiguration->setRefreshRateFps(refreshRate); in updatePhaseConfiguration()
483 refreshRate.getPeriod()); in updatePhaseConfiguration()
[all …]
/frameworks/base/services/core/java/com/android/server/display/
DDisplayAdapter.java130 public static Display.Mode createMode(int width, int height, float refreshRate) { in createMode() argument
131 return createMode(width, height, refreshRate, refreshRate, new float[0], new int[0]); in createMode()
134 public static Display.Mode createMode(int width, int height, float refreshRate, float vsyncRate, in createMode() argument
137 return new Display.Mode(NEXT_DISPLAY_MODE_ID.getAndIncrement(), width, height, refreshRate, in createMode()
DOverlayDisplayAdapter.java286 float refreshRate, long presentationDeadlineNanos, in OverlayDisplayDevice() argument
291 mRefreshRate = refreshRate; in OverlayDisplayDevice()
300 mModes[i] = createMode(mode.mWidth, mode.mHeight, refreshRate); in OverlayDisplayDevice()
467 public void onWindowCreated(SurfaceTexture surfaceTexture, float refreshRate, in onWindowCreated() argument
472 DEFAULT_MODE_INDEX, refreshRate, presentationDeadlineNanos, in onWindowCreated()
/frameworks/base/services/core/java/com/android/server/display/mode/
DVoteSummary.java219 float refreshRate = mode.getRefreshRate(); in validateModeWithinPhysicalRefreshRange() local
223 if (refreshRate < (minPhysicalRefreshRate - FLOAT_TOLERANCE) in validateModeWithinPhysicalRefreshRange()
224 || refreshRate > (maxPhysicalRefreshRate + FLOAT_TOLERANCE)) { in validateModeWithinPhysicalRefreshRange()
230 + ", modeRefreshRate=" + refreshRate); in validateModeWithinPhysicalRefreshRange()
238 float refreshRate = mode.getRefreshRate(); in validateModeWithinRenderRefreshRange() local
242 if (refreshRate < (minRenderFrameRate - FLOAT_TOLERANCE) in validateModeWithinRenderRefreshRange()
243 || refreshRate > (maxRenderFrameRate + FLOAT_TOLERANCE)) { in validateModeWithinRenderRefreshRange()
249 + ", modeRefreshRate=" + refreshRate); in validateModeWithinRenderRefreshRange()
258 float refreshRate = mode.getRefreshRate(); in validateModeRenderRateAchievable() local
259 if (!isRenderRateAchievable(refreshRate)) { in validateModeRenderRateAchievable()
[all …]
DRequestedRefreshRateVote.java26 RequestedRefreshRateVote(float refreshRate) { in RequestedRefreshRateVote() argument
27 this.mRefreshRate = refreshRate; in RequestedRefreshRateVote()
DVote.java217 static Vote forRequestedRefreshRate(float refreshRate) { in forRequestedRefreshRate() argument
218 return new RequestedRefreshRateVote(refreshRate); in forRequestedRefreshRate()
227 rates.add(new SupportedRefreshRatesVote.RefreshRates(data.refreshRate, data.vsyncRate)); in forSupportedRefreshRates()
DDisplayModeDirector.java1035 public void setDefaultRefreshRate(float refreshRate) { in setDefaultRefreshRate() argument
1037 mDefaultRefreshRate = refreshRate; in setDefaultRefreshRate()
1336 private Display.Mode findDefaultModeByRefreshRateLocked(int displayId, float refreshRate) { in findDefaultModeByRefreshRateLocked() argument
1341 defaultMode.getPhysicalHeight(), refreshRate)) { in findDefaultModeByRefreshRateLocked()
2033 public void onDeviceConfigRefreshRateInLowZoneChanged(int refreshRate) { in onDeviceConfigRefreshRateInLowZoneChanged() argument
2034 if (refreshRate == -1) { in onDeviceConfigRefreshRateInLowZoneChanged()
2042 } else if (refreshRate != mRefreshRateInLowZone) { in onDeviceConfigRefreshRateInLowZoneChanged()
2043 mRefreshRateInLowZone = refreshRate; in onDeviceConfigRefreshRateInLowZoneChanged()
2079 public void onDeviceConfigRefreshRateInHighZoneChanged(int refreshRate) { in onDeviceConfigRefreshRateInHighZoneChanged() argument
2080 if (refreshRate == -1) { in onDeviceConfigRefreshRateInHighZoneChanged()
[all …]
/frameworks/base/core/java/com/android/internal/jank/
DFrameTracker.java135 @RefreshRate int refreshRate; field in FrameTracker.JankInfo
144 @JankType int jankType, @RefreshRate int refreshRate) { in createFromSurfaceControlCallback() argument
146 frameVsyncId, false, true, jankType, refreshRate, 0, false /* isFirstFrame */); in createFromSurfaceControlCallback()
151 @RefreshRate int refreshRate, in JankInfo() argument
157 this.refreshRate = refreshRate; in JankInfo()
443 int refreshRate = DisplayRefreshRate.getRefreshRate(jankStat.frameIntervalNs); in onJankDataAvailable() local
448 info.refreshRate = refreshRate; in onJankDataAvailable()
452 jankStat.frameVsyncId, jankStat.jankType, refreshRate)); in onJankDataAvailable()
571 @RefreshRate int refreshRate = UNKNOWN_REFRESH_RATE; in finish() local
607 if (info.refreshRate != UNKNOWN_REFRESH_RATE && info.refreshRate != refreshRate) { in finish()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenrecord/
DScreenMediaRecorder.java147 int refreshRate = (int) wm.getDefaultDisplay().getRefreshRate(); in prepare() local
148 int[] dimens = getSupportedSize(metrics.widthPixels, metrics.heightPixels, refreshRate); in prepare()
151 refreshRate = dimens[2]; in prepare()
152 int vidBitRate = width * height * refreshRate / VIDEO_FRAME_RATE in prepare()
159 mMediaRecorder.setVideoFrameRate(refreshRate); in prepare()
213 private int[] getSupportedSize(final int screenWidth, final int screenHeight, int refreshRate) in getSupportedSize() argument
242 if (maxRate < refreshRate) { in getSupportedSize()
243 refreshRate = maxRate; in getSupportedSize()
245 Log.d(TAG, "Screen size supported at rate " + refreshRate); in getSupportedSize()
246 return new int[]{screenWidthAligned, screenHeightAligned, refreshRate}; in getSupportedSize()
[all …]
/frameworks/native/services/surfaceflinger/
DRefreshRateOverlay.h69 static Buffers draw(int refreshRate, int renderFps, bool idle, SkColor,
79 int refreshRate; member
85 return refreshRate == other.refreshRate && renderFps == other.renderFps &&
DRefreshRateOverlay.cpp31 auto RefreshRateOverlay::draw(int refreshRate, int renderFps, bool idle, SkColor color, in draw() argument
78 drawNumber(refreshRate, left, color, *canvas); in draw()
191 auto RefreshRateOverlay::getOrCreateBuffers(Fps refreshRate, Fps renderFps, bool idle) in getOrCreateBuffers() argument
219 {refreshRate.getIntValue(), renderFps.getIntValue(), transformHint, idle}); in getOrCreateBuffers()
225 const int refreshIntFps = std::clamp(refreshRate.getIntValue(), 0, maxFps); in getOrCreateBuffers()
275 void RefreshRateOverlay::changeRefreshRate(Fps refreshRate, Fps renderFps) { in changeRefreshRate() argument
276 mRefreshRate = refreshRate; in changeRefreshRate()
278 const auto buffer = getOrCreateBuffers(refreshRate, renderFps, mIsVrrIdle)[mFrame]; in changeRefreshRate()
DDisplayDevice.cpp408 void DisplayDevice::enableRefreshRateOverlay(bool enable, bool setByHwc, Fps refreshRate, in enableRefreshRateOverlay() argument
438 updateRefreshRateOverlayRate(refreshRate, renderFps, setByHwc); in enableRefreshRateOverlay()
442 void DisplayDevice::updateRefreshRateOverlayRate(Fps refreshRate, Fps renderFps, bool setByHwc) { in updateRefreshRateOverlayRate() argument
447 refreshRate = renderFps; in updateRefreshRateOverlayRate()
449 mRefreshRateOverlay->changeRefreshRate(refreshRate, renderFps); in updateRefreshRateOverlayRate()
/frameworks/native/services/surfaceflinger/Scheduler/tests/
DFrameTargeterTest.cpp62 Duration frameDuration, Fps refreshRate, Fps peakRefreshRate, in Frame()
67 period(refreshRate.getPeriod()), in Frame()
384 Fps refreshRate = 120_Hz; in TEST_F() local
385 Period period = refreshRate.getPeriod(); in TEST_F()
389 const Frame frame(this, vsyncId++, frameBeginTime, 10ms, refreshRate, refreshRate); in TEST_F()
394 Frame frame(this, vsyncId++, frameBeginTime, 10ms, refreshRate, refreshRate); in TEST_F()
403 { const Frame frame(this, vsyncId++, frameBeginTime, 10ms, refreshRate, refreshRate); } in TEST_F()
405 Frame oneEarlyPresentFrame(this, vsyncId++, frameBeginTime, 10ms, refreshRate, refreshRate); in TEST_F()
417 refreshRate = 144_Hz; in TEST_F()
418 period = refreshRate.getPeriod(); in TEST_F()
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/mock/DisplayHardware/
DMockDisplayMode.h36 DisplayModeId modeId, Fps refreshRate, int32_t group = 0,
39 return createDisplayModeBuilder(modeId, refreshRate, group, resolution, displayId).build();
43 Fps refreshRate) { in createDisplayMode() argument
44 return createDisplayMode(modeId, refreshRate, {}, {}, displayId); in createDisplayMode()
/frameworks/base/services/core/java/com/android/server/wm/
DRefreshRatePolicy.java199 FrameRateVote(float refreshRate, @Surface.FrameRateCompatibility int compatibility, in FrameRateVote() argument
201 update(refreshRate, compatibility, selectionStrategy); in FrameRateVote()
208 boolean update(float refreshRate, @Surface.FrameRateCompatibility int compatibility, in update() argument
210 if (!refreshRateEquals(refreshRate) in update()
213 mRefreshRate = refreshRate; in update()
250 private boolean refreshRateEquals(float refreshRate) { in refreshRateEquals() argument
251 return mRefreshRate <= refreshRate + RefreshRateRange.FLOAT_TOLERANCE in refreshRateEquals()
252 && mRefreshRate >= refreshRate - RefreshRateRange.FLOAT_TOLERANCE; in refreshRateEquals()
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/mode/
DRequestedRefreshRateVoteTest.kt32 val refreshRate = 90f in updates requestedRefreshRates() constant
33 val vote = RequestedRefreshRateVote(refreshRate) in updates requestedRefreshRates()
39 assertThat(summary.requestedRefreshRates).contains(refreshRate) in updates requestedRefreshRates()
/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.java2185 public static boolean isRefreshRateValid(float refreshRate) { in isRefreshRateValid() argument
2186 return refreshRate > 0.0f; in isRefreshRateValid()
2235 public Mode(int width, int height, float refreshRate) { in Mode() argument
2236 this(INVALID_MODE_ID, width, height, refreshRate, refreshRate, new float[0], in Mode()
2244 public Mode(int modeId, int width, int height, float refreshRate) { in Mode() argument
2245 this(modeId, width, height, refreshRate, refreshRate, new float[0], new int[0]); in Mode()
2251 public Mode(int modeId, int width, int height, float refreshRate, in Mode() argument
2254 this(modeId, width, height, refreshRate, refreshRate, alternativeRefreshRates, in Mode()
2261 public Mode(int modeId, int width, int height, float refreshRate, float vsyncRate, in Mode() argument
2263 this(modeId, width, height, refreshRate, vsyncRate, false, alternativeRefreshRates, in Mode()
[all …]
/frameworks/base/libs/hwui/
DDeviceInfo.h52 static void setRefreshRate(float refreshRate) { in setRefreshRate() argument
53 get()->mVsyncPeriod = static_cast<int64_t>(1000000000 / refreshRate); in setRefreshRate()
/frameworks/native/services/surfaceflinger/tests/unittests/
DFrameTimelineTest.cpp525 Fps refreshRate = RR_11; in TEST_F() local
538 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate, refreshRate); in TEST_F()
558 Fps refreshRate = RR_11; in TEST_F() local
571 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate, refreshRate); in TEST_F()
581 Fps refreshRate = RR_11; in TEST_F() local
584 TimeStats::JankyFramesInfo{refreshRate, std::nullopt, sUidOne, in TEST_F()
599 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate, refreshRate); in TEST_F()
609 Fps refreshRate = RR_11; in TEST_F() local
612 TimeStats::JankyFramesInfo{refreshRate, std::nullopt, sUidOne, in TEST_F()
628 mFrameTimeline->setSfWakeUp(sfToken1, 52, refreshRate, refreshRate); in TEST_F()
[all …]
/frameworks/native/services/surfaceflinger/FrameTimeline/
DFrameTimeline.h204 void onPresent(nsecs_t presentTime, int32_t displayFrameJankType, Fps refreshRate,
208 void onCommitNotComposited(Fps refreshRate, Fps displayFrameRenderRate);
239 void classifyJankLocked(int32_t displayFrameJankType, const Fps& refreshRate,
313 virtual void setSfWakeUp(int64_t token, nsecs_t wakeupTime, Fps refreshRate,
395 void onSfWakeUp(int64_t token, Fps refreshRate, Fps renderRate,
483 void setSfWakeUp(int64_t token, nsecs_t wakeupTime, Fps refreshRate, Fps renderRate) override;
/frameworks/native/services/surfaceflinger/TimeStats/
DTimeStats.h116 Fps refreshRate; member
131 return isApproxEqual(refreshRate, o.refreshRate) &&
141 os << "\n .refreshRate = " << info.refreshRate;

123