Index: content/common/gpu/gpu_command_buffer_stub.cc |
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc |
index 3388f33f05dabc0f69b0f01b9264b0aa744c51ec..2226771fdeec13193255677075fe107ddfa14a14 100644 |
--- a/content/common/gpu/gpu_command_buffer_stub.cc |
+++ b/content/common/gpu/gpu_command_buffer_stub.cc |
@@ -478,6 +478,8 @@ void GpuCommandBufferStub::Destroy() { |
// destroy it before those. |
scheduler_.reset(); |
+ sync_point_client_.reset(); |
+ |
bool have_context = false; |
if (decoder_ && decoder_->GetGLContext()) { |
// Try to make the context current regardless of whether it was lost, so we |
@@ -521,10 +523,22 @@ void GpuCommandBufferStub::OnInitialize( |
bool result = command_buffer_->Initialize(); |
DCHECK(result); |
+ GpuChannelManager* manager = channel_->gpu_channel_manager(); |
+ DCHECK(manager); |
+ |
+ gpu::SyncPointManager* sync_point_manager = manager->sync_point_manager(); |
+ DCHECK(sync_point_manager); |
+ |
decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group_.get())); |
scheduler_.reset(new gpu::GpuScheduler(command_buffer_.get(), |
decoder_.get(), |
decoder_.get())); |
+ sync_point_client_ = |
+ sync_point_manager->CreateSyncPointClient( |
+ channel_->GetSyncPointClientState(), |
+ gpu::CommandBufferNamespace::GPU_IO, |
+ command_buffer_id_); |
+ |
if (preemption_flag_.get()) |
scheduler_->SetPreemptByFlag(preemption_flag_); |
@@ -544,7 +558,6 @@ void GpuCommandBufferStub::OnInitialize( |
this, |
handle_); |
} else { |
- GpuChannelManager* manager = channel_->gpu_channel_manager(); |
surface_ = manager->GetDefaultOffscreenSurface(); |
} |
@@ -675,8 +688,7 @@ void GpuCommandBufferStub::OnInitialize( |
Send(reply_message); |
if (handle_.is_null() && !active_url_.is_empty()) { |
- GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager(); |
- gpu_channel_manager->Send(new GpuHostMsg_DidCreateOffscreenContext( |
+ manager->Send(new GpuHostMsg_DidCreateOffscreenContext( |
active_url_)); |
} |