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

Side by Side Diff: ui/gfx/generic_shared_memory_id.h

Issue 1299713003: GLImage::OnMemoryDump Stubs + Some Impls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@images1.3
Patch Set: Fix android build. Created 5 years, 4 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
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | ui/gl/gl_image.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/trace_event/memory_allocator_dump.h" 8 #include "base/trace_event/memory_allocator_dump.h"
9 #include "ui/gfx/gfx_export.h" 9 #include "ui/gfx/gfx_export.h"
10 10
(...skipping 25 matching lines...) Expand all
36 // Generates GUID which can be used to trace shared memory using its 36 // Generates GUID which can be used to trace shared memory using its
37 // GenericSharedMemoryId. 37 // GenericSharedMemoryId.
38 GFX_EXPORT base::trace_event::MemoryAllocatorDumpGuid 38 GFX_EXPORT base::trace_event::MemoryAllocatorDumpGuid
39 GetGenericSharedMemoryGUIDForTracing( 39 GetGenericSharedMemoryGUIDForTracing(
40 uint64_t tracing_process_id, 40 uint64_t tracing_process_id,
41 GenericSharedMemoryId generic_shared_memory_id); 41 GenericSharedMemoryId generic_shared_memory_id);
42 42
43 } // namespace gfx 43 } // namespace gfx
44 44
45 namespace BASE_HASH_NAMESPACE { 45 namespace BASE_HASH_NAMESPACE {
46
46 template <> 47 template <>
47 struct hash<gfx::GenericSharedMemoryId> { 48 struct hash<gfx::GenericSharedMemoryId> {
48 size_t operator()(gfx::GenericSharedMemoryId key) const { 49 size_t operator()(gfx::GenericSharedMemoryId key) const {
49 return BASE_HASH_NAMESPACE::hash<int>()(key.id); 50 return BASE_HASH_NAMESPACE::hash<int>()(key.id);
50 } 51 }
51 }; 52 };
52 53
53 template <typename Second> 54 template <typename Second>
54 struct hash<std::pair<gfx::GenericSharedMemoryId, Second>> { 55 struct hash<std::pair<gfx::GenericSharedMemoryId, Second>> {
55 size_t operator()( 56 size_t operator()(
56 const std::pair<gfx::GenericSharedMemoryId, Second>& pair) const { 57 const std::pair<gfx::GenericSharedMemoryId, Second>& pair) const {
57 return base::HashPair(pair.first.id, pair.second); 58 return base::HashPair(pair.first.id, pair.second);
58 } 59 }
59 }; 60 };
60 61
61 } // namespace BASE_HASH_NAMESPACE 62 } // namespace BASE_HASH_NAMESPACE
62 63
63 #endif // UI_GFX_GENERIC_SHARED_MEMORY_ID_H_ 64 #endif // UI_GFX_GENERIC_SHARED_MEMORY_ID_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | ui/gl/gl_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698