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 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1794 gpu_channel_ = nullptr; | 1794 gpu_channel_ = nullptr; |
1795 } | 1795 } |
1796 | 1796 |
1797 if (!IsRunningInMash()) { | 1797 if (!IsRunningInMash()) { |
1798 int client_id = 0; | 1798 int client_id = 0; |
1799 IPC::ChannelHandle channel_handle; | 1799 IPC::ChannelHandle channel_handle; |
1800 gpu::GPUInfo gpu_info; | 1800 gpu::GPUInfo gpu_info; |
1801 // Ask the browser for the channel name. | 1801 // Ask the browser for the channel name. |
1802 if (!Send(new ChildProcessHostMsg_EstablishGpuChannel( | 1802 if (!Send(new ChildProcessHostMsg_EstablishGpuChannel( |
1803 cause_for_gpu_launch, &client_id, &channel_handle, &gpu_info)) || | 1803 cause_for_gpu_launch, &client_id, &channel_handle, &gpu_info)) || |
1804 #if defined(OS_POSIX) | 1804 !channel_handle.mojo_handle.is_valid()) { |
1805 channel_handle.socket.fd == -1 || | |
1806 #endif | |
1807 channel_handle.name.empty()) { | |
1808 // Otherwise cancel the connection. | 1805 // Otherwise cancel the connection. |
1809 return nullptr; | 1806 return nullptr; |
1810 } | 1807 } |
1811 GetContentClient()->SetGpuInfo(gpu_info); | 1808 GetContentClient()->SetGpuInfo(gpu_info); |
1812 | 1809 |
1813 // Cache some variables that are needed on the compositor thread for our | 1810 // Cache some variables that are needed on the compositor thread for our |
1814 // implementation of GpuChannelHostFactory. | 1811 // implementation of GpuChannelHostFactory. |
1815 io_thread_task_runner_ = ChildProcess::current()->io_task_runner(); | 1812 io_thread_task_runner_ = ChildProcess::current()->io_task_runner(); |
1816 | 1813 |
1817 gpu_channel_ = | 1814 gpu_channel_ = |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) | 2238 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) |
2242 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; | 2239 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; |
2243 | 2240 |
2244 blink::mainThreadIsolate()->MemoryPressureNotification( | 2241 blink::mainThreadIsolate()->MemoryPressureNotification( |
2245 v8_memory_pressure_level); | 2242 v8_memory_pressure_level); |
2246 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2243 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
2247 v8_memory_pressure_level); | 2244 v8_memory_pressure_level); |
2248 } | 2245 } |
2249 | 2246 |
2250 } // namespace content | 2247 } // namespace content |
OLD | NEW |