Chromium Code Reviews| Index: content/common/host_shared_bitmap_manager.cc |
| diff --git a/content/common/host_shared_bitmap_manager.cc b/content/common/host_shared_bitmap_manager.cc |
| index 07241f2a2ce2f05bb0f6fb63909c50180b253ea9..9214e22a11b339a2df75c1d77b65df014e8ba6d2 100644 |
| --- a/content/common/host_shared_bitmap_manager.cc |
| +++ b/content/common/host_shared_bitmap_manager.cc |
| @@ -155,16 +155,23 @@ bool HostSharedBitmapManager::OnMemoryDump( |
| base::AutoLock lock(lock_); |
| for (const auto& bitmap : handle_map_) { |
| - base::trace_event::MemoryAllocatorDump* dump = pmd->CreateAllocatorDump( |
| - base::StringPrintf("%s/%s", kMemoryAllocatorName, |
| - base::HexEncode(bitmap.first.name, |
| - sizeof(bitmap.first.name)).c_str())); |
| + base::trace_event::MemoryAllocatorDump* dump = |
| + pmd->CreateAllocatorDump(base::StringPrintf( |
| + "%s/%s", kMemoryAllocatorName, |
|
reveman
2015/07/28 21:38:49
while here, can you remove the kMemoryAllocatorNam
ericrk
2015/07/29 18:46:46
Done.
|
| + base::HexEncode(bitmap.first.name, sizeof(bitmap.first.name)) |
| + .c_str())); |
| if (!dump) |
| return false; |
| dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, |
| base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
| bitmap.second->buffer_size); |
| + |
| + // Generate a global GUID used to share this allocation with the GPU |
| + // process. |
|
reveman
2015/07/28 21:38:49
not shared with GPU process. only shared with rend
ericrk
2015/07/29 18:46:46
yup, got a little to copy-pasty.
|
| + auto guid = cc::GetSharedBitmapGUIDForTracing(bitmap.first); |
| + pmd->CreateSharedGlobalAllocatorDump(guid); |
| + pmd->AddOwnershipEdge(dump->guid(), guid); |
| } |
| return true; |