| OLD | NEW |
| 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 "mojo/gles2/command_buffer_client_impl.h" | 5 #include "mojo/gles2/command_buffer_client_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 return; | 330 return; |
| 331 } | 331 } |
| 332 | 332 |
| 333 if (state.generation - last_state_.generation < 0x80000000U) | 333 if (state.generation - last_state_.generation < 0x80000000U) |
| 334 last_state_ = state; | 334 last_state_ = state; |
| 335 } | 335 } |
| 336 | 336 |
| 337 void CommandBufferClientImpl::SetLock(base::Lock* lock) { | 337 void CommandBufferClientImpl::SetLock(base::Lock* lock) { |
| 338 } | 338 } |
| 339 | 339 |
| 340 bool CommandBufferClientImpl::IsGpuChannelLost() { |
| 341 // This is only possible for out-of-process command buffers. |
| 342 return false; |
| 343 } |
| 344 |
| 340 void CommandBufferClientImpl::EnsureWorkVisible() { | 345 void CommandBufferClientImpl::EnsureWorkVisible() { |
| 341 // This is only relevant for out-of-process command buffers. | 346 // This is only relevant for out-of-process command buffers. |
| 342 } | 347 } |
| 343 | 348 |
| 344 gpu::CommandBufferNamespace CommandBufferClientImpl::GetNamespaceID() const { | 349 gpu::CommandBufferNamespace CommandBufferClientImpl::GetNamespaceID() const { |
| 345 return gpu::CommandBufferNamespace::MOJO; | 350 return gpu::CommandBufferNamespace::MOJO; |
| 346 } | 351 } |
| 347 | 352 |
| 348 gpu::CommandBufferId CommandBufferClientImpl::GetCommandBufferID() const { | 353 gpu::CommandBufferId CommandBufferClientImpl::GetCommandBufferID() const { |
| 349 return command_buffer_id_; | 354 return command_buffer_id_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 | 389 |
| 385 // It is also safe to wait on the same context. | 390 // It is also safe to wait on the same context. |
| 386 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && | 391 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && |
| 387 sync_token->command_buffer_id() == GetCommandBufferID()) | 392 sync_token->command_buffer_id() == GetCommandBufferID()) |
| 388 return true; | 393 return true; |
| 389 | 394 |
| 390 return false; | 395 return false; |
| 391 } | 396 } |
| 392 | 397 |
| 393 } // namespace gles2 | 398 } // namespace gles2 |
| OLD | NEW |