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

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

Issue 5612002: Blacklist bad GPU drivers: currenly we disable all gpu related features if th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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
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::set_gpu_feature_flags(
41 const GpuFeatureFlags& gpu_feature_flags) {
42 gpu_feature_flags_ = gpu_feature_flags;
43 }
44
45 const GpuFeatureFlags& GpuChannelHost::gpu_feature_flags() const {
46 return gpu_feature_flags_;
47 }
48
40 void GpuChannelHost::OnMessageReceived(const IPC::Message& message) { 49 void GpuChannelHost::OnMessageReceived(const IPC::Message& message) {
41 DCHECK(message.routing_id() != MSG_ROUTING_CONTROL); 50 DCHECK(message.routing_id() != MSG_ROUTING_CONTROL);
42 51
43 // The object to which the message is addressed might have been destroyed. 52 // The object to which the message is addressed might have been destroyed.
44 // This is expected, for example an asynchronous SwapBuffers notification 53 // This is expected, for example an asynchronous SwapBuffers notification
45 // to a command buffer proxy that has since been destroyed. This function 54 // to a command buffer proxy that has since been destroyed. This function
46 // fails silently in that case. 55 // fails silently in that case.
47 router_.RouteMessage(message); 56 router_.RouteMessage(message);
48 } 57 }
49 58
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Check the proxy has not already been removed after a channel error. 163 // Check the proxy has not already been removed after a channel error.
155 int route_id = command_buffer->route_id(); 164 int route_id = command_buffer->route_id();
156 if (proxies_.find(command_buffer->route_id()) != proxies_.end()) { 165 if (proxies_.find(command_buffer->route_id()) != proxies_.end()) {
157 proxies_.erase(route_id); 166 proxies_.erase(route_id);
158 router_.RemoveRoute(route_id); 167 router_.RemoveRoute(route_id);
159 } 168 }
160 169
161 delete command_buffer; 170 delete command_buffer;
162 #endif 171 #endif
163 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698