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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some fixes 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: gpu/command_buffer/service/in_process_command_buffer.cc
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index 6997cecdbf2de82fd668b4f7155050e5790e0727..225d9ea4ddd727283f5d1db3f9ddcdddf1ee65e3 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -600,6 +600,15 @@ void InProcessCommandBuffer::DestroyTransferBuffer(int32 id) {
QueueTask(task);
}
+void InProcessCommandBuffer::GetRouteInformation(int* channel_id,
+ uint32_t* route_id) {
+ if (channel_id)
+ *channel_id = 0;
+
+ if (route_id)
+ *route_id = 0;
piman 2015/09/10 23:55:32 As mentioned above, we're going to need an impleme
David Yen 2015/09/23 18:30:34 Done.
+}
+
void InProcessCommandBuffer::DestroyTransferBufferOnGpuThread(int32 id) {
base::AutoLock lock(command_buffer_lock_);
command_buffer_->DestroyTransferBuffer(id);
@@ -770,8 +779,13 @@ void InProcessCommandBuffer::RetireSyncPointOnGpuThread(uint32 sync_point) {
base::AutoLock lock(command_buffer_lock_);
make_current_success = MakeCurrent();
}
- if (make_current_success)
- mailbox_manager->PushTextureUpdates(sync_point);
+ if (make_current_success) {
+ // Old sync points are global and not namespaced by gpu_channel &
+ // route_id. We can simply use the global sync point number as the
+ // release count with 0 for both gpu_channel and route_id. This will all
+ // be removed once the old sync points are replaced.
+ mailbox_manager->PushTextureUpdates(0, 0, sync_point);
+ }
}
service_->sync_point_manager()->RetireSyncPoint(sync_point);
}
@@ -789,7 +803,11 @@ bool InProcessCommandBuffer::WaitSyncPointOnGpuThread(unsigned sync_point) {
service_->sync_point_manager()->WaitSyncPoint(sync_point);
gles2::MailboxManager* mailbox_manager =
decoder_->GetContextGroup()->mailbox_manager();
- mailbox_manager->PullTextureUpdates(sync_point);
+ // Old sync points are global and not namespaced by gpu_channel &
+ // route_id. We can simply use the global sync point number as the
+ // release count with 0 for both gpu_channel and route_id. This will all
+ // be removed once the old sync points are replaced.
+ mailbox_manager->PullTextureUpdates(0, 0, sync_point);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698