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

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

Issue 1610023003: Revert of Allow std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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"
16 #include "base/macros.h" 15 #include "base/macros.h"
17 #include "base/trace_event/memory_dump_provider.h" 16 #include "base/trace_event/memory_dump_provider.h"
18 #include "content/common/content_export.h" 17 #include "content/common/content_export.h"
19 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" 18 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
20 19
21 namespace content { 20 namespace content {
22 21
23 using GpuMemoryBufferConfigurationKey = 22 using GpuMemoryBufferConfigurationKey =
24 std::pair<gfx::BufferFormat, gfx::BufferUsage>; 23 std::pair<gfx::BufferFormat, gfx::BufferUsage>;
25 using GpuMemoryBufferConfigurationSet = 24 using GpuMemoryBufferConfigurationSet =
26 base::hash_set<GpuMemoryBufferConfigurationKey>; 25 base::hash_set<GpuMemoryBufferConfigurationKey>;
27 26
28 } // content 27 } // content
29 28
30 namespace BASE_HASH_NAMESPACE { 29 namespace BASE_HASH_NAMESPACE {
31 30
32 template <> 31 template <>
33 struct hash<content::GpuMemoryBufferConfigurationKey> { 32 struct hash<content::GpuMemoryBufferConfigurationKey> {
34 size_t operator()(const content::GpuMemoryBufferConfigurationKey& key) const { 33 size_t operator()(const content::GpuMemoryBufferConfigurationKey& key) const {
35 return base::HashInts(static_cast<int>(key.first), 34 return base::HashPair(static_cast<int>(key.first),
36 static_cast<int>(key.second)); 35 static_cast<int>(key.second));
37 } 36 }
38 }; 37 };
39 38
40 } // namespace BASE_HASH_NAMESPACE 39 } // namespace BASE_HASH_NAMESPACE
41 40
42 namespace content { 41 namespace content {
43 class GpuProcessHost; 42 class GpuProcessHost;
44 43
45 class CONTENT_EXPORT BrowserGpuMemoryBufferManager 44 class CONTENT_EXPORT BrowserGpuMemoryBufferManager
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>; 186 using BufferMap = base::hash_map<gfx::GpuMemoryBufferId, BufferInfo>;
188 using ClientMap = base::hash_map<int, BufferMap>; 187 using ClientMap = base::hash_map<int, BufferMap>;
189 ClientMap clients_; 188 ClientMap clients_;
190 189
191 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager); 190 DISALLOW_COPY_AND_ASSIGN(BrowserGpuMemoryBufferManager);
192 }; 191 };
193 192
194 } // namespace content 193 } // namespace content
195 194
196 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_MEMORY_BUFFER_MANAGER_H_ 195 #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