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

Side by Side Diff: gpu/command_buffer/service/in_process_command_buffer.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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/in_process_command_buffer.h" 5 #include "gpu/command_buffer/service/in_process_command_buffer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 942
943 scoped_refptr<gpu::SyncPointClientState> release_state = 943 scoped_refptr<gpu::SyncPointClientState> release_state =
944 sync_point_manager->GetSyncPointClientState( 944 sync_point_manager->GetSyncPointClientState(
945 sync_token.namespace_id(), sync_token.command_buffer_id()); 945 sync_token.namespace_id(), sync_token.command_buffer_id());
946 946
947 if (!release_state) { 947 if (!release_state) {
948 callback.Run(); 948 callback.Run();
949 return; 949 return;
950 } 950 }
951 951
952 sync_point_client_->Wait(release_state.get(), sync_token.release_count(), 952 sync_point_client_->WaitOutOfOrder(
piman 2016/01/07 01:16:22 ditto, how is this different than WaitFenceSyncOnG
David Yen 2016/01/07 18:40:58 Here because order numbers are only generated in F
953 WrapCallback(callback)); 953 release_state.get(), sync_token.release_count(), WrapCallback(callback));
954 } 954 }
955 955
956 void InProcessCommandBuffer::SignalQuery(unsigned query_id, 956 void InProcessCommandBuffer::SignalQuery(unsigned query_id,
957 const base::Closure& callback) { 957 const base::Closure& callback) {
958 CheckSequencedThread(); 958 CheckSequencedThread();
959 QueueTask(base::Bind(&InProcessCommandBuffer::SignalQueryOnGpuThread, 959 QueueTask(base::Bind(&InProcessCommandBuffer::SignalQueryOnGpuThread,
960 base::Unretained(this), 960 base::Unretained(this),
961 query_id, 961 query_id,
962 WrapCallback(callback))); 962 WrapCallback(callback)));
963 } 963 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 framebuffer_completeness_cache_ = 1149 framebuffer_completeness_cache_ =
1150 new gpu::gles2::FramebufferCompletenessCache; 1150 new gpu::gles2::FramebufferCompletenessCache;
1151 return framebuffer_completeness_cache_; 1151 return framebuffer_completeness_cache_;
1152 } 1152 }
1153 1153
1154 SyncPointManager* GpuInProcessThread::sync_point_manager() { 1154 SyncPointManager* GpuInProcessThread::sync_point_manager() {
1155 return sync_point_manager_; 1155 return sync_point_manager_;
1156 } 1156 }
1157 1157
1158 } // namespace gpu 1158 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698