diff options
author | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-11 21:07:18 +0000 |
---|---|---|
committer | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-11 21:07:18 +0000 |
commit | 2efc3118e5132ed7d3497f98d82cfb693490d552 (patch) | |
tree | 4e173c50c899c858155cc783c766db4d43a29ddf /chrome/gpu | |
parent | a71a22ff3045cc1523321fd81b82c97e4e53e097 (diff) | |
download | chromium_src-2efc3118e5132ed7d3497f98d82cfb693490d552.zip chromium_src-2efc3118e5132ed7d3497f98d82cfb693490d552.tar.gz chromium_src-2efc3118e5132ed7d3497f98d82cfb693490d552.tar.bz2 |
Blacklist bad GPU drivers: currenly we disable all gpu related features if a (os, device, driver) configuration is on the blacklist.
BUG=58182
TEST=unittest
Review URL: http://codereview.chromium.org/5612002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68948 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r-- | chrome/gpu/gpu_thread.cc | 12 | ||||
-rw-r--r-- | chrome/gpu/gpu_thread.h | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/chrome/gpu/gpu_thread.cc b/chrome/gpu/gpu_thread.cc index 411fbbb..d506dda 100644 --- a/chrome/gpu/gpu_thread.cc +++ b/chrome/gpu/gpu_thread.cc @@ -57,6 +57,8 @@ void GpuThread::OnControlMessageReceived(const IPC::Message& msg) { IPC_BEGIN_MESSAGE_MAP_EX(GpuThread, msg, msg_is_ok) IPC_MESSAGE_HANDLER(GpuMsg_EstablishChannel, OnEstablishChannel) + IPC_MESSAGE_HANDLER(GpuMsg_CloseChannel, + OnCloseChannel) IPC_MESSAGE_HANDLER(GpuMsg_Synchronize, OnSynchronize) IPC_MESSAGE_HANDLER(GpuMsg_CollectGraphicsInfo, @@ -103,6 +105,16 @@ void GpuThread::OnEstablishChannel(int renderer_id) { Send(new GpuHostMsg_ChannelEstablished(channel_handle, gpu_info_)); } +void GpuThread::OnCloseChannel(const IPC::ChannelHandle& channel_handle) { + for (GpuChannelMap::iterator iter = gpu_channels_.begin(); + iter != gpu_channels_.end(); ++iter) { + if (iter->second->GetChannelName() == channel_handle.name) { + gpu_channels_.erase(iter); + return; + } + } +} + void GpuThread::OnSynchronize() { Send(new GpuHostMsg_SynchronizeReply()); } diff --git a/chrome/gpu/gpu_thread.h b/chrome/gpu/gpu_thread.h index 26b7966..9aba2fd 100644 --- a/chrome/gpu/gpu_thread.h +++ b/chrome/gpu/gpu_thread.h @@ -17,6 +17,10 @@ #include "chrome/gpu/x_util.h" #include "gfx/native_widget_types.h" +namespace IPC { +struct ChannelHandle; +} + class GpuThread : public ChildThread { public: GpuThread(); @@ -33,6 +37,7 @@ class GpuThread : public ChildThread { // Message handlers. void OnEstablishChannel(int renderer_id); + void OnCloseChannel(const IPC::ChannelHandle& channel_handle); void OnSynchronize(); void OnCollectGraphicsInfo(); #if defined(OS_MACOSX) |