OLD | NEW |
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 Loading... |
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( |
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 Loading... |
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 |
OLD | NEW |