Index: content/common/gpu/gpu_channel_manager.cc |
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc |
index 910694f270010dc1ecf8e5405bf7ea35607ecce7..e602d435697f6f76904ae530d67fab4246b298e3 100644 |
--- a/content/common/gpu/gpu_channel_manager.cc |
+++ b/content/common/gpu/gpu_channel_manager.cc |
@@ -9,6 +9,7 @@ |
#include "content/common/gpu/gpu_channel.h" |
#include "content/common/gpu/gpu_messages.h" |
#include "content/common/gpu/gpu_memory_manager.h" |
+#include "ui/gfx/gl/gl_share_group.h" |
GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread, |
GpuWatchdog* watchdog, |
@@ -82,14 +83,14 @@ bool GpuChannelManager::Send(IPC::Message* msg) { |
return gpu_child_thread_->Send(msg); |
} |
-void GpuChannelManager::OnEstablishChannel(int client_id, int share_client_id) { |
+void GpuChannelManager::OnEstablishChannel(int client_id, bool share_context) { |
IPC::ChannelHandle channel_handle; |
gfx::GLShareGroup* share_group = NULL; |
- if (share_client_id) { |
- GpuChannel* share_channel = gpu_channels_[share_client_id]; |
- DCHECK(share_channel); |
- share_group = share_channel->share_group(); |
+ if (share_context) { |
+ if (!share_group_) |
+ share_group_ = new gfx::GLShareGroup; |
+ share_group = share_group_; |
} |
scoped_refptr<GpuChannel> channel = new GpuChannel(this, |