Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: chromeos/display/output_util.cc

Issue 24081004: chromeos: Fix display failures when going to mirrored mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DisplayChangeObserverTest Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/display/output_configurator_unittest.cc ('k') | chromeos/display/output_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/display/output_util.cc
diff --git a/chromeos/display/output_util.cc b/chromeos/display/output_util.cc
index 45f9b6ac05d0e0f4163e39dec6a824dbfcb508cf..5e223c5331681069c95565721bb98437da8a57d3 100644
--- a/chromeos/display/output_util.cc
+++ b/chromeos/display/output_util.cc
@@ -111,16 +111,6 @@ bool GetOutputDeviceData(XID output,
return result;
}
-float GetRefreshRate(const XRRModeInfo* mode_info) {
- if (mode_info->hTotal && mode_info->vTotal) {
- return static_cast<float>(mode_info->dotClock) /
- (static_cast<float>(mode_info->hTotal) *
- static_cast<float>(mode_info->vTotal));
- } else {
- return 0.0f;
- }
-}
-
} // namespace
std::string GetDisplayName(XID output_id) {
@@ -341,44 +331,6 @@ const XRRModeInfo* FindXRRModeInfo(const XRRScreenResources* screen_resources,
return NULL;
}
-// Find a mode that matches the given size with highest
-// reflesh rate.
-RRMode FindOutputModeMatchingSize(
- const XRRScreenResources* screen_resources,
- const XRROutputInfo* output_info,
- size_t width,
- size_t height) {
- RRMode found = None;
- float best_rate = 0;
- bool non_interlaced_found = false;
- for (int i = 0; i < output_info->nmode; ++i) {
- RRMode mode = output_info->modes[i];
- const XRRModeInfo* info = FindXRRModeInfo(screen_resources, mode);
-
- if (info->width == width && info->height == height) {
- float rate = GetRefreshRate(info);
-
- if (info->modeFlags & RR_Interlace) {
- if (non_interlaced_found)
- continue;
- } else {
- // Reset the best rate if the non interlaced is
- // found the first time.
- if (!non_interlaced_found) {
- best_rate = rate;
- }
- non_interlaced_found = true;
- }
- if (rate < best_rate)
- continue;
-
- found = mode;
- best_rate = rate;
- }
- }
- return found;
-}
-
namespace test {
XRRModeInfo CreateModeInfo(int id,
« no previous file with comments | « chromeos/display/output_configurator_unittest.cc ('k') | chromeos/display/output_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698