summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-09-20 15:00:47 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-06-23 13:26:21 +0000
commitb30d4a7f0969ecaa9b1e49a85b2fc07c614c157e (patch)
tree0fed9e3089ad379e034b8c3a4ecaafd9cd618152
parent89a65d762e538adea595073b7cce0e13b6b6fa41 (diff)
downloadqtwebengine-chromium-b30d4a7f0969ecaa9b1e49a85b2fc07c614c157e.tar.gz
<chromium> Add accessors for the Qt delegated renderer integration.
This is needed to fetch the MessageLoop, the MailboxManager and the SyncPointManager of the GPU in-process host. Change-Id: I7f38e32b2df11da5b046f16643841d34260c11fb Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com> Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com>
-rw-r--r--chromium/content/common/gpu/gpu_channel_manager.h2
-rw-r--r--chromium/content/gpu/gpu_child_thread.cc6
-rw-r--r--chromium/content/gpu/gpu_child_thread.h6
3 files changed, 14 insertions, 0 deletions
diff --git a/chromium/content/common/gpu/gpu_channel_manager.h b/chromium/content/common/gpu/gpu_channel_manager.h
index a15a8adbb78..db9672b6f4d 100644
--- a/chromium/content/common/gpu/gpu_channel_manager.h
+++ b/chromium/content/common/gpu/gpu_channel_manager.h
@@ -90,6 +90,8 @@ class CONTENT_EXPORT GpuChannelManager : public IPC::Listener,
gpu::gles2::ProgramCache* program_cache();
gpu::gles2::ShaderTranslatorCache* shader_translator_cache();
+ gpu::gles2::MailboxManager* mailbox_manager() { return mailbox_manager_.get(); }
+
GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; }
GpuChannel* LookupChannel(int32 client_id);
diff --git a/chromium/content/gpu/gpu_child_thread.cc b/chromium/content/gpu/gpu_child_thread.cc
index 3d26c84e876..0b37be33ede 100644
--- a/chromium/content/gpu/gpu_child_thread.cc
+++ b/chromium/content/gpu/gpu_child_thread.cc
@@ -60,6 +60,8 @@ ChildThreadImpl::Options GetOptions() {
} // namespace
+GpuChildThread* GpuChildThread::instance_ = 0;
+
GpuChildThread::GpuChildThread(GpuWatchdogThread* watchdog_thread,
bool dead_on_arrival,
const gpu::GPUInfo& gpu_info,
@@ -74,6 +76,8 @@ GpuChildThread::GpuChildThread(GpuWatchdogThread* watchdog_thread,
target_services_ = NULL;
#endif
g_thread_safe_sender.Get() = thread_safe_sender();
+
+ instance_ = this;
}
GpuChildThread::GpuChildThread(const InProcessChildThreadParams& params)
@@ -98,6 +102,8 @@ GpuChildThread::GpuChildThread(const InProcessChildThreadParams& params)
VLOG(1) << "gfx::GLSurface::InitializeOneOff failed";
#endif
g_thread_safe_sender.Get() = thread_safe_sender();
+
+ instance_ = this;
}
GpuChildThread::~GpuChildThread() {
diff --git a/chromium/content/gpu/gpu_child_thread.h b/chromium/content/gpu/gpu_child_thread.h
index 70a6bb8c13a..b10ae81ab2b 100644
--- a/chromium/content/gpu/gpu_child_thread.h
+++ b/chromium/content/gpu/gpu_child_thread.h
@@ -55,6 +55,10 @@ class GpuChildThread : public ChildThreadImpl {
bool Send(IPC::Message* msg) override;
bool OnControlMessageReceived(const IPC::Message& msg) override;
+ GpuChannelManager* ChannelManager() const { return gpu_channel_manager_.get(); }
+
+ static GpuChildThread* instance() { return instance_; }
+
private:
// Message handlers.
void OnInitialize();
@@ -94,6 +98,8 @@ class GpuChildThread : public ChildThreadImpl {
// Whether the GPU thread is running in the browser process.
bool in_browser_process_;
+ static GpuChildThread* instance_;
+
DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
};