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 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1926 const base::CommandLine& command_line = | 1926 const base::CommandLine& command_line = |
1927 *base::CommandLine::ForCurrentProcess(); | 1927 *base::CommandLine::ForCurrentProcess(); |
1928 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) | 1928 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) |
1929 use_software = true; | 1929 use_software = true; |
1930 | 1930 |
1931 #if defined(USE_AURA) | 1931 #if defined(USE_AURA) |
1932 if (GetServiceManagerConnection() && !use_software && | 1932 if (GetServiceManagerConnection() && !use_software && |
1933 command_line.HasSwitch(switches::kUseMusInRenderer)) { | 1933 command_line.HasSwitch(switches::kUseMusInRenderer)) { |
1934 RenderWidgetMusConnection* connection = | 1934 RenderWidgetMusConnection* connection = |
1935 RenderWidgetMusConnection::GetOrCreate(routing_id); | 1935 RenderWidgetMusConnection::GetOrCreate(routing_id); |
1936 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host = | 1936 return connection->CreateCompositorFrameSink( |
1937 EstablishGpuChannelSync(); | 1937 gpu_->CreateContextProvider(EstablishGpuChannelSync()), |
1938 return connection->CreateCompositorFrameSink(std::move(gpu_channel_host), | 1938 GetGpuMemoryBufferManager()); |
1939 GetGpuMemoryBufferManager()); | |
1940 } | 1939 } |
1941 #endif | 1940 #endif |
1942 | 1941 |
1943 uint32_t compositor_frame_sink_id = g_next_compositor_frame_sink_id++; | 1942 uint32_t compositor_frame_sink_id = g_next_compositor_frame_sink_id++; |
1944 | 1943 |
1945 if (command_line.HasSwitch(switches::kEnableVulkan)) { | 1944 if (command_line.HasSwitch(switches::kEnableVulkan)) { |
1946 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider = | 1945 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider = |
1947 cc::VulkanInProcessContextProvider::Create(); | 1946 cc::VulkanInProcessContextProvider::Create(); |
1948 if (vulkan_context_provider) { | 1947 if (vulkan_context_provider) { |
1949 DCHECK(!layout_test_mode()); | 1948 DCHECK(!layout_test_mode()); |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2487 } | 2486 } |
2488 } | 2487 } |
2489 | 2488 |
2490 void RenderThreadImpl::OnRendererInterfaceRequest( | 2489 void RenderThreadImpl::OnRendererInterfaceRequest( |
2491 mojom::RendererAssociatedRequest request) { | 2490 mojom::RendererAssociatedRequest request) { |
2492 DCHECK(!renderer_binding_.is_bound()); | 2491 DCHECK(!renderer_binding_.is_bound()); |
2493 renderer_binding_.Bind(std::move(request)); | 2492 renderer_binding_.Bind(std::move(request)); |
2494 } | 2493 } |
2495 | 2494 |
2496 } // namespace content | 2495 } // namespace content |
OLD | NEW |