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/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <utility> | 10 #include <utility> |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 #include "content/renderer/media/peer_connection_tracker.h" | 192 #include "content/renderer/media/peer_connection_tracker.h" |
193 #include "content/renderer/media/rtc_peer_connection_handler.h" | 193 #include "content/renderer/media/rtc_peer_connection_handler.h" |
194 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" | 194 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" |
195 #endif | 195 #endif |
196 | 196 |
197 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 197 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
198 #include "v8/src/third_party/vtune/v8-vtune.h" | 198 #include "v8/src/third_party/vtune/v8-vtune.h" |
199 #endif | 199 #endif |
200 | 200 |
201 #include "content/public/common/service_manager_connection.h" | 201 #include "content/public/common/service_manager_connection.h" |
202 #include "content/renderer/mus/render_widget_mus_connection.h" | |
203 #include "content/renderer/mus/render_widget_window_tree_client_factory.h" | 202 #include "content/renderer/mus/render_widget_window_tree_client_factory.h" |
| 203 #include "content/renderer/mus/renderer_window_tree_client.h" |
204 #include "services/ui/public/cpp/gpu/gpu.h" | 204 #include "services/ui/public/cpp/gpu/gpu.h" |
205 | 205 |
206 #if defined(ENABLE_IPC_FUZZER) | 206 #if defined(ENABLE_IPC_FUZZER) |
207 #include "content/common/external_ipc_dumper.h" | 207 #include "content/common/external_ipc_dumper.h" |
208 #endif | 208 #endif |
209 | 209 |
210 #if defined(OS_MACOSX) | 210 #if defined(OS_MACOSX) |
211 #include <malloc/malloc.h> | 211 #include <malloc/malloc.h> |
212 #else | 212 #else |
213 #include <malloc.h> | 213 #include <malloc.h> |
(...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 bool use_software, | 1884 bool use_software, |
1885 int routing_id, | 1885 int routing_id, |
1886 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue, | 1886 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue, |
1887 const GURL& url) { | 1887 const GURL& url) { |
1888 const base::CommandLine& command_line = | 1888 const base::CommandLine& command_line = |
1889 *base::CommandLine::ForCurrentProcess(); | 1889 *base::CommandLine::ForCurrentProcess(); |
1890 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) | 1890 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) |
1891 use_software = true; | 1891 use_software = true; |
1892 | 1892 |
1893 #if defined(USE_AURA) | 1893 #if defined(USE_AURA) |
1894 if (GetServiceManagerConnection() && !use_software && | 1894 if (!use_software && command_line.HasSwitch(switches::kUseMusInRenderer)) { |
1895 command_line.HasSwitch(switches::kUseMusInRenderer)) { | 1895 return RendererWindowTreeClient::Get(routing_id) |
1896 RenderWidgetMusConnection* connection = | 1896 ->CreateCompositorFrameSink( |
1897 RenderWidgetMusConnection::GetOrCreate(routing_id); | 1897 frame_sink_id, |
1898 return connection->CreateCompositorFrameSink( | 1898 gpu_->CreateContextProvider(EstablishGpuChannelSync()), |
1899 frame_sink_id, gpu_->CreateContextProvider(EstablishGpuChannelSync()), | 1899 GetGpuMemoryBufferManager()); |
1900 GetGpuMemoryBufferManager()); | |
1901 } | 1900 } |
1902 #endif | 1901 #endif |
1903 | 1902 |
1904 uint32_t compositor_frame_sink_id = g_next_compositor_frame_sink_id++; | 1903 uint32_t compositor_frame_sink_id = g_next_compositor_frame_sink_id++; |
1905 | 1904 |
1906 if (command_line.HasSwitch(switches::kEnableVulkan)) { | 1905 if (command_line.HasSwitch(switches::kEnableVulkan)) { |
1907 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider = | 1906 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider = |
1908 cc::VulkanInProcessContextProvider::Create(); | 1907 cc::VulkanInProcessContextProvider::Create(); |
1909 if (vulkan_context_provider) { | 1908 if (vulkan_context_provider) { |
1910 DCHECK(!layout_test_mode()); | 1909 DCHECK(!layout_test_mode()); |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2436 } | 2435 } |
2437 } | 2436 } |
2438 | 2437 |
2439 void RenderThreadImpl::OnRendererInterfaceRequest( | 2438 void RenderThreadImpl::OnRendererInterfaceRequest( |
2440 mojom::RendererAssociatedRequest request) { | 2439 mojom::RendererAssociatedRequest request) { |
2441 DCHECK(!renderer_binding_.is_bound()); | 2440 DCHECK(!renderer_binding_.is_bound()); |
2442 renderer_binding_.Bind(std::move(request)); | 2441 renderer_binding_.Bind(std::move(request)); |
2443 } | 2442 } |
2444 | 2443 |
2445 } // namespace content | 2444 } // namespace content |
OLD | NEW |