OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 GPU_COMMAND_BUFFER_COMMON_GPU_MEMORY_BUFFER_SUPPORT_H_ |
| 6 #define GPU_COMMAND_BUFFER_COMMON_GPU_MEMORY_BUFFER_SUPPORT_H_ |
| 7 |
| 8 #include "gpu/gpu_export.h" |
| 9 #include "ui/gfx/buffer_types.h" |
| 10 #include "ui/gfx/geometry/size.h" |
| 11 #include "ui/gfx/gpu_memory_buffer.h" |
| 12 |
| 13 namespace gpu { |
| 14 |
| 15 struct Capabilities; |
| 16 |
| 17 // Returns a valid GpuMemoryBuffer format given a valid internalformat as |
| 18 // defined by CHROMIUM_gpu_memory_buffer_image. |
| 19 GPU_EXPORT gfx::BufferFormat DefaultBufferFormatForImageFormat( |
| 20 unsigned internalformat); |
| 21 |
| 22 // Returns true if |internalformat| is compatible with |format|. |
| 23 GPU_EXPORT bool IsImageFormatCompatibleWithGpuMemoryBufferFormat( |
| 24 unsigned internalformat, |
| 25 gfx::BufferFormat format); |
| 26 |
| 27 // Returns true if |format| is supported by |capabilities|. |
| 28 GPU_EXPORT bool IsGpuMemoryBufferFormatSupported( |
| 29 gfx::BufferFormat format, |
| 30 const Capabilities& capabilities); |
| 31 |
| 32 // Returns true if |size| is valid for |format|. |
| 33 GPU_EXPORT bool IsImageSizeValidForGpuMemoryBufferFormat( |
| 34 const gfx::Size& size, |
| 35 gfx::BufferFormat format); |
| 36 |
| 37 } // namespace gpu |
| 38 |
| 39 #endif // GPU_COMMAND_BUFFER_COMMON_GPU_MEMORY_BUFFER_SUPPORT_H_ |
OLD | NEW |