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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/gpu/gpu_command_buffer_stub.h" 5 #include "content/common/gpu/gpu_command_buffer_stub.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 base::Bind(&GpuCommandBufferStub::OnSignalAck, this->AsWeakPtr(), id)); 1002 base::Bind(&GpuCommandBufferStub::OnSignalAck, this->AsWeakPtr(), id));
1003 } 1003 }
1004 1004
1005 void GpuCommandBufferStub::OnSignalSyncToken(const gpu::SyncToken& sync_token, 1005 void GpuCommandBufferStub::OnSignalSyncToken(const gpu::SyncToken& sync_token,
1006 uint32_t id) { 1006 uint32_t id) {
1007 scoped_refptr<gpu::SyncPointClientState> release_state = 1007 scoped_refptr<gpu::SyncPointClientState> release_state =
1008 sync_point_manager_->GetSyncPointClientState( 1008 sync_point_manager_->GetSyncPointClientState(
1009 sync_token.namespace_id(), sync_token.command_buffer_id()); 1009 sync_token.namespace_id(), sync_token.command_buffer_id());
1010 1010
1011 if (release_state) { 1011 if (release_state) {
1012 sync_point_client_->Wait(release_state.get(), sync_token.release_count(), 1012 // This wait must use the out of order variant since it is not processed
1013 base::Bind(&GpuCommandBufferStub::OnSignalAck, 1013 // within the global order.
piman 2016/01/07 01:16:22 I don't think that's true, this is processed on th
David Yen 2016/01/07 18:40:58 You are right, this should be Wait instead of Wait
1014 this->AsWeakPtr(), id)); 1014 sync_point_client_->WaitOutOfOrder(
1015 release_state.get(), sync_token.release_count(),
1016 base::Bind(&GpuCommandBufferStub::OnSignalAck, this->AsWeakPtr(), id));
1015 } else { 1017 } else {
1016 OnSignalAck(id); 1018 OnSignalAck(id);
1017 } 1019 }
1018 } 1020 }
1019 1021
1020 void GpuCommandBufferStub::OnSignalAck(uint32_t id) { 1022 void GpuCommandBufferStub::OnSignalAck(uint32_t id) {
1021 Send(new GpuCommandBufferMsg_SignalAck(route_id_, id)); 1023 Send(new GpuCommandBufferMsg_SignalAck(route_id_, id));
1022 } 1024 }
1023 1025
1024 void GpuCommandBufferStub::OnSignalQuery(uint32_t query_id, uint32_t id) { 1026 void GpuCommandBufferStub::OnSignalQuery(uint32_t query_id, uint32_t id) {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 result)); 1257 result));
1256 } 1258 }
1257 1259
1258 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, 1260 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase,
1259 base::TimeDelta interval) { 1261 base::TimeDelta interval) {
1260 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, 1262 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase,
1261 interval)); 1263 interval));
1262 } 1264 }
1263 1265
1264 } // namespace content 1266 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698