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

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

Issue 2452483002: Move GpuMemoryBufferManager and SharedBitmapManager to CompositorFrameSink (Closed)
Patch Set: rebase Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/render_widget_mus_connection.h" 5 #include "content/renderer/mus/render_widget_mus_connection.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 22 matching lines...) Expand all
33 render_thread->compositor_task_runner(), std::move(request), 33 render_thread->compositor_task_runner(), std::move(request),
34 render_thread->input_handler_manager()); 34 render_thread->input_handler_manager());
35 if (window_compositor_frame_sink_binding_) { 35 if (window_compositor_frame_sink_binding_) {
36 compositor_mus_connection_->AttachCompositorFrameSinkOnMainThread( 36 compositor_mus_connection_->AttachCompositorFrameSinkOnMainThread(
37 std::move(window_compositor_frame_sink_binding_)); 37 std::move(window_compositor_frame_sink_binding_));
38 } 38 }
39 } 39 }
40 40
41 std::unique_ptr<cc::CompositorFrameSink> 41 std::unique_ptr<cc::CompositorFrameSink>
42 RenderWidgetMusConnection::CreateCompositorFrameSink( 42 RenderWidgetMusConnection::CreateCompositorFrameSink(
43 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host) { 43 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host,
44 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) {
44 DCHECK(thread_checker_.CalledOnValidThread()); 45 DCHECK(thread_checker_.CalledOnValidThread());
45 DCHECK(!window_compositor_frame_sink_binding_); 46 DCHECK(!window_compositor_frame_sink_binding_);
46 47
47 std::unique_ptr<cc::CompositorFrameSink> compositor_frame_sink( 48 std::unique_ptr<cc::CompositorFrameSink> compositor_frame_sink(
48 ui::WindowCompositorFrameSink::Create( 49 ui::WindowCompositorFrameSink::Create(
49 make_scoped_refptr( 50 make_scoped_refptr(
50 new ui::ContextProvider(std::move(gpu_channel_host))), 51 new ui::ContextProvider(std::move(gpu_channel_host))),
51 &window_compositor_frame_sink_binding_)); 52 gpu_memory_buffer_manager, &window_compositor_frame_sink_binding_));
52 if (compositor_mus_connection_) { 53 if (compositor_mus_connection_) {
53 compositor_mus_connection_->AttachCompositorFrameSinkOnMainThread( 54 compositor_mus_connection_->AttachCompositorFrameSinkOnMainThread(
54 std::move(window_compositor_frame_sink_binding_)); 55 std::move(window_compositor_frame_sink_binding_));
55 } 56 }
56 return compositor_frame_sink; 57 return compositor_frame_sink;
57 } 58 }
58 59
59 // static 60 // static
60 RenderWidgetMusConnection* RenderWidgetMusConnection::Get(int routing_id) { 61 RenderWidgetMusConnection* RenderWidgetMusConnection::Get(int routing_id) {
61 auto it = g_connections.Get().find(routing_id); 62 auto it = g_connections.Get().find(routing_id);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // previous event. 170 // previous event.
170 // DCHECK(pending_ack_.is_null()); 171 // DCHECK(pending_ack_.is_null());
171 pending_ack_ = ack; 172 pending_ack_ = ack;
172 // TODO(fsamuel, sadrul): Track real latency info. 173 // TODO(fsamuel, sadrul): Track real latency info.
173 ui::LatencyInfo latency_info; 174 ui::LatencyInfo latency_info;
174 input_handler_->HandleInputEvent(*input_event, latency_info, 175 input_handler_->HandleInputEvent(*input_event, latency_info,
175 DISPATCH_TYPE_BLOCKING); 176 DISPATCH_TYPE_BLOCKING);
176 } 177 }
177 178
178 } // namespace content 179 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/mus/render_widget_mus_connection.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698