summaryrefslogtreecommitdiff
path: root/chromium/content/gpu/gpu_child_thread.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-08-04 18:07:02 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-05-03 10:57:05 +0200
commitabce808ab70dc38feeaced0de07632b5a689ffbc (patch)
tree270c060b9bfbfdf961c8d84d3a5f92eb9097209c /chromium/content/gpu/gpu_child_thread.cc
parentc119fb79698bee8017b88a80a9df329a7e63be55 (diff)
downloadqtwebengine-chromium-abce808ab70dc38feeaced0de07632b5a689ffbc.tar.gz
Add accessors and seams for the Qt delegated renderer integration.
This is needed to fetch the MessageLoop, the MailboxManager and the SyncPointManager of the GPU in-process host. And fetch the right shared context for the in GPU thread. Change-Id: I7f38e32b2df11da5b046f16643841d34260c11fb Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/content/gpu/gpu_child_thread.cc')
-rw-r--r--chromium/content/gpu/gpu_child_thread.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chromium/content/gpu/gpu_child_thread.cc b/chromium/content/gpu/gpu_child_thread.cc
index da3646ab674..de49633c845 100644
--- a/chromium/content/gpu/gpu_child_thread.cc
+++ b/chromium/content/gpu/gpu_child_thread.cc
@@ -20,6 +20,7 @@
#include "content/common/establish_channel_params.h"
#include "content/common/gpu_host_messages.h"
#include "content/gpu/gpu_service_factory.h"
+#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/service_manager_connection.h"
@@ -144,6 +145,8 @@ ChildThreadImpl::Options GetOptions(
} // namespace
+GpuChildThread* GpuChildThread::instance_ = 0;
+
GpuChildThread::GpuChildThread(
std::unique_ptr<gpu::GpuWatchdogThread> watchdog_thread,
bool dead_on_arrival,
@@ -166,6 +169,8 @@ GpuChildThread::GpuChildThread(
target_services_ = NULL;
#endif
g_thread_safe_sender.Get() = thread_safe_sender();
+
+ instance_ = this;
}
GpuChildThread::GpuChildThread(
@@ -197,6 +202,8 @@ GpuChildThread::GpuChildThread(
switches::kInProcessGPU));
g_thread_safe_sender.Get() = thread_safe_sender();
+
+ instance_ = this;
}
GpuChildThread::~GpuChildThread() {
@@ -339,6 +346,10 @@ void GpuChildThread::CreateGpuService(
ChildProcess::current()->GetShutDownEvent());
CHECK(gpu_service_->media_gpu_channel_manager());
+#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_->media_gpu_channel_manager()->AsWeakPtr()));