| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "gpu/command_buffer/service/in_process_command_buffer.h" | 5 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 } | 605 } |
| 606 | 606 |
| 607 gpu::Capabilities InProcessCommandBuffer::GetCapabilities() { | 607 gpu::Capabilities InProcessCommandBuffer::GetCapabilities() { |
| 608 return capabilities_; | 608 return capabilities_; |
| 609 } | 609 } |
| 610 | 610 |
| 611 gfx::GpuMemoryBuffer* InProcessCommandBuffer::CreateGpuMemoryBuffer( | 611 gfx::GpuMemoryBuffer* InProcessCommandBuffer::CreateGpuMemoryBuffer( |
| 612 size_t width, | 612 size_t width, |
| 613 size_t height, | 613 size_t height, |
| 614 unsigned internalformat, | 614 unsigned internalformat, |
| 615 unsigned usage, |
| 615 int32* id) { | 616 int32* id) { |
| 616 CheckSequencedThread(); | 617 CheckSequencedThread(); |
| 617 base::AutoLock lock(command_buffer_lock_); | 618 base::AutoLock lock(command_buffer_lock_); |
| 618 return gpu_control_->CreateGpuMemoryBuffer(width, | 619 return gpu_control_->CreateGpuMemoryBuffer( |
| 619 height, | 620 width, height, internalformat, usage, id); |
| 620 internalformat, | |
| 621 id); | |
| 622 } | 621 } |
| 623 | 622 |
| 624 void InProcessCommandBuffer::DestroyGpuMemoryBuffer(int32 id) { | 623 void InProcessCommandBuffer::DestroyGpuMemoryBuffer(int32 id) { |
| 625 CheckSequencedThread(); | 624 CheckSequencedThread(); |
| 626 base::Closure task = base::Bind(&GpuControl::DestroyGpuMemoryBuffer, | 625 base::Closure task = base::Bind(&GpuControl::DestroyGpuMemoryBuffer, |
| 627 base::Unretained(gpu_control_.get()), | 626 base::Unretained(gpu_control_.get()), |
| 628 id); | 627 id); |
| 629 | 628 |
| 630 QueueTask(task); | 629 QueueTask(task); |
| 631 } | 630 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 } | 759 } |
| 761 #endif | 760 #endif |
| 762 | 761 |
| 763 // static | 762 // static |
| 764 void InProcessCommandBuffer::SetGpuMemoryBufferFactory( | 763 void InProcessCommandBuffer::SetGpuMemoryBufferFactory( |
| 765 GpuMemoryBufferFactory* factory) { | 764 GpuMemoryBufferFactory* factory) { |
| 766 g_gpu_memory_buffer_factory = factory; | 765 g_gpu_memory_buffer_factory = factory; |
| 767 } | 766 } |
| 768 | 767 |
| 769 } // namespace gpu | 768 } // namespace gpu |
| OLD | NEW |