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

Unified Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.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 | « cc/resources/resource_provider.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/browser_gpu_memory_buffer_manager.cc
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
index 3cb728df94b7a628b0e390ad7b480b5abee799f2..3dbea500e96d7479e6510872f1be16f1a3948699 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
@@ -172,9 +172,14 @@ bool BrowserGpuMemoryBufferManager::OnMemoryDump(
uint64_t client_tracing_process_id =
ClientIdToTracingProcessId(client_id);
- base::trace_event::MemoryAllocatorDumpGuid shared_buffer_guid =
- gfx::GetGpuMemoryBufferGUIDForTracing(client_tracing_process_id,
- buffer_id);
+ base::trace_event::MemoryAllocatorDumpGuid shared_buffer_guid;
+ if (buffer.second.type == gfx::SHARED_MEMORY_BUFFER) {
+ shared_buffer_guid = gfx::GetSharedMemoryGUIDForTracing(
+ client_tracing_process_id, buffer_id);
+ } else {
+ shared_buffer_guid = gfx::GetGenericSharedGpuMemoryGUIDForTracing(
+ client_tracing_process_id, buffer_id);
+ }
pmd->CreateSharedGlobalAllocatorDump(shared_buffer_guid);
pmd->AddOwnershipEdge(dump->guid(), shared_buffer_guid);
}
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698