Index: cc/raster/staging_buffer_pool.cc |
diff --git a/cc/raster/staging_buffer_pool.cc b/cc/raster/staging_buffer_pool.cc |
index 6fa0fe03551d7604e93fdd6a5c89a2f502704a5e..252a727463111146ead385709dba774397360dc3 100644 |
--- a/cc/raster/staging_buffer_pool.cc |
+++ b/cc/raster/staging_buffer_pool.cc |
@@ -8,6 +8,7 @@ |
#include "base/memory/memory_coordinator_client_registry.h" |
#include "base/memory/ptr_util.h" |
+#include "base/memory/shared_memory_tracker.h" |
#include "base/strings/stringprintf.h" |
#include "base/threading/thread_task_runner_handle.h" |
#include "base/trace_event/memory_dump_manager.h" |
@@ -111,17 +112,14 @@ void StagingBuffer::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
in_free_list ? buffer_size_in_bytes : 0); |
// Emit an ownership edge towards a global allocator dump node. |
- const uint64_t tracing_process_id = |
- base::trace_event::MemoryDumpManager::GetInstance() |
- ->GetTracingProcessId(); |
- MemoryAllocatorDumpGuid shared_buffer_guid = |
- gfx::GetGpuMemoryBufferGUIDForTracing(tracing_process_id, buffer_id); |
- pmd->CreateSharedGlobalAllocatorDump(shared_buffer_guid); |
// By creating an edge with a higher |importance| (w.r.t. browser-side dumps) |
// the tracing UI will account the effective size of the buffer to the child. |
- const int kImportance = 2; |
- pmd->AddOwnershipEdge(buffer_dump->guid(), shared_buffer_guid, kImportance); |
+ // const int kImportance = 2; |
+ // TODO(hajimehoshi): Importance |
+ base::SharedMemoryTracker::AddOwnershipEdges( |
+ pmd, buffer_dump->guid(), gpu_memory_buffer->GetHandle().handle, |
+ buffer_size_in_bytes); |
} |
StagingBufferPool::StagingBufferPool(base::SequencedTaskRunner* task_runner, |