Index: ash/common/wm/overview/window_grid.cc |
diff --git a/ash/common/wm/overview/window_grid.cc b/ash/common/wm/overview/window_grid.cc |
index 60b9412915a08aae7ddcd0e5c77990309b5fc052..04a9e0e8cf17049c1f9a59989b67c8c896a2c883 100644 |
--- a/ash/common/wm/overview/window_grid.cc |
+++ b/ash/common/wm/overview/window_grid.cc |
@@ -97,6 +97,10 @@ const float kCardAspectRatio = 4.0f / 3.0f; |
// landscape orientation). |
const int kMinCardsMajor = 3; |
+// Hiding windows headers can be resource intensive. Only hide the headers when |
tdanderson
2016/07/18 16:26:58
nit: windows->window
varkha
2016/07/19 00:29:07
Done.
|
+// the number of windows in this grid is less or equal than this number. |
+const int kMaxWindowsCountToHideHeader = 10; |
+ |
const int kOverviewSelectorTransitionMilliseconds = 250; |
// The color and opacity of the screen shield in overview. |
@@ -446,6 +450,9 @@ void WindowGrid::PrepareForOverview() { |
void WindowGrid::PositionWindowsMD(bool animate) { |
if (window_list_.empty()) |
return; |
+ const bool hide_header = window_list_.size() <= kMaxWindowsCountToHideHeader; |
+ for (auto* window : window_list_) |
+ window->set_hide_header(hide_header); |
gfx::Rect total_bounds = |
root_window_->ConvertRectToScreen(wm::GetDisplayWorkAreaBoundsInParent( |
root_window_->GetChildByShellWindowId( |