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

Unified Diff: ash/wm/window_mirror_view.h

Issue 2190963002: Ash window cycle ui: don't create mirrored layers for previews until (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: loc-- Created 4 years, 4 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/aura/wm_window_aura.cc ('k') | ash/wm/window_mirror_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_mirror_view.h
diff --git a/ash/wm/window_mirror_view.h b/ash/wm/window_mirror_view.h
index 268ea10833bfa23c326e37cc636aad96c6a692cb..c59297f6a7ec48e524935c387d4115e1c602a723 100644
--- a/ash/wm/window_mirror_view.h
+++ b/ash/wm/window_mirror_view.h
@@ -29,16 +29,18 @@ class WindowMirrorView : public views::View, public ::wm::LayerDelegateFactory {
explicit WindowMirrorView(WmWindowAura* window);
~WindowMirrorView() override;
- void Init();
-
// views::View:
gfx::Size GetPreferredSize() const override;
void Layout() override;
+ bool GetNeedsNotificationWhenVisibleBoundsChange() const override;
+ void OnVisibleBoundsChanged() override;
// ::wm::LayerDelegateFactory:
ui::LayerDelegate* CreateDelegate(ui::LayerDelegate* delegate) override;
private:
+ void InitLayerOwner();
+
// Gets the root of the layer tree that was lifted from |target_| (and is now
// a child of |this->layer()|).
ui::Layer* GetMirrorLayer();
@@ -46,7 +48,8 @@ class WindowMirrorView : public views::View, public ::wm::LayerDelegateFactory {
// The original window that is being represented by |this|.
WmWindowAura* target_;
- // Retains ownership of the mirror layer tree.
+ // Retains ownership of the mirror layer tree. This is lazily initialized
+ // the first time the view becomes visible.
std::unique_ptr<ui::LayerTreeOwner> layer_owner_;
std::vector<std::unique_ptr<ForwardingLayerDelegate>> delegates_;
« no previous file with comments | « ash/aura/wm_window_aura.cc ('k') | ash/wm/window_mirror_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698