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

Side by Side Diff: chrome/renderer/gpu_channel_host.cc

Issue 6384003: Gpu process restart fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/gpu_channel_host.h ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/renderer/gpu_channel_host.h" 5 #include "chrome/renderer/gpu_channel_host.h"
6 6
7 #include "chrome/common/child_process.h" 7 #include "chrome/common/child_process.h"
8 #include "chrome/common/gpu_create_command_buffer_config.h" 8 #include "chrome/common/gpu_create_command_buffer_config.h"
9 #include "chrome/common/gpu_messages.h" 9 #include "chrome/common/gpu_messages.h"
10 #include "chrome/renderer/command_buffer_proxy.h" 10 #include "chrome/renderer/command_buffer_proxy.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 void GpuChannelHost::set_gpu_info(const GPUInfo& gpu_info) { 32 void GpuChannelHost::set_gpu_info(const GPUInfo& gpu_info) {
33 gpu_info_ = gpu_info; 33 gpu_info_ = gpu_info;
34 } 34 }
35 35
36 const GPUInfo& GpuChannelHost::gpu_info() const { 36 const GPUInfo& GpuChannelHost::gpu_info() const {
37 return gpu_info_; 37 return gpu_info_;
38 } 38 }
39 39
40 void GpuChannelHost::SetStateLost() {
41 state_ = kLost;
42 }
43
40 bool GpuChannelHost::OnMessageReceived(const IPC::Message& message) { 44 bool GpuChannelHost::OnMessageReceived(const IPC::Message& message) {
41 DCHECK(message.routing_id() != MSG_ROUTING_CONTROL); 45 DCHECK(message.routing_id() != MSG_ROUTING_CONTROL);
42 46
43 // The object to which the message is addressed might have been destroyed. 47 // The object to which the message is addressed might have been destroyed.
44 // This is expected, for example an asynchronous SwapBuffers notification 48 // This is expected, for example an asynchronous SwapBuffers notification
45 // to a command buffer proxy that has since been destroyed. This function 49 // to a command buffer proxy that has since been destroyed. This function
46 // fails silently in that case. 50 // fails silently in that case.
47 return router_.RouteMessage(message); 51 return router_.RouteMessage(message);
48 } 52 }
49 53
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // Check the proxy has not already been removed after a channel error. 161 // Check the proxy has not already been removed after a channel error.
158 int route_id = command_buffer->route_id(); 162 int route_id = command_buffer->route_id();
159 if (proxies_.find(command_buffer->route_id()) != proxies_.end()) { 163 if (proxies_.find(command_buffer->route_id()) != proxies_.end()) {
160 proxies_.erase(route_id); 164 proxies_.erase(route_id);
161 router_.RemoveRoute(route_id); 165 router_.RemoveRoute(route_id);
162 } 166 }
163 167
164 delete command_buffer; 168 delete command_buffer;
165 #endif 169 #endif
166 } 170 }
OLDNEW
« no previous file with comments | « chrome/renderer/gpu_channel_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698