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

Side by Side Diff: services/ui/ws/window_server.cc

Issue 2503923003: Demonstrate external-window-mode in mus-demo (Closed)
Patch Set: Wrap comment Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/ws/window_server.h" 5 #include "services/ui/ws/window_server.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 // The display compositor gets its own thread in mus-gpu. The gpu service, 753 // The display compositor gets its own thread in mus-gpu. The gpu service,
754 // where GL commands are processed resides on its own thread. Various 754 // where GL commands are processed resides on its own thread. Various
755 // components of the display compositor such as Display, ResourceProvider, 755 // components of the display compositor such as Display, ResourceProvider,
756 // and GLRenderer block on sync tokens from other command buffers. Thus, 756 // and GLRenderer block on sync tokens from other command buffers. Thus,
757 // the gpu service must live on a separate thread. 757 // the gpu service must live on a separate thread.
758 gpu_proxy_->CreateDisplayCompositor( 758 gpu_proxy_->CreateDisplayCompositor(
759 std::move(display_compositor_request_), 759 std::move(display_compositor_request_),
760 display_compositor_client_binding_.CreateInterfacePtrAndBind()); 760 display_compositor_client_binding_.CreateInterfacePtrAndBind());
761 // TODO(kylechar): When gpu channel is removed, this can instead happen 761 // TODO(kylechar): When gpu channel is removed, this can instead happen
762 // earlier, after GpuServiceProxy::OnInitialized(). 762 // earlier, after GpuServiceProxy::OnInitialized().
763 delegate_->StartDisplayInit(); 763 bool window_manager_connected = false;
764 for (auto* factory : window_manager_window_tree_factory_set_.GetFactories()) {
765 if (factory->window_tree()) {
766 window_manager_connected = true;
767 break;
768 }
769 }
770 delegate_->StartDisplayInit(window_manager_connected);
764 } 771 }
765 772
766 void WindowServer::OnSurfaceCreated(const cc::SurfaceId& surface_id, 773 void WindowServer::OnSurfaceCreated(const cc::SurfaceId& surface_id,
767 const gfx::Size& frame_size, 774 const gfx::Size& frame_size,
768 float device_scale_factor) { 775 float device_scale_factor) {
769 WindowId window_id( 776 WindowId window_id(
770 WindowIdFromTransportId(surface_id.frame_sink_id().client_id())); 777 WindowIdFromTransportId(surface_id.frame_sink_id().client_id()));
771 mojom::CompositorFrameSinkType compositor_frame_sink_type( 778 mojom::CompositorFrameSinkType compositor_frame_sink_type(
772 static_cast<mojom::CompositorFrameSinkType>( 779 static_cast<mojom::CompositorFrameSinkType>(
773 surface_id.frame_sink_id().sink_id())); 780 surface_id.frame_sink_id().sink_id()));
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 void WindowServer::OnUserIdAdded(const UserId& id) { 821 void WindowServer::OnUserIdAdded(const UserId& id) {
815 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr); 822 activity_monitor_map_[id] = base::MakeUnique<UserActivityMonitor>(nullptr);
816 } 823 }
817 824
818 void WindowServer::OnUserIdRemoved(const UserId& id) { 825 void WindowServer::OnUserIdRemoved(const UserId& id) {
819 activity_monitor_map_.erase(id); 826 activity_monitor_map_.erase(id);
820 } 827 }
821 828
822 } // namespace ws 829 } // namespace ws
823 } // namespace ui 830 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698