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

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

Issue 2923583002: Remove RendererCompositorFrameSink and use ClientCompositorFrameSink instead (Closed)
Patch Set: Fix windows Created 3 years, 6 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
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 "components/viz/client/client_compositor_frame_sink.h" 12 #include "components/viz/client/client_compositor_frame_sink.h"
13 #include "components/viz/client/local_surface_id_provider.h"
13 14
14 namespace content { 15 namespace content {
15 16
16 namespace { 17 namespace {
17 typedef std::map<int, RendererWindowTreeClient*> ConnectionMap; 18 typedef std::map<int, RendererWindowTreeClient*> ConnectionMap;
18 base::LazyInstance<ConnectionMap>::Leaky g_connections = 19 base::LazyInstance<ConnectionMap>::Leaky g_connections =
19 LAZY_INSTANCE_INITIALIZER; 20 LAZY_INSTANCE_INITIALIZER;
20 } // namespace 21 } // namespace
21 22
22 // static 23 // static
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 cc::mojom::MojoCompositorFrameSinkRequest sink_request = 81 cc::mojom::MojoCompositorFrameSinkRequest sink_request =
81 mojo::MakeRequest(&sink_info); 82 mojo::MakeRequest(&sink_info);
82 cc::mojom::MojoCompositorFrameSinkClientPtr client; 83 cc::mojom::MojoCompositorFrameSinkClientPtr client;
83 cc::mojom::MojoCompositorFrameSinkClientRequest client_request = 84 cc::mojom::MojoCompositorFrameSinkClientRequest client_request =
84 mojo::MakeRequest(&client); 85 mojo::MakeRequest(&client);
85 constexpr bool enable_surface_synchronization = true; 86 constexpr bool enable_surface_synchronization = true;
86 auto frame_sink = base::MakeUnique<viz::ClientCompositorFrameSink>( 87 auto frame_sink = base::MakeUnique<viz::ClientCompositorFrameSink>(
87 std::move(context_provider), nullptr /* worker_context_provider */, 88 std::move(context_provider), nullptr /* worker_context_provider */,
88 gpu_memory_buffer_manager, nullptr /* shared_bitmap_manager */, 89 gpu_memory_buffer_manager, nullptr /* shared_bitmap_manager */,
89 nullptr /* synthetic_begin_frame_source */, std::move(sink_info), 90 nullptr /* synthetic_begin_frame_source */, std::move(sink_info),
90 std::move(client_request), enable_surface_synchronization); 91 std::move(client_request),
92 base::MakeUnique<viz::DefaultLocalSurfaceIdProvider>(),
93 enable_surface_synchronization);
91 tree_->AttachCompositorFrameSink(root_window_id_, std::move(sink_request), 94 tree_->AttachCompositorFrameSink(root_window_id_, std::move(sink_request),
92 std::move(client)); 95 std::move(client));
93 callback.Run(std::move(frame_sink)); 96 callback.Run(std::move(frame_sink));
94 } 97 }
95 98
96 void RendererWindowTreeClient::DestroySelf() { 99 void RendererWindowTreeClient::DestroySelf() {
97 delete this; 100 delete this;
98 } 101 }
99 102
100 void RendererWindowTreeClient::OnEmbed( 103 void RendererWindowTreeClient::OnEmbed(
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 bool success) {} 269 bool success) {}
267 270
268 void RendererWindowTreeClient::RequestClose(uint32_t window_id) {} 271 void RendererWindowTreeClient::RequestClose(uint32_t window_id) {}
269 272
270 void RendererWindowTreeClient::GetWindowManager( 273 void RendererWindowTreeClient::GetWindowManager(
271 mojo::AssociatedInterfaceRequest<ui::mojom::WindowManager> internal) { 274 mojo::AssociatedInterfaceRequest<ui::mojom::WindowManager> internal) {
272 NOTREACHED(); 275 NOTREACHED();
273 } 276 }
274 277
275 } // namespace content 278 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/renderer_compositor_frame_sink.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698