| 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 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 const base::CommandLine& command_line = | 1811 const base::CommandLine& command_line = |
| 1812 *base::CommandLine::ForCurrentProcess(); | 1812 *base::CommandLine::ForCurrentProcess(); |
| 1813 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) | 1813 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) |
| 1814 use_software = true; | 1814 use_software = true; |
| 1815 | 1815 |
| 1816 #if defined(USE_AURA) | 1816 #if defined(USE_AURA) |
| 1817 if (GetMojoShellConnection() && !use_software && | 1817 if (GetMojoShellConnection() && !use_software && |
| 1818 command_line.HasSwitch(switches::kUseMusInRenderer)) { | 1818 command_line.HasSwitch(switches::kUseMusInRenderer)) { |
| 1819 RenderWidgetMusConnection* connection = | 1819 RenderWidgetMusConnection* connection = |
| 1820 RenderWidgetMusConnection::GetOrCreate(routing_id); | 1820 RenderWidgetMusConnection::GetOrCreate(routing_id); |
| 1821 return connection->CreateOutputSurface(gpu_service_.get()); | 1821 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host = |
| 1822 EstablishGpuChannelSync(); |
| 1823 return connection->CreateOutputSurface(std::move(gpu_channel_host)); |
| 1822 } | 1824 } |
| 1823 #endif | 1825 #endif |
| 1824 | 1826 |
| 1825 uint32_t output_surface_id = g_next_output_surface_id++; | 1827 uint32_t output_surface_id = g_next_output_surface_id++; |
| 1826 | 1828 |
| 1827 if (command_line.HasSwitch(switches::kEnableVulkan)) { | 1829 if (command_line.HasSwitch(switches::kEnableVulkan)) { |
| 1828 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider = | 1830 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider = |
| 1829 cc::VulkanInProcessContextProvider::Create(); | 1831 cc::VulkanInProcessContextProvider::Create(); |
| 1830 if (vulkan_context_provider) { | 1832 if (vulkan_context_provider) { |
| 1831 DCHECK(!layout_test_mode()); | 1833 DCHECK(!layout_test_mode()); |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2229 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) | 2231 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) |
| 2230 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; | 2232 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; |
| 2231 | 2233 |
| 2232 blink::mainThreadIsolate()->MemoryPressureNotification( | 2234 blink::mainThreadIsolate()->MemoryPressureNotification( |
| 2233 v8_memory_pressure_level); | 2235 v8_memory_pressure_level); |
| 2234 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2236 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
| 2235 v8_memory_pressure_level); | 2237 v8_memory_pressure_level); |
| 2236 } | 2238 } |
| 2237 | 2239 |
| 2238 } // namespace content | 2240 } // namespace content |
| OLD | NEW |