summaryrefslogtreecommitdiff
path: root/chromium/content/common/gpu/gpu_channel_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/common/gpu/gpu_channel_manager.cc')
-rw-r--r--chromium/content/common/gpu/gpu_channel_manager.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chromium/content/common/gpu/gpu_channel_manager.cc b/chromium/content/common/gpu/gpu_channel_manager.cc
index 8b466bd0b2b..fe3f7b34f12 100644
--- a/chromium/content/common/gpu/gpu_channel_manager.cc
+++ b/chromium/content/common/gpu/gpu_channel_manager.cc
@@ -11,6 +11,7 @@
#include "content/common/gpu/gpu_memory_manager.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/common/gpu/sync_point_manager.h"
+#include "content/public/browser/content_browser_client.h"
#include "gpu/command_buffer/service/feature_info.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
@@ -124,7 +125,12 @@ void GpuChannelManager::OnEstablishChannel(int client_id, bool share_context) {
DCHECK(!mailbox_manager_.get());
mailbox_manager_ = new gpu::gles2::MailboxManager;
}
- share_group = share_group_.get();
+ // Qt: Ask the browser client at the top to manage the context sharing.
+ // This can only work with --in-process-gpu or --single-process.
+ if (GetContentClient()->browser() && GetContentClient()->browser()->GetInProcessGpuShareGroup())
+ share_group = GetContentClient()->browser()->GetInProcessGpuShareGroup();
+ else
+ share_group = share_group_.get();
mailbox_manager = mailbox_manager_.get();
}