| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 const base::Closure& callback) { | 362 const base::Closure& callback) { |
| 363 // TODO(piman) | 363 // TODO(piman) |
| 364 } | 364 } |
| 365 | 365 |
| 366 void CommandBufferClientImpl::SignalQuery(uint32_t query, | 366 void CommandBufferClientImpl::SignalQuery(uint32_t query, |
| 367 const base::Closure& callback) { | 367 const base::Closure& callback) { |
| 368 // TODO(piman) | 368 // TODO(piman) |
| 369 NOTIMPLEMENTED(); | 369 NOTIMPLEMENTED(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 void CommandBufferClientImpl::SetSurfaceVisible(bool visible) { | |
| 373 // TODO(piman) | |
| 374 NOTIMPLEMENTED(); | |
| 375 } | |
| 376 | |
| 377 void CommandBufferClientImpl::DidLoseContext(int32_t lost_reason) { | 372 void CommandBufferClientImpl::DidLoseContext(int32_t lost_reason) { |
| 378 last_state_.error = gpu::error::kLostContext; | 373 last_state_.error = gpu::error::kLostContext; |
| 379 last_state_.context_lost_reason = | 374 last_state_.context_lost_reason = |
| 380 static_cast<gpu::error::ContextLostReason>(lost_reason); | 375 static_cast<gpu::error::ContextLostReason>(lost_reason); |
| 381 delegate_->ContextLost(); | 376 delegate_->ContextLost(); |
| 382 } | 377 } |
| 383 | 378 |
| 384 void CommandBufferClientImpl::TryUpdateState() { | 379 void CommandBufferClientImpl::TryUpdateState() { |
| 385 if (last_state_.error == gpu::error::kNoError) | 380 if (last_state_.error == gpu::error::kNoError) |
| 386 shared_state()->Read(&last_state_); | 381 shared_state()->Read(&last_state_); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 443 |
| 449 // It is also safe to wait on the same context. | 444 // It is also safe to wait on the same context. |
| 450 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && | 445 if (sync_token->namespace_id() == gpu::CommandBufferNamespace::MOJO && |
| 451 sync_token->command_buffer_id() == GetCommandBufferID()) | 446 sync_token->command_buffer_id() == GetCommandBufferID()) |
| 452 return true; | 447 return true; |
| 453 | 448 |
| 454 return false; | 449 return false; |
| 455 } | 450 } |
| 456 | 451 |
| 457 } // namespace gles2 | 452 } // namespace gles2 |
| OLD | NEW |