Index: gpu/ipc/common/gpu_memory_buffer_support.h |
diff --git a/gpu/ipc/common/gpu_memory_buffer_support.h b/gpu/ipc/common/gpu_memory_buffer_support.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b6f1dd8dca6675846a464d8374f92ed5ec5d400e |
--- /dev/null |
+++ b/gpu/ipc/common/gpu_memory_buffer_support.h |
@@ -0,0 +1,33 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef GPU_IPC_COMMON_GPU_MEMORY_BUFFER_SUPPORT_H_ |
+#define GPU_IPC_COMMON_GPU_MEMORY_BUFFER_SUPPORT_H_ |
+ |
+#include "gpu/gpu_export.h" |
+#include "ui/gfx/buffer_types.h" |
+#include "ui/gfx/gpu_memory_buffer.h" |
+ |
+namespace gpu { |
+ |
+class GPU_EXPORT GpuMemoryBufferSupport { |
+ public: |
+ // Returns the native GPU memory buffer factory type. Returns EMPTY_BUFFER |
+ // type if native buffers are not supported. |
+ static gfx::GpuMemoryBufferType GetNativeType(); |
+ |
+ // Returns whether the provided Buffer format is support. |
+ static bool IsSupported(gfx::BufferFormat format, gfx::BufferUsage usage); |
+ |
+ private: |
+ // We shouldn't be instantiating this class. |
reveman
2016/03/23 20:00:43
why bother with a class at all then? remove the cl
Fady Samuel
2016/03/23 20:26:07
Done.
|
+ GpuMemoryBufferSupport(); |
+ ~GpuMemoryBufferSupport(); |
+ |
+ DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferSupport); |
+}; |
+ |
+} // namespace gpu |
+ |
+#endif // GPU_IPC_COMMON_GPU_MEMORY_BUFFER_SUPPORT_H_ |