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

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

Issue 2038423004: Use ChannelMojo for Browser-GPU and Renderer-GPU IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-utility-channel-mojo
Patch Set: fix pepper 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
« no previous file with comments | « content/renderer/pepper/plugin_module.cc ('k') | gpu/ipc/service/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 gpu_channel_->DestroyChannel(); 1773 gpu_channel_->DestroyChannel();
1774 gpu_channel_ = NULL; 1774 gpu_channel_ = NULL;
1775 } 1775 }
1776 1776
1777 // Ask the browser for the channel name. 1777 // Ask the browser for the channel name.
1778 int client_id = 0; 1778 int client_id = 0;
1779 IPC::ChannelHandle channel_handle; 1779 IPC::ChannelHandle channel_handle;
1780 gpu::GPUInfo gpu_info; 1780 gpu::GPUInfo gpu_info;
1781 if (!Send(new ChildProcessHostMsg_EstablishGpuChannel( 1781 if (!Send(new ChildProcessHostMsg_EstablishGpuChannel(
1782 cause_for_gpu_launch, &client_id, &channel_handle, &gpu_info)) || 1782 cause_for_gpu_launch, &client_id, &channel_handle, &gpu_info)) ||
1783 #if defined(OS_POSIX) 1783 !channel_handle.mojo_handle.is_valid()) {
1784 channel_handle.socket.fd == -1 ||
1785 #endif
1786 channel_handle.name.empty()) {
1787 // Otherwise cancel the connection. 1784 // Otherwise cancel the connection.
1788 return NULL; 1785 return NULL;
1789 } 1786 }
1790 1787
1791 GetContentClient()->SetGpuInfo(gpu_info); 1788 GetContentClient()->SetGpuInfo(gpu_info);
1792 1789
1793 // Cache some variables that are needed on the compositor thread for our 1790 // Cache some variables that are needed on the compositor thread for our
1794 // implementation of GpuChannelHostFactory. 1791 // implementation of GpuChannelHostFactory.
1795 io_thread_task_runner_ = ChildProcess::current()->io_task_runner(); 1792 io_thread_task_runner_ = ChildProcess::current()->io_task_runner();
1796 1793
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical) 2214 v8_memory_pressure_level == v8::MemoryPressureLevel::kCritical)
2218 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate; 2215 v8_memory_pressure_level = v8::MemoryPressureLevel::kModerate;
2219 2216
2220 blink::mainThreadIsolate()->MemoryPressureNotification( 2217 blink::mainThreadIsolate()->MemoryPressureNotification(
2221 v8_memory_pressure_level); 2218 v8_memory_pressure_level);
2222 blink::MemoryPressureNotificationToWorkerThreadIsolates( 2219 blink::MemoryPressureNotificationToWorkerThreadIsolates(
2223 v8_memory_pressure_level); 2220 v8_memory_pressure_level);
2224 } 2221 }
2225 2222
2226 } // namespace content 2223 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/plugin_module.cc ('k') | gpu/ipc/service/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698