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

Unified Diff: ui/wm/core/shadow.h

Issue 2562143002: Update WM shadow transitions. (Closed)
Patch Set: review feedback Created 4 years 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 | « no previous file | ui/wm/core/shadow.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/shadow.h
diff --git a/ui/wm/core/shadow.h b/ui/wm/core/shadow.h
index e0b7a1db301c88aa440c6d48f9091a6ef4348a72..24fbfed94d6308f935c0c508dd11863b6d4af879 100644
--- a/ui/wm/core/shadow.h
+++ b/ui/wm/core/shadow.h
@@ -62,8 +62,8 @@ class WM_EXPORT Shadow : public ui::ImplicitAnimationObserver {
void OnImplicitAnimationsCompleted() override;
private:
- // Updates the shadow images to the current |style_|.
- void UpdateImagesForStyle();
+ // Updates the shadow layer and its image to the current |style_|.
+ void RecreateShadowLayer();
// Updates the shadow layer bounds based on the inteior inset and the current
// |content_bounds_|.
@@ -84,6 +84,10 @@ class WM_EXPORT Shadow : public ui::ImplicitAnimationObserver {
// The actual shadow layer corresponding to a cc::NinePatchLayer.
std::unique_ptr<ui::Layer> shadow_layer_;
+ // When the style changes, the old shadow cross-fades with the new one.
+ // When non-null, this is an old |shadow_layer_| that's being animated out.
+ std::unique_ptr<ui::Layer> fading_layer_;
+
// Bounds of the content that the shadow encloses.
gfx::Rect content_bounds_;
« no previous file with comments | « no previous file | ui/wm/core/shadow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698