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

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

Issue 2136313002: Fix --use-mus-in-renderer for mus+ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update 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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 845
846 GetContentClient()->renderer()->ExposeInterfacesToBrowser( 846 GetContentClient()->renderer()->ExposeInterfacesToBrowser(
847 GetInterfaceRegistry()); 847 GetInterfaceRegistry());
848 848
849 GetInterfaceRegistry()->AddInterface(base::Bind(CreateFrameFactory)); 849 GetInterfaceRegistry()->AddInterface(base::Bind(CreateFrameFactory));
850 GetInterfaceRegistry()->AddInterface(base::Bind(CreateEmbeddedWorkerSetup)); 850 GetInterfaceRegistry()->AddInterface(base::Bind(CreateEmbeddedWorkerSetup));
851 851
852 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) 852 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
853 // We may not have a MojoShellConnection object in tests that directly 853 // We may not have a MojoShellConnection object in tests that directly
854 // instantiate a RenderThreadImpl. 854 // instantiate a RenderThreadImpl.
855 if (MojoShellConnection::GetForProcess() && 855 if (ChildThread::Get()->GetMojoShellConnection() &&
856 base::CommandLine::ForCurrentProcess()->HasSwitch( 856 base::CommandLine::ForCurrentProcess()->HasSwitch(
857 switches::kUseMusInRenderer)) 857 switches::kUseMusInRenderer))
858 CreateRenderWidgetWindowTreeClientFactory(); 858 CreateRenderWidgetWindowTreeClientFactory();
859 #endif 859 #endif
860 860
861 GetRemoteInterfaces()->GetInterface( 861 GetRemoteInterfaces()->GetInterface(
862 mojo::GetProxy(&storage_partition_service_)); 862 mojo::GetProxy(&storage_partition_service_));
863 863
864 is_renderer_suspended_ = false; 864 is_renderer_suspended_ = false;
865 } 865 }
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 bool use_software, 1830 bool use_software,
1831 int routing_id, 1831 int routing_id,
1832 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue, 1832 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue,
1833 const GURL& url) { 1833 const GURL& url) {
1834 const base::CommandLine& command_line = 1834 const base::CommandLine& command_line =
1835 *base::CommandLine::ForCurrentProcess(); 1835 *base::CommandLine::ForCurrentProcess();
1836 if (command_line.HasSwitch(switches::kDisableGpuCompositing)) 1836 if (command_line.HasSwitch(switches::kDisableGpuCompositing))
1837 use_software = true; 1837 use_software = true;
1838 1838
1839 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) 1839 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
1840 auto* shell_connection = MojoShellConnection::GetForProcess(); 1840 if (ChildThread::Get()->GetMojoShellConnection() && !use_software &&
1841 if (shell_connection && !use_software &&
1842 command_line.HasSwitch(switches::kUseMusInRenderer)) { 1841 command_line.HasSwitch(switches::kUseMusInRenderer)) {
1843 RenderWidgetMusConnection* connection = 1842 RenderWidgetMusConnection* connection =
1844 RenderWidgetMusConnection::GetOrCreate(routing_id); 1843 RenderWidgetMusConnection::GetOrCreate(routing_id);
1845 return connection->CreateOutputSurface(); 1844 return connection->CreateOutputSurface();
1846 } 1845 }
1847 #endif 1846 #endif
1848 1847
1849 uint32_t output_surface_id = g_next_output_surface_id++; 1848 uint32_t output_surface_id = g_next_output_surface_id++;
1850 1849
1851 if (command_line.HasSwitch(switches::kEnableVulkan)) { 1850 if (command_line.HasSwitch(switches::kEnableVulkan)) {
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
2239 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) 2238 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical)
2240 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; 2239 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate;
2241 2240
2242 blink::mainThreadIsolate()->MemoryPressureNotification( 2241 blink::mainThreadIsolate()->MemoryPressureNotification(
2243 v8_memory_pressure_level); 2242 v8_memory_pressure_level);
2244 blink::MemoryPressureNotificationToWorkerThreadIsolates( 2243 blink::MemoryPressureNotificationToWorkerThreadIsolates(
2245 v8_memory_pressure_level); 2244 v8_memory_pressure_level);
2246 } 2245 }
2247 2246
2248 } // namespace content 2247 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698