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

Unified Diff: content/common/gpu/gpu_channel_manager.cc

Issue 9619017: Fix context sharing between channels to be order-independent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months 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
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698