Commit b622b0bb authored by reveman's avatar reveman Committed by Commit bot

exo: Make sure vsync observer is removed when Surface is destroyed.

If the window is still in the tree when Surface is destroyed
then we need to remove the vsync observer in the dtor.

BUG=679787

Review-Url: https://codereview.chromium.org/2627713004
Cr-Commit-Position: refs/heads/master@{#442996}
parent b322c318
...@@ -205,6 +205,8 @@ Surface::~Surface() { ...@@ -205,6 +205,8 @@ Surface::~Surface() {
observer.OnSurfaceDestroying(this); observer.OnSurfaceDestroying(this);
window_->RemoveObserver(this); window_->RemoveObserver(this);
if (window_->layer()->GetCompositor())
window_->layer()->GetCompositor()->vsync_manager()->RemoveObserver(this);
window_->layer()->SetShowSolidColorContent(); window_->layer()->SetShowSolidColorContent();
frame_callbacks_.splice(frame_callbacks_.end(), pending_frame_callbacks_); frame_callbacks_.splice(frame_callbacks_.end(), pending_frame_callbacks_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment