Commit 10d7fc3b authored by kylechar's avatar kylechar Committed by Commit Bot

[Ozone DRM] Don't round refresh rate for PresentationFeedback.

HardwareDisplayController::GetRefreshInterval() was using the integer
rounded refresh rate instead of a float value. The rounded refresh was
used to construct PresentationFeedback, which ultimately gets used to
set the begin frame and exo vsync interval. On veyron_minnie this
changed the interval from 16819us to 16666us incorrectly.

Bug: 907625
Change-Id: I0e7a2a776cdadfa0bb99b67735ab93beb90a0f63
Reviewed-on: https://chromium-review.googlesource.com/c/1347444Reviewed-by: default avatarMichael Spang <spang@chromium.org>
Commit-Queue: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610227}
parent d1f4835c
...@@ -309,13 +309,9 @@ gfx::Size HardwareDisplayController::GetModeSize() const { ...@@ -309,13 +309,9 @@ gfx::Size HardwareDisplayController::GetModeSize() const {
crtc_controllers_[0]->mode().vdisplay); crtc_controllers_[0]->mode().vdisplay);
} }
uint32_t HardwareDisplayController::GetRefreshRate() const {
// If there are multiple CRTCs they should all have the same size.
return crtc_controllers_[0]->mode().vrefresh;
}
base::TimeDelta HardwareDisplayController::GetRefreshInterval() const { base::TimeDelta HardwareDisplayController::GetRefreshInterval() const {
uint32_t vrefresh = GetRefreshRate(); // If there are multiple CRTCs they should all have the same refresh rate.
float vrefresh = ModeRefreshRate(crtc_controllers_[0]->mode());
return vrefresh ? base::TimeDelta::FromSeconds(1) / vrefresh return vrefresh ? base::TimeDelta::FromSeconds(1) / vrefresh
: base::TimeDelta(); : base::TimeDelta();
} }
......
...@@ -156,7 +156,6 @@ class HardwareDisplayController { ...@@ -156,7 +156,6 @@ class HardwareDisplayController {
gfx::Point origin() const { return origin_; } gfx::Point origin() const { return origin_; }
void set_origin(const gfx::Point& origin) { origin_ = origin; } void set_origin(const gfx::Point& origin) { origin_ = origin; }
uint32_t GetRefreshRate() const;
base::TimeDelta GetRefreshInterval() const; base::TimeDelta GetRefreshInterval() const;
base::TimeTicks GetTimeOfLastFlip() const; base::TimeTicks GetTimeOfLastFlip() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment