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

Unified Diff: ash/wm/window_animations.cc

Issue 2444563002: cc: Remove "SwapBuffers" naming from LayerTreeHostSingleThreadClient (Closed)
Patch Set: swapsinglethread: fix-name-in-browsertest Created 4 years, 2 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 | « no previous file | blimp/client/support/compositor/blimp_embedder_compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_animations.cc
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
index f8eb4094dc9a4ac65de4b95687235209021e3210..d10dca36819c4e45983b351395f0f5194a2f339f 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -249,10 +249,9 @@ bool AnimateHideWindow(aura::Window* window) {
}
// Observer for a window cross-fade animation. If either the window closes or
-// the layer's animation completes or compositing is aborted due to GPU crash,
-// it deletes the layer and removes itself as an observer.
-class CrossFadeObserver : public ui::CompositorObserver,
- public aura::WindowObserver,
+// the layer's animation completes, it deletes the layer and removes itself as
+// an observer.
+class CrossFadeObserver : public aura::WindowObserver,
public ui::ImplicitAnimationObserver {
public:
// Observes |window| for destruction, but does not take ownership.
@@ -261,26 +260,12 @@ class CrossFadeObserver : public ui::CompositorObserver,
std::unique_ptr<ui::LayerTreeOwner> layer_owner)
: window_(window), layer_owner_(std::move(layer_owner)) {
window_->AddObserver(this);
- layer_owner_->root()->GetCompositor()->AddObserver(this);
}
~CrossFadeObserver() override {
window_->RemoveObserver(this);
window_ = NULL;
- layer_owner_->root()->GetCompositor()->RemoveObserver(this);
}
- // ui::CompositorObserver overrides:
- void OnCompositingDidCommit(ui::Compositor* compositor) override {}
- void OnCompositingStarted(ui::Compositor* compositor,
- base::TimeTicks start_time) override {}
- void OnCompositingEnded(ui::Compositor* compositor) override {}
- void OnCompositingAborted(ui::Compositor* compositor) override {
- // Triggers OnImplicitAnimationsCompleted() to be called and deletes us.
- layer_owner_->root()->GetAnimator()->StopAnimating();
- }
- void OnCompositingLockStateChanged(ui::Compositor* compositor) override {}
- void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
-
// aura::WindowObserver overrides:
void OnWindowDestroying(aura::Window* window) override {
// Triggers OnImplicitAnimationsCompleted() to be called and deletes us.
« no previous file with comments | « no previous file | blimp/client/support/compositor/blimp_embedder_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698