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

Unified Diff: services/ui/ws/display.cc

Issue 2400723003: Mus+Ash: Use standard cc mechanism for surface lifetime. (Closed)
Patch Set: Only AddObserver once 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 | « services/ui/ws/display.h ('k') | services/ui/ws/frame_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/display.cc
diff --git a/services/ui/ws/display.cc b/services/ui/ws/display.cc
index 36c21101ff5d1e6a957699423a5f2d45f2b3e801..261c1efb8675860844de2b76468ba24bee2e8e55 100644
--- a/services/ui/ws/display.cc
+++ b/services/ui/ws/display.cc
@@ -54,9 +54,6 @@ Display::~Display() {
focus_controller_.reset();
}
- for (ServerWindow* window : windows_needing_frame_destruction_)
- window->RemoveObserver(this);
-
if (!binding_) {
for (auto& pair : window_manager_display_root_map_)
pair.second->window_manager_state()->OnDisplayDestroying(this);
@@ -119,17 +116,6 @@ void Display::SchedulePaint(const ServerWindow* window,
platform_display_->SchedulePaint(window, bounds);
}
-void Display::ScheduleSurfaceDestruction(ServerWindow* window) {
- if (!platform_display_->IsFramePending()) {
- window->DestroySurfacesScheduledForDestruction();
- return;
- }
- if (windows_needing_frame_destruction_.count(window))
- return;
- windows_needing_frame_destruction_.insert(window);
- window->AddObserver(this);
-}
-
display::Display::Rotation Display::GetRotation() const {
return platform_display_->GetRotation();
}
@@ -336,15 +322,6 @@ void Display::OnViewportMetricsChanged(const ViewportMetrics& old_metrics,
display_manager()->OnDisplayUpdate(this);
}
-void Display::OnCompositorFrameDrawn() {
- std::set<ServerWindow*> windows;
- windows.swap(windows_needing_frame_destruction_);
- for (ServerWindow* window : windows) {
- window->RemoveObserver(this);
- window->DestroySurfacesScheduledForDestruction();
- }
-}
-
bool Display::CanHaveActiveChildren(ServerWindow* window) const {
return window && activation_parents_.Contains(window);
}
@@ -418,11 +395,6 @@ void Display::OnFocusChanged(FocusControllerChangeSource change_source,
new_focused_window->text_input_state());
}
-void Display::OnWindowDestroyed(ServerWindow* window) {
- windows_needing_frame_destruction_.erase(window);
- window->RemoveObserver(this);
-}
-
void Display::OnUserIdRemoved(const UserId& id) {
window_manager_display_root_map_.erase(id);
}
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/frame_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698