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

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

Issue 2551743002: gpu: Move native memory buffer configuration into //gpu (Closed)
Patch Set: . Created 4 years 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/host/BUILD.gn ('k') | gpu/ipc/host/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/host/gpu_memory_buffer_support.h
diff --git a/gpu/ipc/host/gpu_memory_buffer_support.h b/gpu/ipc/host/gpu_memory_buffer_support.h
new file mode 100644
index 0000000000000000000000000000000000000000..8dff0f6f3032f67b8abe5bfbf6e0a5a91da010da
--- /dev/null
+++ b/gpu/ipc/host/gpu_memory_buffer_support.h
@@ -0,0 +1,42 @@
+// 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_HOST_GPU_MEMORY_BUFFER_SUPPORT_H_
+#define GPU_IPC_HOST_GPU_MEMORY_BUFFER_SUPPORT_H_
+
+#include "base/containers/hash_tables.h"
+#include "base/hash.h"
+#include "ui/gfx/buffer_types.h"
+
+namespace gpu {
+
+using GpuMemoryBufferConfigurationKey =
+ std::pair<gfx::BufferFormat, gfx::BufferUsage>;
+using GpuMemoryBufferConfigurationSet =
+ base::hash_set<GpuMemoryBufferConfigurationKey>;
+
+} // namespace gpu
+
+namespace BASE_HASH_NAMESPACE {
+
+template <>
+struct hash<gpu::GpuMemoryBufferConfigurationKey> {
+ size_t operator()(const gpu::GpuMemoryBufferConfigurationKey& key) const {
+ return base::HashInts(static_cast<int>(key.first),
+ static_cast<int>(key.second));
+ }
+};
+
+} // namespace BASE_HASH_NAMESPACE
+
+namespace gpu {
+
+bool AreNativeGpuMemoryBuffersEnabled();
+
+// Returns the set of supported configurations.
+GpuMemoryBufferConfigurationSet GetNativeGpuMemoryBufferConfigurations();
+
+} // namespace gpu
+
+#endif // GPU_IPC_HOST_GPU_MEMORY_BUFFER_SUPPORT_H_
« no previous file with comments | « gpu/ipc/host/BUILD.gn ('k') | gpu/ipc/host/gpu_memory_buffer_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698