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

Unified Diff: ui/gfx/gpu_memory_buffer_tracing.cc

Issue 2819803002: Reorganize GUIDs for GPU memory buffers (Closed)
Patch Set: Address on reviews Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/gpu_memory_buffer_tracing.h ('k') | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/gfx/gpu_memory_buffer_tracing.h ('k') | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698