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

Side by Side Diff: components/mus/gles2/command_buffer_local.cc

Issue 1489573003: Added an extra sync token field for extra command buffer identification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return False on invalid stream id Created 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_local.h" 5 #include "components/mus/gles2/command_buffer_local.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "components/mus/gles2/command_buffer_local_client.h" 10 #include "components/mus/gles2/command_buffer_local_client.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 222
223 gpu::CommandBufferNamespace CommandBufferLocal::GetNamespaceID() const { 223 gpu::CommandBufferNamespace CommandBufferLocal::GetNamespaceID() const {
224 return gpu::CommandBufferNamespace::MOJO_LOCAL; 224 return gpu::CommandBufferNamespace::MOJO_LOCAL;
225 } 225 }
226 226
227 uint64_t CommandBufferLocal::GetCommandBufferID() const { 227 uint64_t CommandBufferLocal::GetCommandBufferID() const {
228 return command_buffer_id_; 228 return command_buffer_id_;
229 } 229 }
230 230
231 int32_t CommandBufferLocal::GetExtraCommandBufferData() const {
232 return 0;
233 }
234
231 uint64_t CommandBufferLocal::GenerateFenceSyncRelease() { 235 uint64_t CommandBufferLocal::GenerateFenceSyncRelease() {
232 return next_fence_sync_release_++; 236 return next_fence_sync_release_++;
233 } 237 }
234 238
235 bool CommandBufferLocal::IsFenceSyncRelease(uint64_t release) { 239 bool CommandBufferLocal::IsFenceSyncRelease(uint64_t release) {
236 return release > 0 && release < next_fence_sync_release_; 240 return release > 0 && release < next_fence_sync_release_;
237 } 241 }
238 242
239 bool CommandBufferLocal::IsFenceSyncFlushed(uint64_t release) { 243 bool CommandBufferLocal::IsFenceSyncFlushed(uint64_t release) {
240 return IsFenceSyncRelease(release); 244 return IsFenceSyncRelease(release);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); 340 gpu::CommandBuffer::State state = command_buffer_->GetLastState();
337 OnContextLost(state.context_lost_reason); 341 OnContextLost(state.context_lost_reason);
338 } 342 }
339 343
340 void CommandBufferLocal::OnContextLost(uint32_t reason) { 344 void CommandBufferLocal::OnContextLost(uint32_t reason) {
341 if (client_) 345 if (client_)
342 client_->DidLoseContext(); 346 client_->DidLoseContext();
343 } 347 }
344 348
345 } // namespace mus 349 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/gles2/command_buffer_local.h ('k') | content/common/gpu/client/command_buffer_proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698