Chromium Code Reviews| Index: chromeos/display/output_configurator.cc |
| diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc |
| index b6480ded1b4dc169182bbf23d90d976f33d50855..1ae60b755061c0006d68d45fd5ce1765681ae485 100644 |
| --- a/chromeos/display/output_configurator.cc |
| +++ b/chromeos/display/output_configurator.cc |
| @@ -769,9 +769,9 @@ bool OutputConfigurator::Dispatch(const base::NativeEvent& event) { |
| } |
| // Sets the timer for NotifyOnDisplayChanged(). When an output state change |
| - // is issued, several notifications chould arrive and NotifyOnDisplayChanged() |
| + // is issued, several notifications should arrive and NotifyOnDisplayChanged() |
| // should be called once for the last one. The timer could lead at most a few |
| - // handreds milliseconds of delay for the notification, but it would be |
| + // hundreds milliseconds of delay for the notification, but it would be |
|
Daniel Erat
2013/01/08 00:51:35
nit: s/hundreds/hundred/ or /hundreds of/
marcheu
2013/01/10 01:03:49
Done.
|
| // unrecognizable for users. |
| if (notification_timer_.get()) { |
| notification_timer_->Reset(); |
| @@ -799,6 +799,18 @@ bool OutputConfigurator::IsInternalOutputName(const std::string& name) { |
| return name.find(kInternal_LVDS) == 0 || name.find(kInternal_eDP) == 0; |
| } |
| +void OutputConfigurator::SuspendDisplays() { |
| + // Turn displays on before suspend. At this point, the backlight is off, |
| + // so we turn on the internal display so that we can resume directly into |
| + // "on" state. This greatly reduces resume times. |
| + Display* display = base::MessagePumpAuraX11::GetDefaultXDisplay(); |
|
Daniel Erat
2013/01/08 00:51:35
nit: remove this line and just move this down to t
marcheu
2013/01/10 01:03:49
Done.
|
| + ScreenPowerSet(true, true); |
| + // We need to make sure that the monitor configuration we just did actually |
| + // completes before we return, because otherwise the X message could be |
| + // racing with the HandleSuspendReadiness message. |
| + XSync(display, 0); |
| +} |
| + |
| void OutputConfigurator::NotifyOnDisplayChanged() { |
| notification_timer_.reset(); |
| FOR_EACH_OBSERVER(Observer, observers_, OnDisplayModeChanged()); |