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

Issue 910393002: Disable rendering when suspending on chrome os (Closed)

Created:
5 years, 10 months ago by Chirantan Ekbote
Modified:
5 years, 10 months ago
CC:
chromium-reviews, sadrul, Ian Vollick, sievers+watch_chromium.org, jbauman+watch_chromium.org, oshima+watch_chromium.org, piman+watch_chromium.org, kalyank, danakj+watch_chromium.org, stevenjb+watch_chromium.org, cc-bugs_chromium.org, Sameer Nanda
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disable rendering when suspending on chrome os New chrome os devices are going to make more frequent use of the dark resume state - a hybrid power state where several hardware devices are left off to save power. One of these is the display. Unfortunately this creates issues with chrome, which believes that the display is on and attempts to render things to the screen. These calls fail in the kernel and trigger a logical memory leak in the error handling code in the GPU process. In order to make this interaction more robust, have chrome stop sending rendering requests at suspend time and restart them at resume time. There are a few things to watch out for here. If the user has requested that the screen be locked at suspend time then rendering cannot be stopped until the screen locker is visible. Otherwise the contents of the user's screen will be visible at resume time, which is a security issue. Additionally, the suspend must be delayed until any pending requests have been handled by the GPU process to prevent a race where the system suspends before all requests have been processed and they end up being processed when the system later enters dark resume, triggering the memory leak mentioned in the previous paragraph. BUG=chrome-os-partner:35699 Committed: https://crrev.com/40e4cd8a507016a99740011899ca4b9779cd9eef Cr-Commit-Position: refs/heads/master@{#316946}

Patch Set 1 #

Patch Set 2 : clean up #

Total comments: 10

Patch Set 3 : Delay until lock animations are complete #

Patch Set 4 : Clean up comments #

Total comments: 2

Patch Set 5 : fix docstrings #

Patch Set 6 : Make PowerEventObserver getter cros-specific #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -22 lines) Patch
M ash/shell.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M ash/system/chromeos/power/power_event_observer.h View 1 2 2 chunks +11 lines, -2 lines 0 comments Download
M ash/system/chromeos/power/power_event_observer.cc View 1 2 3 5 chunks +76 lines, -9 lines 0 comments Download
M ash/system/chromeos/power/power_event_observer_unittest.cc View 1 2 4 chunks +93 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/lock/screen_locker_delegate.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/lock/webui_screen_locker.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/login/lock/webui_screen_locker.cc View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/resources/chromeos/login/header_bar.js View 1 2 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/resources/chromeos/login/login_common.js View 1 2 3 4 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 2 chunks +7 lines, -1 line 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (9 generated)
Chirantan Ekbote
This is my first stab at implementing chrome-side blocking of rendering at suspend time. There ...
5 years, 10 months ago (2015-02-11 00:51:07 UTC) #2
piman
https://codereview.chromium.org/910393002/diff/20001/ash/system/chromeos/power/power_event_observer.cc File ash/system/chromeos/power/power_event_observer.cc (right): https://codereview.chromium.org/910393002/diff/20001/ash/system/chromeos/power/power_event_observer.cc#newcode108 ash/system/chromeos/power/power_event_observer.cc:108: compositor->ScheduleDraw(); I don't think the ScheduleDraw should be needed. ...
5 years, 10 months ago (2015-02-11 02:48:22 UTC) #3
Daniel Erat
lgtm with some comments for the suspend part of this https://codereview.chromium.org/910393002/diff/20001/ash/system/chromeos/power/power_event_observer.h File ash/system/chromeos/power/power_event_observer.h (right): https://codereview.chromium.org/910393002/diff/20001/ash/system/chromeos/power/power_event_observer.h#newcode49 ...
5 years, 10 months ago (2015-02-11 14:11:43 UTC) #4
Chirantan Ekbote
+nkostylev With this change, rendering is stopped when the lock screen is ready but that ...
5 years, 10 months ago (2015-02-11 23:40:42 UTC) #6
Chirantan Ekbote
I might have answered my own question. There is EVENT_LOCK_ANIMATION_FINISHED in ash::LockStateObserver that looks like ...
5 years, 10 months ago (2015-02-12 03:27:23 UTC) #7
Nikita (slow)
+Dmitry, Denis On 2015/02/12 03:27:23, Chirantan Ekbote wrote: > I might have answered my own ...
5 years, 10 months ago (2015-02-12 11:28:06 UTC) #9
Nikita (slow)
+Denis for realz
5 years, 10 months ago (2015-02-12 11:28:38 UTC) #11
Chirantan Ekbote
On 2015/02/12 11:28:06, Nikita wrote: > +Dmitry, Denis > > On 2015/02/12 03:27:23, Chirantan Ekbote ...
5 years, 10 months ago (2015-02-12 20:36:36 UTC) #12
Chirantan Ekbote
On 2015/02/12 20:36:36, Chirantan Ekbote wrote: > On 2015/02/12 11:28:06, Nikita wrote: > > +Dmitry, ...
5 years, 10 months ago (2015-02-13 00:24:37 UTC) #13
Daniel Erat
On 2015/02/13 00:24:37, Chirantan Ekbote wrote: > On 2015/02/12 20:36:36, Chirantan Ekbote wrote: > > ...
5 years, 10 months ago (2015-02-13 02:44:12 UTC) #14
Nikita (slow)
On 2015/02/13 02:44:12, Daniel Erat wrote: > On 2015/02/13 00:24:37, Chirantan Ekbote wrote: > > ...
5 years, 10 months ago (2015-02-13 12:13:54 UTC) #15
Chirantan Ekbote
PTAL. With this version, the suspend is delayed until the lock screen animations have completed ...
5 years, 10 months ago (2015-02-18 02:47:14 UTC) #17
Daniel Erat
lgtm
5 years, 10 months ago (2015-02-18 03:53:24 UTC) #18
Nikita (slow)
lgtm
5 years, 10 months ago (2015-02-18 13:21:38 UTC) #19
piman
lgtm https://codereview.chromium.org/910393002/diff/60001/ui/compositor/compositor.h File ui/compositor/compositor.h (right): https://codereview.chromium.org/910393002/diff/60001/ui/compositor/compositor.h#newcode207 ui/compositor/compositor.h:207: // Get the visibility of the underlying compositor. ...
5 years, 10 months ago (2015-02-18 16:26:42 UTC) #20
Chirantan Ekbote
Thanks for the fast reviews! https://codereview.chromium.org/910393002/diff/60001/ui/compositor/compositor.h File ui/compositor/compositor.h (right): https://codereview.chromium.org/910393002/diff/60001/ui/compositor/compositor.h#newcode207 ui/compositor/compositor.h:207: // Get the visibility ...
5 years, 10 months ago (2015-02-18 19:26:50 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/910393002/80001
5 years, 10 months ago (2015-02-18 19:27:34 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/43812) ios_rel_device_ng on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 10 months ago (2015-02-18 19:36:28 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/910393002/100001
5 years, 10 months ago (2015-02-18 23:29:36 UTC) #28
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 10 months ago (2015-02-19 01:08:38 UTC) #29
commit-bot: I haz the power
5 years, 10 months ago (2015-02-19 01:09:47 UTC) #30
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/40e4cd8a507016a99740011899ca4b9779cd9eef
Cr-Commit-Position: refs/heads/master@{#316946}

Powered by Google App Engine
This is Rietveld 408576698