| OLD | NEW |
| 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 Loading... |
| 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 | |
| 235 uint64_t CommandBufferLocal::GenerateFenceSyncRelease() { | 231 uint64_t CommandBufferLocal::GenerateFenceSyncRelease() { |
| 236 return next_fence_sync_release_++; | 232 return next_fence_sync_release_++; |
| 237 } | 233 } |
| 238 | 234 |
| 239 bool CommandBufferLocal::IsFenceSyncRelease(uint64_t release) { | 235 bool CommandBufferLocal::IsFenceSyncRelease(uint64_t release) { |
| 240 return release > 0 && release < next_fence_sync_release_; | 236 return release > 0 && release < next_fence_sync_release_; |
| 241 } | 237 } |
| 242 | 238 |
| 243 bool CommandBufferLocal::IsFenceSyncFlushed(uint64_t release) { | 239 bool CommandBufferLocal::IsFenceSyncFlushed(uint64_t release) { |
| 244 return IsFenceSyncRelease(release); | 240 return IsFenceSyncRelease(release); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); | 336 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); |
| 341 OnContextLost(state.context_lost_reason); | 337 OnContextLost(state.context_lost_reason); |
| 342 } | 338 } |
| 343 | 339 |
| 344 void CommandBufferLocal::OnContextLost(uint32_t reason) { | 340 void CommandBufferLocal::OnContextLost(uint32_t reason) { |
| 345 if (client_) | 341 if (client_) |
| 346 client_->DidLoseContext(); | 342 client_->DidLoseContext(); |
| 347 } | 343 } |
| 348 | 344 |
| 349 } // namespace mus | 345 } // namespace mus |
| OLD | NEW |