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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 } | 226 } |
227 | 227 |
228 gpu::CommandBufferNamespace CommandBufferLocal::GetNamespaceID() const { | 228 gpu::CommandBufferNamespace CommandBufferLocal::GetNamespaceID() const { |
229 return gpu::CommandBufferNamespace::MOJO_LOCAL; | 229 return gpu::CommandBufferNamespace::MOJO_LOCAL; |
230 } | 230 } |
231 | 231 |
232 uint64_t CommandBufferLocal::GetCommandBufferID() const { | 232 uint64_t CommandBufferLocal::GetCommandBufferID() const { |
233 return command_buffer_id_; | 233 return command_buffer_id_; |
234 } | 234 } |
235 | 235 |
| 236 uint32_t CommandBufferLocal::GetExtraCommandBufferData() const { |
| 237 return 0; |
| 238 } |
| 239 |
236 uint64_t CommandBufferLocal::GenerateFenceSyncRelease() { | 240 uint64_t CommandBufferLocal::GenerateFenceSyncRelease() { |
237 return next_fence_sync_release_++; | 241 return next_fence_sync_release_++; |
238 } | 242 } |
239 | 243 |
240 bool CommandBufferLocal::IsFenceSyncRelease(uint64_t release) { | 244 bool CommandBufferLocal::IsFenceSyncRelease(uint64_t release) { |
241 return release > 0 && release < next_fence_sync_release_; | 245 return release > 0 && release < next_fence_sync_release_; |
242 } | 246 } |
243 | 247 |
244 bool CommandBufferLocal::IsFenceSyncFlushed(uint64_t release) { | 248 bool CommandBufferLocal::IsFenceSyncFlushed(uint64_t release) { |
245 return IsFenceSyncRelease(release); | 249 return IsFenceSyncRelease(release); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); | 345 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); |
342 OnContextLost(state.context_lost_reason); | 346 OnContextLost(state.context_lost_reason); |
343 } | 347 } |
344 | 348 |
345 void CommandBufferLocal::OnContextLost(uint32_t reason) { | 349 void CommandBufferLocal::OnContextLost(uint32_t reason) { |
346 if (client_) | 350 if (client_) |
347 client_->DidLoseContext(); | 351 client_->DidLoseContext(); |
348 } | 352 } |
349 | 353 |
350 } // namespace mus | 354 } // namespace mus |
OLD | NEW |