Chromium Code Reviews| Index: chrome/renderer/render_thread.cc |
| =================================================================== |
| --- chrome/renderer/render_thread.cc (revision 68066) |
| +++ chrome/renderer/render_thread.cc (working copy) |
| @@ -29,6 +29,7 @@ |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/db_message_filter.h" |
| #include "chrome/common/dom_storage_common.h" |
| +#include "chrome/common/gpu_feature_flags.h" |
| #include "chrome/common/plugin_messages.h" |
| #include "chrome/common/render_messages.h" |
| #include "chrome/common/render_messages_params.h" |
| @@ -1079,18 +1080,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() || |
|
vangelis
2010/12/08 00:17:38
It would be worth putting a comment here mentionin
Zhenyao Mo
2010/12/09 00:06:06
Done.
|
| + gpu_feature_flags.is_accelerated_compositing_blacklisted() || |
| + gpu_feature_flags.is_webgl_blacklisted()) { |
|
Ken Russell (switch to Gerrit)
2010/12/08 05:04:16
There's an architectural problem with doing these
|
| + // 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; |