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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 2087333002: mus::GpuService: Support establish GpuChannel asynchronously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months 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 (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
192 #include "content/renderer/media/rtc_peer_connection_handler.h" 192 #include "content/renderer/media/rtc_peer_connection_handler.h"
193 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" 193 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
194 #include "content/renderer/media/webrtc_identity_service.h" 194 #include "content/renderer/media/webrtc_identity_service.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 #if defined(MOJO_SHELL_CLIENT) 201 #if defined(MOJO_SHELL_CLIENT)
202 #include "components/mus/common/gpu_service.h"
202 #include "content/public/common/mojo_shell_connection.h" 203 #include "content/public/common/mojo_shell_connection.h"
203 #include "content/renderer/mus/render_widget_mus_connection.h" 204 #include "content/renderer/mus/render_widget_mus_connection.h"
204 #include "content/renderer/mus/render_widget_window_tree_client_factory.h" 205 #include "content/renderer/mus/render_widget_window_tree_client_factory.h"
205 #endif 206 #endif
206 207
207 #if defined(ENABLE_IPC_FUZZER) 208 #if defined(ENABLE_IPC_FUZZER)
208 #include "content/common/external_ipc_dumper.h" 209 #include "content/common/external_ipc_dumper.h"
209 #endif 210 #endif
210 211
211 using base::ThreadRestrictions; 212 using base::ThreadRestrictions;
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1805 bool use_software, 1806 bool use_software,
1806 int routing_id, 1807 int routing_id,
1807 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue, 1808 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue,
1808 const GURL& url) { 1809 const GURL& url) {
1809 const base::CommandLine& command_line = 1810 const base::CommandLine& command_line =
1810 *base::CommandLine::ForCurrentProcess(); 1811 *base::CommandLine::ForCurrentProcess();
1811 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) 1812 if (command_line.HasSwitch(switches::kDisableGpuCompositing))
1812 use_software = true; 1813 use_software = true;
1813 1814
1814 #if defined(MOJO_SHELL_CLIENT) 1815 #if defined(MOJO_SHELL_CLIENT)
1815 if (MojoShellConnection::GetForProcess() && !use_software && 1816 auto shell_connection = MojoShellConnection::GetForProcess();
1817 if (shell_connection && !use_software &&
1816 command_line.HasSwitch(switches::kUseMusInRenderer)) { 1818 command_line.HasSwitch(switches::kUseMusInRenderer)) {
1819 mus::GpuService::Initialize(shell_connection->GetConnector());
1817 RenderWidgetMusConnection* connection = 1820 RenderWidgetMusConnection* connection =
1818 RenderWidgetMusConnection::GetOrCreate(routing_id); 1821 RenderWidgetMusConnection::GetOrCreate(routing_id);
1819 return connection->CreateOutputSurface(); 1822 return connection->CreateOutputSurface();
1820 } 1823 }
1821 #endif 1824 #endif
1822 1825
1823 uint32_t output_surface_id = g_next_output_surface_id++; 1826 uint32_t output_surface_id = g_next_output_surface_id++;
1824 1827
1825 if (command_line.HasSwitch(switches::kEnableVulkan)) { 1828 if (command_line.HasSwitch(switches::kEnableVulkan)) {
1826 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider = 1829 scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider =
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) 2220 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical)
2218 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; 2221 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate;
2219 2222
2220 blink::mainThreadIsolate()->MemoryPressureNotification( 2223 blink::mainThreadIsolate()->MemoryPressureNotification(
2221 v8_memory_pressure_level); 2224 v8_memory_pressure_level);
2222 blink::MemoryPressureNotificationToWorkerThreadIsolates( 2225 blink::MemoryPressureNotificationToWorkerThreadIsolates(
2223 v8_memory_pressure_level); 2226 v8_memory_pressure_level);
2224 } 2227 }
2225 2228
2226 } // namespace content 2229 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698