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

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

Issue 1711533002: Decouple browser-specific GPU IPC messages from GPU service IPCs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a couple of missings sends in GpuChildThread Created 4 years, 10 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "content/child/thread_safe_sender.h" 68 #include "content/child/thread_safe_sender.h"
69 #include "content/child/web_database_observer_impl.h" 69 #include "content/child/web_database_observer_impl.h"
70 #include "content/child/worker_thread_registry.h" 70 #include "content/child/worker_thread_registry.h"
71 #include "content/common/child_process_messages.h" 71 #include "content/common/child_process_messages.h"
72 #include "content/common/content_constants_internal.h" 72 #include "content/common/content_constants_internal.h"
73 #include "content/common/database_messages.h" 73 #include "content/common/database_messages.h"
74 #include "content/common/dom_storage/dom_storage_messages.h" 74 #include "content/common/dom_storage/dom_storage_messages.h"
75 #include "content/common/frame_messages.h" 75 #include "content/common/frame_messages.h"
76 #include "content/common/gpu/client/context_provider_command_buffer.h" 76 #include "content/common/gpu/client/context_provider_command_buffer.h"
77 #include "content/common/gpu/client/gpu_channel_host.h" 77 #include "content/common/gpu/client/gpu_channel_host.h"
78 #include "content/common/gpu/gpu_messages.h" 78 #include "content/common/gpu/gpu_browser_messages.h"
79 #include "content/common/gpu/gpu_process_launch_causes.h" 79 #include "content/common/gpu/gpu_process_launch_causes.h"
80 #include "content/common/render_frame_setup.mojom.h" 80 #include "content/common/render_frame_setup.mojom.h"
81 #include "content/common/render_process_messages.h" 81 #include "content/common/render_process_messages.h"
82 #include "content/common/resource_messages.h" 82 #include "content/common/resource_messages.h"
83 #include "content/common/service_worker/embedded_worker_setup.mojom.h" 83 #include "content/common/service_worker/embedded_worker_setup.mojom.h"
84 #include "content/common/view_messages.h" 84 #include "content/common/view_messages.h"
85 #include "content/common/worker_messages.h" 85 #include "content/common/worker_messages.h"
86 #include "content/public/common/content_constants.h" 86 #include "content/public/common/content_constants.h"
87 #include "content/public/common/content_paths.h" 87 #include "content/public/common/content_paths.h"
88 #include "content/public/common/content_switches.h" 88 #include "content/public/common/content_switches.h"
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 1851
1852 // Recreate the channel if it has been lost. 1852 // Recreate the channel if it has been lost.
1853 gpu_channel_->DestroyChannel(); 1853 gpu_channel_->DestroyChannel();
1854 gpu_channel_ = NULL; 1854 gpu_channel_ = NULL;
1855 } 1855 }
1856 1856
1857 // Ask the browser for the channel name. 1857 // Ask the browser for the channel name.
1858 int client_id = 0; 1858 int client_id = 0;
1859 IPC::ChannelHandle channel_handle; 1859 IPC::ChannelHandle channel_handle;
1860 gpu::GPUInfo gpu_info; 1860 gpu::GPUInfo gpu_info;
1861 if (!Send(new GpuHostMsg_EstablishGpuChannel(cause_for_gpu_launch, 1861 if (!Send(new GpuBrowserHostMsg_EstablishGpuChannel(
1862 &client_id, 1862 cause_for_gpu_launch, &client_id, &channel_handle, &gpu_info)) ||
1863 &channel_handle,
1864 &gpu_info)) ||
1865 #if defined(OS_POSIX) 1863 #if defined(OS_POSIX)
1866 channel_handle.socket.fd == -1 || 1864 channel_handle.socket.fd == -1 ||
1867 #endif 1865 #endif
1868 channel_handle.name.empty()) { 1866 channel_handle.name.empty()) {
1869 // Otherwise cancel the connection. 1867 // Otherwise cancel the connection.
1870 return NULL; 1868 return NULL;
1871 } 1869 }
1872 1870
1873 GetContentClient()->SetGpuInfo(gpu_info); 1871 GetContentClient()->SetGpuInfo(gpu_info);
1874 1872
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 } 2169 }
2172 2170
2173 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2171 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2174 size_t erased = 2172 size_t erased =
2175 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2173 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2176 routing_id_); 2174 routing_id_);
2177 DCHECK_EQ(1u, erased); 2175 DCHECK_EQ(1u, erased);
2178 } 2176 }
2179 2177
2180 } // namespace content 2178 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698