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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 1339203002: Added global order numbers to in process command buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reverted unnecessary changes Created 5 years, 3 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/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_));
}

Powered by Google App Engine
This is Rietveld 408576698