summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-09-20 15:00:47 +0200
committerAndras Becsi <andras.becsi@digia.com>2014-06-04 18:08:51 +0200
commitbf1fb16eebf9ca9e29acfa63b42e68c6e96abdf9 (patch)
tree7c57f77a20505ece9d5db76791879f1fdc6c4521
parent4fc055fe9ff8a82ddf6df5402401247f3b86a0d3 (diff)
<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: Zeno Albisser <zeno.albisser@digia.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 eb4d224d9b7..1ab04d94324 100644
--- a/chromium/content/common/gpu/gpu_channel_manager.h
+++ b/chromium/content/common/gpu/gpu_channel_manager.h
@@ -90,6 +90,8 @@ class GpuChannelManager : public IPC::Listener,
gpu::gles2::ProgramCache* program_cache();
+ gpu::gles2::MailboxManager* mailbox_manager() { return mailbox_manager_.get(); }
+
GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; }
GpuEventsDispatcher* gpu_devtools_events_dispatcher() {
diff --git a/chromium/content/gpu/gpu_child_thread.cc b/chromium/content/gpu/gpu_child_thread.cc
index 170b3648b56..a84a9e0a436 100644
--- a/chromium/content/gpu/gpu_child_thread.cc
+++ b/chromium/content/gpu/gpu_child_thread.cc
@@ -40,6 +40,8 @@ bool GpuProcessLogMessageHandler(int severity,
} // namespace
+GpuChildThread* GpuChildThread::instance_ = 0;
+
GpuChildThread::GpuChildThread(GpuWatchdogThread* watchdog_thread,
bool dead_on_arrival,
const gpu::GPUInfo& gpu_info,
@@ -53,6 +55,8 @@ GpuChildThread::GpuChildThread(GpuWatchdogThread* watchdog_thread,
target_services_ = NULL;
#endif
g_thread_safe_sender.Get() = thread_safe_sender();
+
+ instance_ = this;
}
GpuChildThread::GpuChildThread(const std::string& channel_id)
@@ -71,6 +75,8 @@ GpuChildThread::GpuChildThread(const std::string& channel_id)
VLOG(1) << "gfx::GLSurface::InitializeOneOff()";
}
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 ff0c9258cd1..82bb32a67aa 100644
--- a/chromium/content/gpu/gpu_child_thread.h
+++ b/chromium/content/gpu/gpu_child_thread.h
@@ -56,6 +56,10 @@ class GpuChildThread : public ChildThread {
virtual bool Send(IPC::Message* msg) OVERRIDE;
virtual 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 ChildThread {
// Whether the GPU thread is running in the browser process.
bool in_browser_process_;
+ static GpuChildThread* instance_;
+
DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
};