| 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 "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 gpu_state_->command_buffer_task_runner()->PostTask( | 327 gpu_state_->command_buffer_task_runner()->PostTask( |
| 328 driver_.get(), base::Bind(&CommandBufferLocal::SignalQueryOnGpuThread, | 328 driver_.get(), base::Bind(&CommandBufferLocal::SignalQueryOnGpuThread, |
| 329 base::Unretained(this), query_id, callback)); | 329 base::Unretained(this), query_id, callback)); |
| 330 } | 330 } |
| 331 | 331 |
| 332 void CommandBufferLocal::SetLock(base::Lock* lock) { | 332 void CommandBufferLocal::SetLock(base::Lock* lock) { |
| 333 DCHECK(CalledOnValidThread()); | 333 DCHECK(CalledOnValidThread()); |
| 334 NOTIMPLEMENTED(); | 334 NOTIMPLEMENTED(); |
| 335 } | 335 } |
| 336 | 336 |
| 337 bool CommandBufferLocal::IsGpuChannelLost() { |
| 338 DCHECK(CalledOnValidThread()); |
| 339 // This is only possible for out-of-process command buffers. |
| 340 return false; |
| 341 } |
| 342 |
| 337 void CommandBufferLocal::EnsureWorkVisible() { | 343 void CommandBufferLocal::EnsureWorkVisible() { |
| 338 // This is only relevant for out-of-process command buffers. | 344 // This is only relevant for out-of-process command buffers. |
| 339 } | 345 } |
| 340 | 346 |
| 341 gpu::CommandBufferNamespace CommandBufferLocal::GetNamespaceID() const { | 347 gpu::CommandBufferNamespace CommandBufferLocal::GetNamespaceID() const { |
| 342 DCHECK(CalledOnValidThread()); | 348 DCHECK(CalledOnValidThread()); |
| 343 return gpu::CommandBufferNamespace::MOJO_LOCAL; | 349 return gpu::CommandBufferNamespace::MOJO_LOCAL; |
| 344 } | 350 } |
| 345 | 351 |
| 346 gpu::CommandBufferId CommandBufferLocal::GetCommandBufferID() const { | 352 gpu::CommandBufferId CommandBufferLocal::GetCommandBufferID() const { |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 client_->UpdateVSyncParameters(timebase, interval); | 584 client_->UpdateVSyncParameters(timebase, interval); |
| 579 } | 585 } |
| 580 | 586 |
| 581 void CommandBufferLocal::OnGpuCompletedSwapBuffersOnClientThread( | 587 void CommandBufferLocal::OnGpuCompletedSwapBuffersOnClientThread( |
| 582 gfx::SwapResult result) { | 588 gfx::SwapResult result) { |
| 583 if (client_) | 589 if (client_) |
| 584 client_->GpuCompletedSwapBuffers(result); | 590 client_->GpuCompletedSwapBuffers(result); |
| 585 } | 591 } |
| 586 | 592 |
| 587 } // namespace mus | 593 } // namespace mus |
| OLD | NEW |