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

Side by Side Diff: components/mus/gles2/command_buffer_impl.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: Allow WaitOutOfOrder if no client order data 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
« no previous file with comments | « no previous file | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/mus/gles2/command_buffer_impl.h" 5 #include "components/mus/gles2/command_buffer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "components/mus/gles2/command_buffer_driver.h" 10 #include "components/mus/gles2/command_buffer_driver.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 bool CommandBufferImpl::FlushHelper(int32_t put_offset, 208 bool CommandBufferImpl::FlushHelper(int32_t put_offset,
209 uint32_t order_num) { 209 uint32_t order_num) {
210 DCHECK(driver_->IsScheduled()); 210 DCHECK(driver_->IsScheduled());
211 driver_->sync_point_order_data()->BeginProcessingOrderNumber(order_num); 211 driver_->sync_point_order_data()->BeginProcessingOrderNumber(order_num);
212 driver_->Flush(put_offset); 212 driver_->Flush(put_offset);
213 213
214 // Return false if the Flush is not finished, so the CommandBufferTaskRunner 214 // Return false if the Flush is not finished, so the CommandBufferTaskRunner
215 // will not remove this task from the task queue. 215 // will not remove this task from the task queue.
216 const bool complete = !driver_->HasUnprocessedCommands(); 216 const bool complete = !driver_->HasUnprocessedCommands();
217 if (complete) 217 if (!complete)
218 driver_->sync_point_order_data()->PauseProcessingOrderNumber(order_num);
219 else
218 driver_->sync_point_order_data()->FinishProcessingOrderNumber(order_num); 220 driver_->sync_point_order_data()->FinishProcessingOrderNumber(order_num);
219 return complete; 221 return complete;
220 } 222 }
221 223
222 bool CommandBufferImpl::MakeProgressHelper( 224 bool CommandBufferImpl::MakeProgressHelper(
223 int32_t last_get_offset, 225 int32_t last_get_offset,
224 const base::Callback<void(mojom::CommandBufferStatePtr)>& callback) { 226 const base::Callback<void(mojom::CommandBufferStatePtr)>& callback) {
225 DCHECK(driver_->IsScheduled()); 227 DCHECK(driver_->IsScheduled());
226 mojom::CommandBufferStatePtr state = 228 mojom::CommandBufferStatePtr state =
227 mojom::CommandBufferState::From(driver_->GetLastState()); 229 mojom::CommandBufferState::From(driver_->GetLastState());
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 driver_.get(), 285 driver_.get(),
284 base::Bind(&CommandBufferImpl::DeleteHelper, base::Unretained(this))); 286 base::Bind(&CommandBufferImpl::DeleteHelper, base::Unretained(this)));
285 } 287 }
286 288
287 bool CommandBufferImpl::DeleteHelper() { 289 bool CommandBufferImpl::DeleteHelper() {
288 delete this; 290 delete this;
289 return true; 291 return true;
290 } 292 }
291 293
292 } // namespace mus 294 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698