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

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

Issue 2797453002: Rename DisplayCompositor to MojoFrameSinkManager. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « services/ui/ws/gpu_host.h ('k') | services/ui/ws/server_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/gpu_host.h" 5 #include "services/ui/ws/gpu_host.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 11 matching lines...) Expand all
22 22
23 #if defined(OS_WIN) 23 #if defined(OS_WIN)
24 #include "ui/gfx/win/rendering_window_manager.h" 24 #include "ui/gfx/win/rendering_window_manager.h"
25 #endif 25 #endif
26 26
27 namespace ui { 27 namespace ui {
28 namespace ws { 28 namespace ws {
29 29
30 namespace { 30 namespace {
31 31
32 // The client Id 1 is reserved for the display compositor. 32 // The client Id 1 is reserved for the frame sink manager.
33 const int32_t kInternalGpuChannelClientId = 2; 33 const int32_t kInternalGpuChannelClientId = 2;
34 34
35 } // namespace 35 } // namespace
36 36
37 GpuHost::GpuHost(GpuHostDelegate* delegate) 37 GpuHost::GpuHost(GpuHostDelegate* delegate)
38 : delegate_(delegate), 38 : delegate_(delegate),
39 next_client_id_(kInternalGpuChannelClientId + 1), 39 next_client_id_(kInternalGpuChannelClientId + 1),
40 main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()), 40 main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()),
41 gpu_host_binding_(this) { 41 gpu_host_binding_(this) {
42 // TODO(sad): Once GPU process is split, this would look like: 42 // TODO(sad): Once GPU process is split, this would look like:
(...skipping 22 matching lines...) Expand all
65 gfx::RenderingWindowManager::GetInstance()->RegisterParent(widget); 65 gfx::RenderingWindowManager::GetInstance()->RegisterParent(widget);
66 #endif 66 #endif
67 } 67 }
68 68
69 void GpuHost::OnAcceleratedWidgetDestroyed(gfx::AcceleratedWidget widget) { 69 void GpuHost::OnAcceleratedWidgetDestroyed(gfx::AcceleratedWidget widget) {
70 #if defined(OS_WIN) 70 #if defined(OS_WIN)
71 gfx::RenderingWindowManager::GetInstance()->UnregisterParent(widget); 71 gfx::RenderingWindowManager::GetInstance()->UnregisterParent(widget);
72 #endif 72 #endif
73 } 73 }
74 74
75 void GpuHost::CreateDisplayCompositor( 75 void GpuHost::CreateFrameSinkManager(
76 cc::mojom::DisplayCompositorRequest request, 76 cc::mojom::FrameSinkManagerRequest request,
77 cc::mojom::DisplayCompositorClientPtr client) { 77 cc::mojom::FrameSinkManagerClientPtr client) {
78 gpu_main_->CreateDisplayCompositor(std::move(request), std::move(client)); 78 gpu_main_->CreateFrameSinkManager(std::move(request), std::move(client));
79 } 79 }
80 80
81 GpuClient* GpuHost::AddInternal(mojom::GpuRequest request) { 81 GpuClient* GpuHost::AddInternal(mojom::GpuRequest request) {
82 auto client(base::MakeUnique<GpuClient>(next_client_id_++, &gpu_info_, 82 auto client(base::MakeUnique<GpuClient>(next_client_id_++, &gpu_info_,
83 gpu_memory_buffer_manager_.get(), 83 gpu_memory_buffer_manager_.get(),
84 gpu_service_.get())); 84 gpu_service_.get()));
85 GpuClient* client_ref = client.get(); 85 GpuClient* client_ref = client.get();
86 gpu_bindings_.AddBinding(std::move(client), std::move(request)); 86 gpu_bindings_.AddBinding(std::move(client), std::move(request));
87 return client_ref; 87 return client_ref;
88 } 88 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 void GpuHost::StoreShaderToDisk(int32_t client_id, 136 void GpuHost::StoreShaderToDisk(int32_t client_id,
137 const std::string& key, 137 const std::string& key,
138 const std::string& shader) {} 138 const std::string& shader) {}
139 139
140 void GpuHost::RecordLogMessage(int32_t severity, 140 void GpuHost::RecordLogMessage(int32_t severity,
141 const std::string& header, 141 const std::string& header,
142 const std::string& message) {} 142 const std::string& message) {}
143 143
144 } // namespace ws 144 } // namespace ws
145 } // namespace ui 145 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/gpu_host.h ('k') | services/ui/ws/server_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698