Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: gpu/ipc/common/gpu_memory_buffer_support.h

Issue 1831513003: Pull gpu service/client shared memory buffer code to GpuMemoryBufferSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Ozone builds Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/common/BUILD.gn ('k') | gpu/ipc/common/gpu_memory_buffer_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « gpu/ipc/common/BUILD.gn ('k') | gpu/ipc/common/gpu_memory_buffer_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698