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

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

Issue 1568563002: Added a way for sync point clients to issue out of order waits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: InProcessCommandBuffer::SignalSyncTokenOnGpuThread also waits out of order Created 4 years, 11 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_channel.cc
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index c8c11a4877da9134649e4ac2f7ce783bbb75320e..e3f920d96b0ed6d45b9297ced61297f0098182c6 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -165,6 +165,11 @@ void GpuChannelMessageQueue::BeginMessageProcessing(
sync_point_order_data_->BeginProcessingOrderNumber(msg->order_number);
}
+void GpuChannelMessageQueue::PauseMessageProcessing(
+ const GpuChannelMessage* msg) {
+ sync_point_order_data_->PauseProcessingOrderNumber(msg->order_number);
+}
+
bool GpuChannelMessageQueue::MessageProcessed() {
base::AutoLock auto_lock(channel_messages_lock_);
DCHECK(!channel_messages_.empty());
@@ -858,6 +863,7 @@ void GpuChannel::HandleMessage() {
// a flush. In this case we should not pop the message from the queue.
if (stub && stub->HasUnprocessedCommands()) {
DCHECK_EQ((uint32_t)GpuCommandBufferMsg_AsyncFlush::ID, message.type());
+ message_queue_->PauseMessageProcessing(m);
// If the stub is still scheduled then we were preempted and need to
// schedule a wakeup otherwise some other event will wake us up e.g. sync
// point completion. No DCHECK for preemption flag because that can change

Powered by Google App Engine
This is Rietveld 408576698