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

Side by Side Diff: ui/wm/core/shadow.cc

Issue 2239233002: [ash-md] Fades overview header in and out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Fades overview header in and out (rebase) Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/wm/core/shadow.h" 5 #include "ui/wm/core/shadow.h"
6 6
7 #include "third_party/skia/include/core/SkBitmap.h" 7 #include "third_party/skia/include/core/SkBitmap.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/compositor/layer.h" 9 #include "ui/compositor/layer.h"
10 #include "ui/compositor/scoped_layer_animation_settings.h" 10 #include "ui/compositor/scoped_layer_animation_settings.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 int aperture_y = std::min(aperture, layer_bounds.height() / 2); 188 int aperture_y = std::min(aperture, layer_bounds.height() / 2);
189 gfx::Rect aperture_rect(aperture_x, aperture_y, 189 gfx::Rect aperture_rect(aperture_x, aperture_y,
190 image_size_.width() - aperture_x * 2, 190 image_size_.width() - aperture_x * 2,
191 image_size_.height() - aperture_y * 2); 191 image_size_.height() - aperture_y * 2);
192 192
193 shadow_layer_->UpdateNinePatchLayerAperture(aperture_rect); 193 shadow_layer_->UpdateNinePatchLayerAperture(aperture_rect);
194 shadow_layer_->UpdateNinePatchLayerBorder( 194 shadow_layer_->UpdateNinePatchLayerBorder(
195 gfx::Rect(aperture_x, aperture_y, aperture_x * 2, aperture_y * 2)); 195 gfx::Rect(aperture_x, aperture_y, aperture_x * 2, aperture_y * 2));
196 196
197 // The content bounds in the shadow's layer space are offsetted by 197 // The content bounds in the shadow's layer space are offsetted by
198 // |interior_inset_|. The occlusion area also has to be shrinked to 198 // |interior_inset_|. The occlusion area also has to be shrunk to
199 // allow rounded corners overdrawing on top of the window's content. 199 // allow rounded corners overdrawing on top of the window's content.
200 gfx::Rect content_bounds( 200 gfx::Rect content_bounds(
201 content_bounds_.x() + interior_inset_ + kRoundedCornerRadius, 201 interior_inset_ + kRoundedCornerRadius,
202 content_bounds_.y() + interior_inset_ + kRoundedCornerRadius, 202 interior_inset_ + kRoundedCornerRadius,
varkha 2016/09/02 11:22:51 This small bug is fairly recent - https://coderevi
varkha 2016/09/02 15:43:56 Done. https://codereview.chromium.org/2302773005/
203 content_bounds_.width() - 2 * kRoundedCornerRadius, 203 content_bounds_.width() - 2 * kRoundedCornerRadius,
204 content_bounds_.height() - 2 * kRoundedCornerRadius); 204 content_bounds_.height() - 2 * kRoundedCornerRadius);
205 shadow_layer_->UpdateNinePatchOcclusion(content_bounds); 205 shadow_layer_->UpdateNinePatchOcclusion(content_bounds);
206 } 206 }
207 207
208 } // namespace wm 208 } // namespace wm
OLDNEW
« ash/common/wm/overview/window_selector_item.cc ('K') | « ui/aura/client/aura_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698