Index: services/ui/ws/window_server.cc |
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc |
index b589f61554d4d335f741ecd7f77f81022a9082f6..3d0940d2bb1f9c854601554c14c966367cfea2b5 100644 |
--- a/services/ui/ws/window_server.cc |
+++ b/services/ui/ws/window_server.cc |
@@ -56,11 +56,10 @@ WindowServer::WindowServer(WindowServerDelegate* delegate) |
next_wm_change_id_(0), |
gpu_proxy_(new GpuServiceProxy(this)), |
window_manager_window_tree_factory_set_(this, &user_id_tracker_), |
- display_compositor_client_binding_(this), |
- display_compositor_(new DisplayCompositor( |
- display_compositor_client_binding_.CreateInterfacePtrAndBind())) { |
+ display_compositor_client_binding_(this) { |
user_id_tracker_.AddObserver(this); |
OnUserIdAdded(user_id_tracker_.active_id()); |
+ display_compositor_request_ = mojo::GetProxy(&display_compositor_); |
} |
WindowServer::~WindowServer() { |
@@ -496,8 +495,6 @@ WindowTree* WindowServer::GetCurrentDragLoopInitiator() { |
} |
void WindowServer::OnDisplayReady(Display* display, bool is_first) { |
rjkroege
2016/11/21 23:05:36
Please explain the thread startup ordering. Partic
Fady Samuel
2016/11/22 01:02:23
Done.
|
- if (gpu_channel_) |
- display->platform_display()->OnGpuChannelEstablished(gpu_channel_); |
if (is_first) |
delegate_->OnFirstDisplayReady(); |
} |
@@ -512,7 +509,7 @@ WindowManagerState* WindowServer::GetWindowManagerStateForUser( |
user_id); |
} |
-ui::DisplayCompositor* WindowServer::GetDisplayCompositor() { |
+cc::mojom::DisplayCompositor* WindowServer::GetDisplayCompositor() { |
return display_compositor_.get(); |
} |
@@ -745,12 +742,10 @@ void WindowServer::OnTransientWindowRemoved(ServerWindow* window, |
} |
} |
-void WindowServer::OnGpuChannelEstablished( |
- scoped_refptr<gpu::GpuChannelHost> gpu_channel) { |
- gpu_channel_ = std::move(gpu_channel); |
- const std::set<Display*>& displays = display_manager()->displays(); |
- for (auto* display : displays) |
- display->platform_display()->OnGpuChannelEstablished(gpu_channel_); |
+void WindowServer::OnGpuServiceInitialized() { |
rjkroege
2016/11/21 23:05:36
the declaration of this method requires more docum
Fady Samuel
2016/11/22 01:02:23
Done.
|
+ gpu_proxy_->CreateDisplayCompositor( |
+ std::move(display_compositor_request_), |
+ display_compositor_client_binding_.CreateInterfacePtrAndBind()); |
// TODO(kylechar): When gpu channel is removed, this can instead happen |
// earlier, after GpuServiceProxy::OnInitialized(). |
delegate_->StartDisplayInit(); |