OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 UI_GFX_GENERIC_SHARED_MEMORY_ID_H_ | 5 #ifndef UI_GFX_GENERIC_SHARED_MEMORY_ID_H_ |
6 #define UI_GFX_GENERIC_SHARED_MEMORY_ID_H_ | 6 #define UI_GFX_GENERIC_SHARED_MEMORY_ID_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include "base/trace_event/memory_allocator_dump.h" | 11 #include "base/trace_event/memory_allocator_dump.h" |
9 #include "ui/gfx/gfx_export.h" | 12 #include "ui/gfx/gfx_export.h" |
10 | 13 |
11 namespace gfx { | 14 namespace gfx { |
12 | 15 |
13 // Defines an ID type which is used across all types of shared memory | 16 // Defines an ID type which is used across all types of shared memory |
14 // allocations in content/. This ID type is in ui/gfx, as components outside | 17 // allocations in content/. This ID type is in ui/gfx, as components outside |
15 // content/ may need to hold an ID (but should not generate one). | 18 // content/ may need to hold an ID (but should not generate one). |
16 class GFX_EXPORT GenericSharedMemoryId { | 19 class GFX_EXPORT GenericSharedMemoryId { |
17 public: | 20 public: |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 struct hash<std::pair<gfx::GenericSharedMemoryId, Second>> { | 58 struct hash<std::pair<gfx::GenericSharedMemoryId, Second>> { |
56 size_t operator()( | 59 size_t operator()( |
57 const std::pair<gfx::GenericSharedMemoryId, Second>& pair) const { | 60 const std::pair<gfx::GenericSharedMemoryId, Second>& pair) const { |
58 return base::HashPair(pair.first.id, pair.second); | 61 return base::HashPair(pair.first.id, pair.second); |
59 } | 62 } |
60 }; | 63 }; |
61 | 64 |
62 } // namespace BASE_HASH_NAMESPACE | 65 } // namespace BASE_HASH_NAMESPACE |
63 | 66 |
64 #endif // UI_GFX_GENERIC_SHARED_MEMORY_ID_H_ | 67 #endif // UI_GFX_GENERIC_SHARED_MEMORY_ID_H_ |
OLD | NEW |