Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Unified Diff: content/gpu/in_process_gpu_thread.cc

Issue 1231263003: Share SyncPointManager between ipc and in-process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/gpu/in_process_gpu_thread.cc
diff --git a/content/gpu/in_process_gpu_thread.cc b/content/gpu/in_process_gpu_thread.cc
index d8329f2e690edca02ac1c66e9858ac76fc7c5a6c..88d9a642a28edbc45cd14df286823e792abac3b7 100644
--- a/content/gpu/in_process_gpu_thread.cc
+++ b/content/gpu/in_process_gpu_thread.cc
@@ -10,13 +10,15 @@
namespace content {
-InProcessGpuThread::InProcessGpuThread(const InProcessChildThreadParams& params)
+InProcessGpuThread::InProcessGpuThread(
+ const InProcessChildThreadParams& params,
+ gpu::SyncPointManager* sync_point_manager_override)
: base::Thread("Chrome_InProcGpuThread"),
params_(params),
gpu_process_(NULL),
+ sync_point_manager_override_(sync_point_manager_override),
gpu_memory_buffer_factory_(GpuMemoryBufferFactory::Create(
- GpuChildThread::GetGpuMemoryBufferFactoryType())) {
-}
+ GpuChildThread::GetGpuMemoryBufferFactoryType())) {}
InProcessGpuThread::~InProcessGpuThread() {
Stop();
@@ -26,8 +28,8 @@ void InProcessGpuThread::Init() {
gpu_process_ = new GpuProcess();
// The process object takes ownership of the thread object, so do not
// save and delete the pointer.
- gpu_process_->set_main_thread(
- new GpuChildThread(params_, gpu_memory_buffer_factory_.get()));
+ gpu_process_->set_main_thread(new GpuChildThread(
+ params_, gpu_memory_buffer_factory_.get(), sync_point_manager_override_));
}
void InProcessGpuThread::CleanUp() {
@@ -37,7 +39,7 @@ void InProcessGpuThread::CleanUp() {
base::Thread* CreateInProcessGpuThread(
const InProcessChildThreadParams& params) {
- return new InProcessGpuThread(params);
+ return new InProcessGpuThread(params, nullptr);
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698