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

Side by Side Diff: content/renderer/mus/renderer_window_tree_client.cc

Issue 2907683004: Move ClientCompositorFrameSink to components/viz (Closed)
Patch Set: c Created 3 years, 7 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 | « content/renderer/mus/renderer_window_tree_client.h ('k') | services/ui/public/cpp/BUILD.gn » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "content/renderer/mus/renderer_window_tree_client.h" 5 #include "content/renderer/mus/renderer_window_tree_client.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "cc/base/switches.h" 11 #include "cc/base/switches.h"
12 #include "services/ui/public/cpp/client_compositor_frame_sink.h" 12 #include "components/viz/client/client_compositor_frame_sink.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 namespace { 16 namespace {
17 typedef std::map<int, RendererWindowTreeClient*> ConnectionMap; 17 typedef std::map<int, RendererWindowTreeClient*> ConnectionMap;
18 base::LazyInstance<ConnectionMap>::Leaky g_connections = 18 base::LazyInstance<ConnectionMap>::Leaky g_connections =
19 LAZY_INSTANCE_INITIALIZER; 19 LAZY_INSTANCE_INITIALIZER;
20 } // namespace 20 } // namespace
21 21
22 // static 22 // static
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 const CompositorFrameSinkCallback& callback) { 78 const CompositorFrameSinkCallback& callback) {
79 cc::mojom::MojoCompositorFrameSinkPtrInfo sink_info; 79 cc::mojom::MojoCompositorFrameSinkPtrInfo sink_info;
80 cc::mojom::MojoCompositorFrameSinkRequest sink_request = 80 cc::mojom::MojoCompositorFrameSinkRequest sink_request =
81 mojo::MakeRequest(&sink_info); 81 mojo::MakeRequest(&sink_info);
82 cc::mojom::MojoCompositorFrameSinkClientPtr client; 82 cc::mojom::MojoCompositorFrameSinkClientPtr client;
83 cc::mojom::MojoCompositorFrameSinkClientRequest client_request = 83 cc::mojom::MojoCompositorFrameSinkClientRequest client_request =
84 mojo::MakeRequest(&client); 84 mojo::MakeRequest(&client);
85 bool enable_surface_synchronization = 85 bool enable_surface_synchronization =
86 base::CommandLine::ForCurrentProcess()->HasSwitch( 86 base::CommandLine::ForCurrentProcess()->HasSwitch(
87 cc::switches::kEnableSurfaceSynchronization); 87 cc::switches::kEnableSurfaceSynchronization);
88 auto frame_sink = base::MakeUnique<ui::ClientCompositorFrameSink>( 88 auto frame_sink = base::MakeUnique<viz::ClientCompositorFrameSink>(
89 std::move(context_provider), gpu_memory_buffer_manager, 89 std::move(context_provider), gpu_memory_buffer_manager,
90 std::move(sink_info), std::move(client_request), 90 std::move(sink_info), std::move(client_request),
91 enable_surface_synchronization); 91 enable_surface_synchronization);
92 tree_->AttachCompositorFrameSink(root_window_id_, std::move(sink_request), 92 tree_->AttachCompositorFrameSink(root_window_id_, std::move(sink_request),
93 std::move(client)); 93 std::move(client));
94 callback.Run(std::move(frame_sink)); 94 callback.Run(std::move(frame_sink));
95 } 95 }
96 96
97 void RendererWindowTreeClient::DestroySelf() { 97 void RendererWindowTreeClient::DestroySelf() {
98 delete this; 98 delete this;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 bool success) {} 262 bool success) {}
263 263
264 void RendererWindowTreeClient::RequestClose(uint32_t window_id) {} 264 void RendererWindowTreeClient::RequestClose(uint32_t window_id) {}
265 265
266 void RendererWindowTreeClient::GetWindowManager( 266 void RendererWindowTreeClient::GetWindowManager(
267 mojo::AssociatedInterfaceRequest<ui::mojom::WindowManager> internal) { 267 mojo::AssociatedInterfaceRequest<ui::mojom::WindowManager> internal) {
268 NOTREACHED(); 268 NOTREACHED();
269 } 269 }
270 270
271 } // namespace content 271 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/mus/renderer_window_tree_client.h ('k') | services/ui/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698