Index: content/gpu/gpu_child_thread.cc |
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc |
index dc399e05fbdd9c0f0cfdfa3ef37f69f8dedafa68..9377cd76e1c4380c2363898f3f363f91816df365 100644 |
--- a/content/gpu/gpu_child_thread.cc |
+++ b/content/gpu/gpu_child_thread.cc |
@@ -15,6 +15,7 @@ |
#include "content/gpu/gpu_watchdog_thread.h" |
#include "content/public/common/content_client.h" |
#include "content/public/common/content_switches.h" |
+#include "gpu/command_buffer/service/sync_point_manager.h" |
#include "gpu/config/gpu_info_collector.h" |
#include "ipc/ipc_channel_handle.h" |
#include "ipc/ipc_sync_message_filter.h" |
@@ -119,6 +120,8 @@ GpuChildThread::GpuChildThread( |
GpuMemoryBufferFactory* gpu_memory_buffer_factory) |
: ChildThreadImpl(GetOptions(gpu_memory_buffer_factory)), |
dead_on_arrival_(dead_on_arrival), |
+ sync_point_manager_(new gpu::SyncPointManager(false)), |
+ sync_point_manager_ptr_(sync_point_manager_.get()), |
gpu_info_(gpu_info), |
deferred_messages_(deferred_messages), |
in_browser_process_(false), |
@@ -132,13 +135,20 @@ GpuChildThread::GpuChildThread( |
GpuChildThread::GpuChildThread( |
const InProcessChildThreadParams& params, |
- GpuMemoryBufferFactory* gpu_memory_buffer_factory) |
+ GpuMemoryBufferFactory* gpu_memory_buffer_factory, |
+ gpu::SyncPointManager* sync_point_manager_override) |
: ChildThreadImpl(ChildThreadImpl::Options::Builder() |
.InBrowserProcess(params) |
.AddStartupFilter(new GpuMemoryBufferMessageFilter( |
gpu_memory_buffer_factory)) |
.Build()), |
dead_on_arrival_(false), |
+ sync_point_manager_(sync_point_manager_override |
+ ? nullptr |
+ : new gpu::SyncPointManager(false)), |
+ sync_point_manager_ptr_(sync_point_manager_override |
+ ? sync_point_manager_override |
+ : sync_point_manager_.get()), |
in_browser_process_(true), |
gpu_memory_buffer_factory_(gpu_memory_buffer_factory) { |
#if defined(OS_WIN) |
@@ -245,7 +255,8 @@ void GpuChildThread::OnInitialize() { |
GetRouter(), watchdog_thread_.get(), |
ChildProcess::current()->io_task_runner(), |
ChildProcess::current()->GetShutDownEvent(), channel(), |
- GetAttachmentBroker(), gpu_memory_buffer_factory_)); |
+ GetAttachmentBroker(), sync_point_manager_ptr_, |
+ gpu_memory_buffer_factory_)); |
#if defined(USE_OZONE) |
ui::OzonePlatform::GetInstance() |