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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_IPC_HOST_GPU_MEMORY_BUFFER_SUPPORT_H_
6 #define GPU_IPC_HOST_GPU_MEMORY_BUFFER_SUPPORT_H_
7
8 #include "base/containers/hash_tables.h"
9 #include "base/hash.h"
10 #include "ui/gfx/buffer_types.h"
11
12 namespace gpu {
13
14 using GpuMemoryBufferConfigurationKey =
15 std::pair<gfx::BufferFormat, gfx::BufferUsage>;
16 using GpuMemoryBufferConfigurationSet =
17 base::hash_set<GpuMemoryBufferConfigurationKey>;
18
19 } // namespace gpu
20
21 namespace BASE_HASH_NAMESPACE {
22
23 template <>
24 struct hash<gpu::GpuMemoryBufferConfigurationKey> {
25 size_t operator()(const gpu::GpuMemoryBufferConfigurationKey& key) const {
26 return base::HashInts(static_cast<int>(key.first),
27 static_cast<int>(key.second));
28 }
29 };
30
31 } // namespace BASE_HASH_NAMESPACE
32
33 namespace gpu {
34
35 bool AreNativeGpuMemoryBuffersEnabled();
36
37 // Returns the set of supported configurations.
38 GpuMemoryBufferConfigurationSet GetNativeGpuMemoryBufferConfigurations();
39
40 } // namespace gpu
41
42 #endif // GPU_IPC_HOST_GPU_MEMORY_BUFFER_SUPPORT_H_
OLDNEW
« 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