Index: ui/gfx/gpu_memory_buffer_tracing.cc |
diff --git a/ui/gfx/gpu_memory_buffer_tracing.cc b/ui/gfx/gpu_memory_buffer_tracing.cc |
index 86642b60946a885ebb3b27465eee99796a489a11..5f5870748627c5b82e23e94c26725cc370be096e 100644 |
--- a/ui/gfx/gpu_memory_buffer_tracing.cc |
+++ b/ui/gfx/gpu_memory_buffer_tracing.cc |
@@ -4,16 +4,18 @@ |
#include "ui/gfx/gpu_memory_buffer_tracing.h" |
+#include "base/format_macros.h" |
+#include "base/strings/stringprintf.h" |
+ |
namespace gfx { |
-base::trace_event::MemoryAllocatorDumpGuid GetGpuMemoryBufferGUIDForTracing( |
+base::trace_event::MemoryAllocatorDumpGuid GetSharedMemoryGUIDForTracing( |
uint64_t tracing_process_id, |
GpuMemoryBufferId buffer_id) { |
- // TODO(ericrk): Currently this function just wraps |
- // GetGenericSharedMemoryGUIDForTracing, we may want to special case this if |
- // the GPU memory buffer is not backed by shared memory. |
- return gfx::GetGenericSharedMemoryGUIDForTracing(tracing_process_id, |
- buffer_id); |
+ // TODO(hajimehoshi): This should be unified to shared memory GUIDs in |
+ // base/memory/shared_memory_tracker.cc |
+ return base::trace_event::MemoryAllocatorDumpGuid(base::StringPrintf( |
+ "shared_memory_gpu/%" PRIx64 "/%d", tracing_process_id, buffer_id.id)); |
} |
} // namespace gfx |