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

Unified Diff: chromeos/display/output_configurator.cc

Issue 11624038: [In progress] Monitor suspend code (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Created 8 years 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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/display/output_configurator.cc
diff --git a/chromeos/display/output_configurator.cc b/chromeos/display/output_configurator.cc
index 19724a82287bcacd1a872644f4840affc3d80f07..057d51f47761062f70745d57481944911fcba7f6 100644
--- a/chromeos/display/output_configurator.cc
+++ b/chromeos/display/output_configurator.cc
@@ -770,9 +770,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
// unrecognizable for users.
if (notification_timer_.get()) {
notification_timer_->Reset();
@@ -800,6 +800,17 @@ 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();
+ ScreenPowerSet(true, true);
+ // We need to make sure this actually completes before we return, because
+ // otherwise we could be racing with the SuspendReady message.
+ XSync(display, 0);
+}
+
void OutputConfigurator::NotifyOnDisplayChanged() {
notification_timer_.reset();
FOR_EACH_OBSERVER(Observer, observers_, OnDisplayModeChanged());
« no previous file with comments | « chromeos/display/output_configurator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698