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

Unified Diff: content/common/host_shared_bitmap_manager.cc

Issue 1256613002: Add tracing for GL texture objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_process_id
Patch Set: review feedback Created 5 years, 5 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
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;

Powered by Google App Engine
This is Rietveld 408576698