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

Unified Diff: chrome/renderer/render_thread.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 side-by-side diff with in-line comments
Download patch
« chrome/renderer/render_thread.h ('K') | « chrome/renderer/render_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_thread.cc
===================================================================
--- chrome/renderer/render_thread.cc (revision 68066)
+++ chrome/renderer/render_thread.cc (working copy)
@@ -1079,18 +1079,27 @@
}
void RenderThread::OnGpuChannelEstablished(
- const IPC::ChannelHandle& channel_handle, const GPUInfo& gpu_info) {
+ const IPC::ChannelHandle& channel_handle,
+ const GPUInfo& gpu_info,
+ const GpuFeatureFlags& gpu_feature_flags) {
#if defined(OS_POSIX)
// If we received a ChannelHandle, register it now.
if (channel_handle.socket.fd >= 0)
IPC::AddChannelSocket(channel_handle.name, channel_handle.socket.fd);
#endif
- gpu_channel_->set_gpu_info(gpu_info);
-
if (channel_handle.name.size() != 0) {
- // Connect to the GPU process if a channel name was received.
- gpu_channel_->Connect(channel_handle.name);
+ if (gpu_feature_flags.is_accelerated_2d_canvas_blacklisted() ||
+ gpu_feature_flags.is_accelerated_compositing_blacklisted() ||
+ gpu_feature_flags.is_webgl_blacklisted()) {
+ // If any GPU feature is blacklisted, cancel the connection.
+ gpu_channel_ = NULL;
+ } else {
+ // Connect to the GPU process if a channel name was received.
+ gpu_channel_->set_gpu_info(gpu_info);
+ gpu_channel_->set_gpu_feature_flags(gpu_feature_flags);
+ gpu_channel_->Connect(channel_handle.name);
+ }
} else {
// Otherwise cancel the connection.
gpu_channel_ = NULL;
« chrome/renderer/render_thread.h ('K') | « chrome/renderer/render_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698