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

Side by Side Diff: gpu/command_buffer/service/command_buffer_service.cc

Issue 782583003: List sync points to wait on in AsyncFlush message Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 "gpu/command_buffer/service/command_buffer_service.h" 5 #include "gpu/command_buffer/service/command_buffer_service.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 void CommandBufferService::WaitForTokenInRange(int32 start, int32 end) { 62 void CommandBufferService::WaitForTokenInRange(int32 start, int32 end) {
63 DCHECK(error_ != error::kNoError || InRange(start, end, token_)); 63 DCHECK(error_ != error::kNoError || InRange(start, end, token_));
64 } 64 }
65 65
66 void CommandBufferService::WaitForGetOffsetInRange(int32 start, int32 end) { 66 void CommandBufferService::WaitForGetOffsetInRange(int32 start, int32 end) {
67 DCHECK(error_ != error::kNoError || InRange(start, end, get_offset_)); 67 DCHECK(error_ != error::kNoError || InRange(start, end, get_offset_));
68 } 68 }
69 69
70 void CommandBufferService::Flush(int32 put_offset) { 70 void CommandBufferService::Flush(int32 put_offset,
71 const std::vector<uint32>& sync_points) {
71 if (put_offset < 0 || put_offset > num_entries_) { 72 if (put_offset < 0 || put_offset > num_entries_) {
72 error_ = gpu::error::kOutOfBounds; 73 error_ = gpu::error::kOutOfBounds;
73 return; 74 return;
74 } 75 }
75 76
76 put_offset_ = put_offset; 77 put_offset_ = put_offset;
77 78
78 if (!put_offset_change_callback_.is_null()) 79 if (!put_offset_change_callback_.is_null())
79 put_offset_change_callback_.Run(); 80 put_offset_change_callback_.Run();
80 } 81 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 const GetBufferChangedCallback& callback) { 186 const GetBufferChangedCallback& callback) {
186 get_buffer_change_callback_ = callback; 187 get_buffer_change_callback_ = callback;
187 } 188 }
188 189
189 void CommandBufferService::SetParseErrorCallback( 190 void CommandBufferService::SetParseErrorCallback(
190 const base::Closure& callback) { 191 const base::Closure& callback) {
191 parse_error_callback_ = callback; 192 parse_error_callback_ = callback;
192 } 193 }
193 194
194 } // namespace gpu 195 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/command_buffer_service.h ('k') | gpu/command_buffer/service/command_buffer_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698