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

Unified Diff: ash/common/wm/overview/scoped_transform_overview_window.cc

Issue 2148703002: [ash-md] Fixes a bug with setting window shape to mask header in overview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Fixes a bug with setting window shape to mask header in overview (rebased) 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/scoped_transform_overview_window.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/overview/scoped_transform_overview_window.cc
diff --git a/ash/common/wm/overview/scoped_transform_overview_window.cc b/ash/common/wm/overview/scoped_transform_overview_window.cc
index 0a13bf6ee889fa514797bd31c41282b49b4089e9..d68159fb6050ba0cabf9f7cafa68e5a84f7eb2cd 100644
--- a/ash/common/wm/overview/scoped_transform_overview_window.cc
+++ b/ash/common/wm/overview/scoped_transform_overview_window.cc
@@ -248,6 +248,7 @@ base::Closure ScopedTransformOverviewWindow::OverviewContentMask::
ScopedTransformOverviewWindow::ScopedTransformOverviewWindow(WmWindow* window)
: window_(window),
+ determined_original_window_shape_(false),
minimized_(window->GetShowState() == ui::SHOW_STATE_MINIMIZED),
ignored_by_shelf_(window->GetWindowState()->ignored_by_shelf()),
overview_started_(false),
@@ -416,9 +417,12 @@ void ScopedTransformOverviewWindow::SetTransform(
mask_->set_radius(radius);
window()->GetLayer()->SchedulePaint(bounds);
- SkRegion* window_shape = window()->GetLayer()->alpha_shape();
- if (!original_window_shape_ && window_shape)
- original_window_shape_.reset(new SkRegion(*window_shape));
+ if (!determined_original_window_shape_) {
+ determined_original_window_shape_ = true;
+ SkRegion* window_shape = window()->GetLayer()->alpha_shape();
+ if (!original_window_shape_ && window_shape)
+ original_window_shape_.reset(new SkRegion(*window_shape));
+ }
const int inset =
window()->GetIntProperty(WmWindowProperty::TOP_VIEW_INSET);
if (inset > 0) {
« no previous file with comments | « ash/common/wm/overview/scoped_transform_overview_window.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698