| 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 | |
| 345 void CommandBufferClientImpl::EnsureWorkVisible() { | 340 void CommandBufferClientImpl::EnsureWorkVisible() { |
| 346 // This is only relevant for out-of-process command buffers. | 341 // This is only relevant for out-of-process command buffers. |
| 347 } | 342 } |
| 348 | 343 |
| 349 gpu::CommandBufferNamespace CommandBufferClientImpl::GetNamespaceID() const { | 344 gpu::CommandBufferNamespace CommandBufferClientImpl::GetNamespaceID() const { |
| 350 return gpu::CommandBufferNamespace::MOJO; | 345 return gpu::CommandBufferNamespace::MOJO; |
| 351 } | 346 } |
| 352 | 347 |
| 353 gpu::CommandBufferId CommandBufferClientImpl::GetCommandBufferID() const { | 348 gpu::CommandBufferId CommandBufferClientImpl::GetCommandBufferID() const { |
| 354 return command_buffer_id_; | 349 return command_buffer_id_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 | 384 |
| 390 // It is also safe to wait on the same context. | 385 // It is also safe to wait on the same context. |
| 391 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && | 386 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && |
| 392 sync_token->command_buffer_id() == GetCommandBufferID()) | 387 sync_token->command_buffer_id() == GetCommandBufferID()) |
| 393 return true; | 388 return true; |
| 394 | 389 |
| 395 return false; | 390 return false; |
| 396 } | 391 } |
| 397 | 392 |
| 398 } // namespace gles2 | 393 } // namespace gles2 |
| OLD | NEW |