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

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: minor 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 962104e8a306a16b2c4f482bc8e9f6890dc77c98..10a626238b3d998c0bc59c7a0a8b29b33537c8bb 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -485,6 +485,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
@@ -528,10 +530,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_);
@@ -551,7 +565,6 @@ void GpuCommandBufferStub::OnInitialize(
this,
handle_);
} else {
- GpuChannelManager* manager = channel_->gpu_channel_manager();
surface_ = manager->GetDefaultOffscreenSurface();
}
@@ -682,8 +695,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_));
}
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | gpu/command_buffer/service/in_process_command_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698