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

Side by Side Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.h

Issue 1502373009: Allow std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, more HashPair -> HashInts Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/hash.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/trace_event/memory_dump_provider.h" 17 #include "base/trace_event/memory_dump_provider.h"
17 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
18 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" 19 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
19 20
20 namespace content { 21 namespace content {
21 22
22 using GpuMemoryBufferConfigurationKey = 23 using GpuMemoryBufferConfigurationKey =
23 std::pair<gfx::BufferFormat, gfx::BufferUsage>; 24 std::pair<gfx::BufferFormat, gfx::BufferUsage>;
24 using GpuMemoryBufferConfigurationSet = 25 using GpuMemoryBufferConfigurationSet =
25 base::hash_set<GpuMemoryBufferConfigurationKey>; 26 base::hash_set<GpuMemoryBufferConfigurationKey>;
26 27
27 } // content 28 } // content
28 29
29 namespace BASE_HASH_NAMESPACE { 30 namespace BASE_HASH_NAMESPACE {
30 31
31 template <> 32 template <>
32 struct hash<content::GpuMemoryBufferConfigurationKey> { 33 struct hash<content::GpuMemoryBufferConfigurationKey> {
33 size_t operator()(const content::GpuMemoryBufferConfigurationKey& key) const { 34 size_t operator()(const content::GpuMemoryBufferConfigurationKey& key) const {
34 return base::HashPair(static_cast<int>(key.first), 35 return base::HashInts(static_cast<int>(key.first),
35 static_cast<int>(key.second)); 36 static_cast<int>(key.second));
36 } 37 }
37 }; 38 };
38 39
39 } // namespace BASE_HASH_NAMESPACE 40 } // namespace BASE_HASH_NAMESPACE
40 41
41 namespace content { 42 namespace content {
42 class GpuProcessHost; 43 class GpuProcessHost;
43 44
44 class CONTENT_EXPORT BrowserGpuMemoryBufferManager 45 class CONTENT_EXPORT BrowserGpuMemoryBufferManager
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; 187 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>;
187 using ClientMap = base::hash_map<int, BufferMap>; 188 using ClientMap = base::hash_map<int, BufferMap>;
188 ClientMap clients_; 189 ClientMap clients_;
189 190
190 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); 191 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager);
191 }; 192 };
192 193
193 } // namespace content 194 } // namespace content
194 195
195 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 196 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « components/sync_bookmarks/bookmark_model_associator.h ('k') | gpu/command_buffer/service/framebuffer_completeness_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698