summaryrefslogtreecommitdiff
path: root/chromium/content/gpu/gpu_child_thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/gpu/gpu_child_thread.cc')
-rw-r--r--chromium/content/gpu/gpu_child_thread.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/chromium/content/gpu/gpu_child_thread.cc b/chromium/content/gpu/gpu_child_thread.cc
index 861c2f856c3..1b64290efe6 100644
--- a/chromium/content/gpu/gpu_child_thread.cc
+++ b/chromium/content/gpu/gpu_child_thread.cc
@@ -19,6 +19,7 @@
#include "components/viz/common/features.h"
#include "content/child/child_process.h"
#include "content/gpu/gpu_service_factory.h"
+#include "content/public/browser/content_browser_client.h"
#include "content/public/common/connection_filter.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
@@ -163,10 +164,13 @@ viz::VizMainImpl::ExternalDependencies CreateVizMainDependencies(
} // namespace
+GpuChildThread* GpuChildThread::instance_ = 0;
+
GpuChildThread::GpuChildThread(std::unique_ptr<gpu::GpuInit> gpu_init,
viz::VizMainImpl::LogMessages log_messages)
: GpuChildThread(GetOptions(), std::move(gpu_init)) {
viz_main_.SetLogMessagesForHost(std::move(log_messages));
+ instance_ = this;
}
GpuChildThread::GpuChildThread(const InProcessChildThreadParams& params,
@@ -191,6 +195,7 @@ GpuChildThread::GpuChildThread(const ChildThreadImpl::Options& options,
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kInProcessGPU));
}
+ instance_ = this;
}
GpuChildThread::~GpuChildThread() = default;
@@ -271,6 +276,10 @@ void GpuChildThread::OnGpuServiceConnection(viz::GpuServiceImpl* gpu_service) {
overlay_factory_cb);
#endif
+#if defined(TOOLKIT_QT)
+ gpu_channel_manager()->set_share_group(GetContentClient()->browser()->GetInProcessGpuShareGroup());
+#endif
+
// Only set once per process instance.
service_factory_.reset(new GpuServiceFactory(
gpu_service->gpu_preferences(),