diff options
Diffstat (limited to 'chromeos')
-rw-r--r-- | chromeos/display/output_configurator.cc | 39 | ||||
-rw-r--r-- | chromeos/display/output_configurator.h | 10 |
2 files changed, 2 insertions, 47 deletions
diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc index cb8210f..3031b83b 100644 --- a/chromeos/display/output_configurator.cc +++ b/chromeos/display/output_configurator.cc @@ -622,45 +622,6 @@ void OutputConfigurator::Stop() { configure_display_ = false; } -bool OutputConfigurator::CycleDisplayMode() { - TRACE_EVENT0("chromeos", "OutputConfigurator::CycleDisplayMode"); - VLOG(1) << "CycleDisplayMode"; - if (!configure_display_) - return false; - - bool did_change = false; - Display* display = base::MessagePumpAuraX11::GetDefaultXDisplay(); - CHECK(display != NULL); - XGrabServer(display); - Window window = DefaultRootWindow(display); - XRRScreenResources* screen = GetScreenResourcesAndRecordUMA(display, window); - CHECK(screen != NULL); - - std::vector<OutputSnapshot> outputs = GetDualOutputs(display, screen); - connected_output_count_ = outputs.size(); - OutputState original = InferCurrentState(display, screen, outputs); - OutputState next_state = GetNextState(display, screen, original, outputs); - if (original != next_state && - EnterState(display, screen, window, next_state, power_state_, outputs)) { - did_change = true; - } - // We have seen cases where the XRandR data can get out of sync with our own - // cache so over-write it with whatever we detected, even if we didn't think - // anything changed. - output_state_ = next_state; - - XRRFreeScreenResources(screen); - XUngrabServer(display); - - if (did_change) { - NotifyOnDisplayChanged(); - } else { - FOR_EACH_OBSERVER( - Observer, observers_, OnDisplayModeChangeFailed(next_state)); - } - return did_change; -} - bool OutputConfigurator::SetDisplayPower(DisplayPowerState power_state, bool force_probe) { TRACE_EVENT0("chromeos", "OutputConfigurator::SetDisplayPower"); diff --git a/chromeos/display/output_configurator.h b/chromeos/display/output_configurator.h index 4f93598..f65a6cc 100644 --- a/chromeos/display/output_configurator.h +++ b/chromeos/display/output_configurator.h @@ -79,11 +79,6 @@ class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher { // Stop handling display configuration events/requests. void Stop(); - // Called when the user hits ctrl-F4 to request a display mode change. - // This method should only return false if it was called in a single-head or - // headless mode. - bool CycleDisplayMode(); - // Called when powerd notifies us that some set of displays should be turned // on or off. This requires enabling or disabling the CRTC associated with // the display(s) in question so that the low power state is engaged. @@ -91,9 +86,8 @@ class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher { // |power_state| matches |power_state_|. bool SetDisplayPower(DisplayPowerState power_state, bool force_probe); - // Force switching the display mode to |new_state|. This method is used when - // the user explicitly changes the display mode in the options UI. Returns - // false if it was called in a single-head or headless mode. + // Force switching the display mode to |new_state|. Returns false if + // it was called in a single-head or headless mode. bool SetDisplayMode(OutputState new_state); // Called when an RRNotify event is received. The implementation is |