/frameworks/base/services/core/java/com/android/server/display/config/ |
D | SupportedModeData.java | 28 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/ |
D | LayerInfo.cpp | 283 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 …]
|
D | RefreshRateSelector.cpp | 328 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 …]
|
D | Scheduler.cpp | 306 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/ |
D | DisplayAdapter.java | 130 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()
|
D | OverlayDisplayAdapter.java | 286 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/ |
D | VoteSummary.java | 219 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 …]
|
D | RequestedRefreshRateVote.java | 26 RequestedRefreshRateVote(float refreshRate) { in RequestedRefreshRateVote() argument 27 this.mRefreshRate = refreshRate; in RequestedRefreshRateVote()
|
D | Vote.java | 217 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()
|
D | DisplayModeDirector.java | 1035 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/ |
D | FrameTracker.java | 135 @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/ |
D | ScreenMediaRecorder.java | 147 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/ |
D | RefreshRateOverlay.h | 69 static Buffers draw(int refreshRate, int renderFps, bool idle, SkColor, 79 int refreshRate; member 85 return refreshRate == other.refreshRate && renderFps == other.renderFps &&
|
D | RefreshRateOverlay.cpp | 31 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()
|
D | DisplayDevice.cpp | 408 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/ |
D | FrameTargeterTest.cpp | 62 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/ |
D | MockDisplayMode.h | 36 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/ |
D | RefreshRatePolicy.java | 199 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/ |
D | RequestedRefreshRateVoteTest.kt | 32 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/ |
D | android_hardware_display_DisplayManagerGlobal.cpp | 34 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/ |
D | Display.java | 2185 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/ |
D | DeviceInfo.h | 52 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/ |
D | FrameTimelineTest.cpp | 525 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/ |
D | FrameTimeline.h | 204 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/ |
D | TimeStats.h | 116 Fps refreshRate; member 131 return isApproxEqual(refreshRate, o.refreshRate) && 141 os << "\n .refreshRate = " << info.refreshRate;
|