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

Unified Diff: gpu/command_buffer/client/cmd_buffer_helper.cc

Issue 2866973003: Fix global dumps to be dumped only when shared memory is actually used
Patch Set: Remove change for GpuMemoryBuffer Created 3 years, 7 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 | « cc/raster/staging_buffer_pool.cc ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/cmd_buffer_helper.cc
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.cc b/gpu/command_buffer/client/cmd_buffer_helper.cc
index 7021fa399f4ccf7f887667ab73589d5753206b43..faab3c867b32f449e845f42b3ecc6145108f7b04 100644
--- a/gpu/command_buffer/client/cmd_buffer_helper.cc
+++ b/gpu/command_buffer/client/cmd_buffer_helper.cc
@@ -377,10 +377,12 @@ bool CommandBufferHelper::OnMemoryDump(
dump->AddScalar(
"free_size", MemoryAllocatorDump::kUnitsBytes,
GetTotalFreeEntriesNoWaiting() * sizeof(CommandBufferEntry));
- auto guid = GetBufferGUIDForTracing(tracing_process_id, ring_buffer_id_);
- const int kImportance = 2;
- pmd->CreateSharedGlobalAllocatorDump(guid);
- pmd->AddOwnershipEdge(dump->guid(), guid, kImportance);
+ if (ring_buffer_->backing()->is_shared()) {
+ auto guid = GetBufferGUIDForTracing(tracing_process_id, ring_buffer_id_);
+ const int kImportance = 2;
+ pmd->CreateSharedGlobalAllocatorDump(guid);
+ pmd->AddOwnershipEdge(dump->guid(), guid, kImportance);
+ }
}
return true;
« no previous file with comments | « cc/raster/staging_buffer_pool.cc ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698