Index: services/ui/ws/window_server.cc |
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc |
index f4d960a65c3c858f7f588d525afbef07bb726961..8d986d295898af001a85cd12808b536ad675df97 100644 |
--- a/services/ui/ws/window_server.cc |
+++ b/services/ui/ws/window_server.cc |
@@ -59,7 +59,14 @@ WindowServer::WindowServer(WindowServerDelegate* delegate) |
display_compositor_client_binding_(this) { |
user_id_tracker_.AddObserver(this); |
OnUserIdAdded(user_id_tracker_.active_id()); |
- display_compositor_request_ = mojo::GetProxy(&display_compositor_); |
+ // The display compositor gets its own thread in mus-gpu. The gpu service, |
+ // where GL commands are processed resides on its own thread. Various |
+ // components of the display compositor such as Display, ResourceProvider, |
+ // and GLRenderer block on sync tokens from other command buffers. Thus, |
+ // the gpu service must live on a separate thread. |
sadrul
2016/11/30 21:05:55
This comment should in gpu_main.cc, right? It seem
Fady Samuel
2016/11/30 22:53:20
Done.
|
+ gpu_proxy_->CreateDisplayCompositor( |
+ mojo::GetProxy(&display_compositor_), |
+ display_compositor_client_binding_.CreateInterfacePtrAndBind()); |
} |
WindowServer::~WindowServer() { |
@@ -743,21 +750,6 @@ void WindowServer::OnTransientWindowRemoved(ServerWindow* window, |
} |
void WindowServer::OnGpuServiceInitialized() { |
- // TODO(fsamuel): Currently we: 1. create the gpu service, 2. we initialize |
- // GL and then 3. we request a display compositor interface after |
- // initialization. A display compositor interface can be created at any time, |
- // even prior to completing initialization. If initialization crashes the GPU |
- // process, then we will still get a connection error on the |
- // |display_compositor_client_binding_| binding. We should investigate doing |
- // this in parallel with initialization in the future. |
- // The display compositor gets its own thread in mus-gpu. The gpu service, |
- // where GL commands are processed resides on its own thread. Various |
- // components of the display compositor such as Display, ResourceProvider, |
- // and GLRenderer block on sync tokens from other command buffers. Thus, |
- // the gpu service must live on a separate thread. |
- 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(); |