OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/gpu/compositor_output_surface.h" | 5 #include "content/renderer/gpu/compositor_output_surface.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "gpu/ipc/client/command_buffer_proxy_impl.h" | 26 #include "gpu/ipc/client/command_buffer_proxy_impl.h" |
27 #include "ipc/ipc_sync_channel.h" | 27 #include "ipc/ipc_sync_channel.h" |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 | 30 |
31 CompositorOutputSurface::CompositorOutputSurface( | 31 CompositorOutputSurface::CompositorOutputSurface( |
32 int32_t routing_id, | 32 int32_t routing_id, |
33 uint32_t output_surface_id, | 33 uint32_t output_surface_id, |
34 const scoped_refptr<ContextProviderCommandBuffer>& context_provider, | 34 const scoped_refptr<ContextProviderCommandBuffer>& context_provider, |
35 const scoped_refptr<ContextProviderCommandBuffer>& worker_context_provider, | 35 const scoped_refptr<ContextProviderCommandBuffer>& worker_context_provider, |
36 #if defined(ENABLE_VULKAN) | |
37 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider, | 36 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider, |
38 #endif | |
39 std::unique_ptr<cc::SoftwareOutputDevice> software_device, | 37 std::unique_ptr<cc::SoftwareOutputDevice> software_device, |
40 scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue, | 38 scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue, |
41 bool use_swap_compositor_frame_message) | 39 bool use_swap_compositor_frame_message) |
42 : OutputSurface(context_provider, | 40 : OutputSurface(context_provider, |
43 worker_context_provider, | 41 worker_context_provider, |
44 #if defined(ENABLE_VULKAN) | |
45 vulkan_context_provider, | 42 vulkan_context_provider, |
46 #endif | |
47 std::move(software_device)), | 43 std::move(software_device)), |
48 output_surface_id_(output_surface_id), | 44 output_surface_id_(output_surface_id), |
49 use_swap_compositor_frame_message_(use_swap_compositor_frame_message), | 45 use_swap_compositor_frame_message_(use_swap_compositor_frame_message), |
50 output_surface_filter_( | 46 output_surface_filter_( |
51 RenderThreadImpl::current()->compositor_message_filter()), | 47 RenderThreadImpl::current()->compositor_message_filter()), |
52 frame_swap_message_queue_(swap_frame_message_queue), | 48 frame_swap_message_queue_(swap_frame_message_queue), |
53 routing_id_(routing_id), | 49 routing_id_(routing_id), |
54 layout_test_mode_(RenderThreadImpl::current()->layout_test_mode()), | 50 layout_test_mode_(RenderThreadImpl::current()->layout_test_mode()), |
55 weak_ptrs_(this) { | 51 weak_ptrs_(this) { |
56 DCHECK(output_surface_filter_.get()); | 52 DCHECK(output_surface_filter_.get()); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 if (output_surface_id != output_surface_id_) | 198 if (output_surface_id != output_surface_id_) |
203 return; | 199 return; |
204 ReclaimResources(&ack); | 200 ReclaimResources(&ack); |
205 } | 201 } |
206 | 202 |
207 bool CompositorOutputSurface::Send(IPC::Message* message) { | 203 bool CompositorOutputSurface::Send(IPC::Message* message) { |
208 return message_sender_->Send(message); | 204 return message_sender_->Send(message); |
209 } | 205 } |
210 | 206 |
211 } // namespace content | 207 } // namespace content |
OLD | NEW |