OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_RESOURCES_GPU_MEMORY_BUFFER_MANAGER_H_ |
| 6 #define CC_RESOURCES_GPU_MEMORY_BUFFER_MANAGER_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/gfx/gpu_memory_buffer.h" |
| 10 #include "ui/gfx/size.h" |
| 11 |
| 12 namespace cc { |
| 13 |
| 14 class GpuMemoryBufferManager { |
| 15 public: |
| 16 // Allocates a GpuMemoryBuffer that can be shared with another process. |
| 17 virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
| 18 const gfx::Size& size, |
| 19 gfx::GpuMemoryBuffer::Format format, |
| 20 gfx::GpuMemoryBuffer::Usage usage) = 0; |
| 21 |
| 22 // Returns a GpuMemoryBuffer instance given a ClientBuffer. Returns NULL on |
| 23 // failure. |
| 24 virtual gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( |
| 25 ClientBuffer buffer) = 0; |
| 26 |
| 27 protected: |
| 28 virtual ~GpuMemoryBufferManager() {} |
| 29 }; |
| 30 |
| 31 } // namespace cc |
| 32 |
| 33 #endif // CC_RESOURCES_GPU_MEMORY_BUFFER_MANAGER_H_ |
OLD | NEW |