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

Unified Diff: ash/common/wm/overview/window_selector_item.h

Issue 2146323004: [ash-md] Improves smoothness with many windows in overview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Improves smoothness with many windows in overview (added flags) Created 4 years, 5 months 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 | « ash/common/wm/overview/window_grid.cc ('k') | ash/common/wm/overview/window_selector_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/overview/window_selector_item.h
diff --git a/ash/common/wm/overview/window_selector_item.h b/ash/common/wm/overview/window_selector_item.h
index bf62659ca3f491090ec49e84d788cf4f0dc88139..38752c716721f98fc0305af43b61af68c1453fe2 100644
--- a/ash/common/wm/overview/window_selector_item.h
+++ b/ash/common/wm/overview/window_selector_item.h
@@ -114,6 +114,8 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener,
bool dimmed() const { return dimmed_; }
const gfx::Rect& target_bounds() const { return target_bounds_; }
+ static void set_use_mask(bool use_mask) { use_mask_ = use_mask; }
+ static void set_use_shape(bool use_shape) { use_shape_ = use_shape; }
// views::ButtonListener:
void ButtonPressed(views::Button* sender, const ui::Event& event) override;
@@ -154,6 +156,8 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener,
// Updates the close buttons accessibility name.
void UpdateCloseButtonAccessibilityName();
+ static bool hide_header() { return use_mask_ || use_shape_; }
+
// True if the item is being shown in the overview, false if it's being
// filtered.
bool dimmed_;
@@ -203,6 +207,16 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener,
// Guaranteed to be non-null for the lifetime of |this|.
WindowSelector* window_selector_;
+ // If true, mask the original window header while in overview and make corners
+ // rounded using a mask layer. This has performance implications so it can be
+ // disabled when there are many windows.
+ static bool use_mask_;
+
+ // If true, hide the original window header while in overview using alpha
+ // shape. This has performance implications so it can be disabled when there
+ // are many windows.
+ static bool use_shape_;
+
DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem);
};
« no previous file with comments | « ash/common/wm/overview/window_grid.cc ('k') | ash/common/wm/overview/window_selector_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698