Rename DisplayMode::refreshRate to peakRefreshRate
Peak refresh rate is a more clear name
Bug: 301462354
Test: builds, boots
Test: dumpsys display
Change-Id: I2f7f98859ae2a1d9191b1e377921eb7a04e784bf
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 9b9a67a..fc51721 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -266,7 +266,7 @@
bool isAbove4k30(const ui::DisplayMode& outMode) {
using fps_approx_ops::operator>;
- Fps refreshRate = Fps::fromValue(outMode.refreshRate);
+ Fps refreshRate = Fps::fromValue(outMode.peakRefreshRate);
return outMode.resolution.getWidth() >= FOUR_K_WIDTH &&
outMode.resolution.getHeight() >= FOUR_K_HEIGHT && refreshRate > 30_Hz;
}
@@ -1046,11 +1046,11 @@
outMode.yDpi = yDpi;
const auto peakFps = mode->getPeakFps();
- outMode.refreshRate = peakFps.getValue();
+ outMode.peakRefreshRate = peakFps.getValue();
outMode.vsyncRate = mode->getVsyncRate().getValue();
- const auto vsyncConfigSet =
- mVsyncConfiguration->getConfigsForRefreshRate(Fps::fromValue(outMode.refreshRate));
+ const auto vsyncConfigSet = mVsyncConfiguration->getConfigsForRefreshRate(
+ Fps::fromValue(outMode.peakRefreshRate));
outMode.appVsyncOffset = vsyncConfigSet.late.appOffset;
outMode.sfVsyncOffset = vsyncConfigSet.late.sfOffset;
outMode.group = mode->getGroup();
@@ -9221,7 +9221,7 @@
outMode.resolution.height = mode.resolution.height;
outMode.xDpi = mode.xDpi;
outMode.yDpi = mode.yDpi;
- outMode.refreshRate = mode.refreshRate;
+ outMode.peakRefreshRate = mode.peakRefreshRate;
outMode.vsyncRate = mode.vsyncRate;
outMode.appVsyncOffset = mode.appVsyncOffset;
outMode.sfVsyncOffset = mode.sfVsyncOffset;
diff --git a/services/surfaceflinger/tests/DisplayConfigs_test.cpp b/services/surfaceflinger/tests/DisplayConfigs_test.cpp
index 4be961b..0a951d4 100644
--- a/services/surfaceflinger/tests/DisplayConfigs_test.cpp
+++ b/services/surfaceflinger/tests/DisplayConfigs_test.cpp
@@ -75,8 +75,8 @@
setSpecs.allowGroupSwitching = false;
for (size_t i = 0; i < modes.size(); i++) {
setSpecs.defaultMode = modes[i].id;
- setSpecs.primaryRanges.physical.min = modes[i].refreshRate;
- setSpecs.primaryRanges.physical.max = modes[i].refreshRate;
+ setSpecs.primaryRanges.physical.min = modes[i].peakRefreshRate;
+ setSpecs.primaryRanges.physical.max = modes[i].peakRefreshRate;
setSpecs.primaryRanges.render = setSpecs.primaryRanges.physical;
setSpecs.appRequestRanges = setSpecs.primaryRanges;
res = SurfaceComposerClient::setDesiredDisplayModeSpecs(mDisplayToken, setSpecs);
diff --git a/services/surfaceflinger/tests/LayerTransactionTest.h b/services/surfaceflinger/tests/LayerTransactionTest.h
index 2bdb8a4..9269e7c 100644
--- a/services/surfaceflinger/tests/LayerTransactionTest.h
+++ b/services/surfaceflinger/tests/LayerTransactionTest.h
@@ -299,7 +299,7 @@
// After a new buffer is queued, SurfaceFlinger is notified and will
// latch the new buffer on next vsync. Let's heuristically wait for 3
// vsyncs.
- mBufferPostDelay = static_cast<int32_t>(1e6 / mode.refreshRate) * 3;
+ mBufferPostDelay = static_cast<int32_t>(1e6 / mode.peakRefreshRate) * 3;
mBlackBgSurface =
createSurface(mClient, "BaseSurface", 0 /* buffer width */, 0 /* buffer height */,