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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 } | 209 } |
210 | 210 |
211 void CommandBufferLocal::DestroyTransferBuffer(int32_t id) { | 211 void CommandBufferLocal::DestroyTransferBuffer(int32_t id) { |
212 DCHECK(CalledOnValidThread()); | 212 DCHECK(CalledOnValidThread()); |
213 gpu_state_->command_buffer_task_runner()->PostTask( | 213 gpu_state_->command_buffer_task_runner()->PostTask( |
214 driver_.get(), | 214 driver_.get(), |
215 base::Bind(&CommandBufferLocal::DestroyTransferBufferOnGpuThread, | 215 base::Bind(&CommandBufferLocal::DestroyTransferBufferOnGpuThread, |
216 base::Unretained(this), id)); | 216 base::Unretained(this), id)); |
217 } | 217 } |
218 | 218 |
| 219 void CommandBufferLocal::SetGpuControlClient(gpu::GpuControlClient*) { |
| 220 // This implementation of GpuControl has no concept of losing the context |
| 221 // (see IsGpuChannelLost), and no error messages, so we don't bother storing |
| 222 // the client. |
| 223 } |
| 224 |
219 gpu::Capabilities CommandBufferLocal::GetCapabilities() { | 225 gpu::Capabilities CommandBufferLocal::GetCapabilities() { |
220 DCHECK(CalledOnValidThread()); | 226 DCHECK(CalledOnValidThread()); |
221 return capabilities_; | 227 return capabilities_; |
222 } | 228 } |
223 | 229 |
224 int32_t CommandBufferLocal::CreateImage(ClientBuffer buffer, | 230 int32_t CommandBufferLocal::CreateImage(ClientBuffer buffer, |
225 size_t width, | 231 size_t width, |
226 size_t height, | 232 size_t height, |
227 unsigned internal_format) { | 233 unsigned internal_format) { |
228 DCHECK(CalledOnValidThread()); | 234 DCHECK(CalledOnValidThread()); |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 client_->UpdateVSyncParameters(timebase, interval); | 557 client_->UpdateVSyncParameters(timebase, interval); |
552 } | 558 } |
553 | 559 |
554 void CommandBufferLocal::OnGpuCompletedSwapBuffersOnClientThread( | 560 void CommandBufferLocal::OnGpuCompletedSwapBuffersOnClientThread( |
555 gfx::SwapResult result) { | 561 gfx::SwapResult result) { |
556 if (client_) | 562 if (client_) |
557 client_->GpuCompletedSwapBuffers(result); | 563 client_->GpuCompletedSwapBuffers(result); |
558 } | 564 } |
559 | 565 |
560 } // namespace mus | 566 } // namespace mus |
OLD | NEW |