Commit d091eecb authored by Xiyuan Xia's avatar Xiyuan Xia Committed by Chromium LUCI CQ

cros: Disable WindowOcclusionTracker on exit

There is no need to track and handle window occlusion changes
during shutdown. Disable it to make exit faster.

Bug: 1157976
Change-Id: I52f9e3ea333b0d390cd479f6dfd524935d1dfc4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2587650
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836683}
parent 91c9f442
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/power/power_policy_controller.h" #include "chromeos/dbus/power/power_policy_controller.h"
#include "third_party/cros_system_api/dbus/service_constants.h" #include "third_party/cros_system_api/dbus/service_constants.h"
#include "ui/aura/env.h"
#endif #endif
#if !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) #if !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
...@@ -306,6 +307,13 @@ void ExitIgnoreUnloadHandlers() { ...@@ -306,6 +307,13 @@ void ExitIgnoreUnloadHandlers() {
MarkAsCleanShutdown(); MarkAsCleanShutdown();
#if BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH)
// Disable window occlusion tracking on exit before closing all browser
// windows to make shutdown faster. Note that the occlusion tracking is
// paused indefinitely. It is okay do so on Chrome OS because there is
// no way to abort shutdown and go back to user sessions at this point.
DCHECK(aura::Env::HasInstance());
aura::Env::GetInstance()->PauseWindowOcclusionTracking();
// On ChromeOS ExitIgnoreUnloadHandlers() is used to handle SIGTERM. // On ChromeOS ExitIgnoreUnloadHandlers() is used to handle SIGTERM.
// In this case, AreAllBrowsersCloseable() // In this case, AreAllBrowsersCloseable()
// can be false in following cases. a) power-off b) signout from // can be false in following cases. a) power-off b) signout from
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment