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

Unified Diff: cc/raster/staging_buffer_pool.cc

Issue 2819803002: Reorganize GUIDs for GPU memory buffers (Closed)
Patch Set: 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 | « no previous file | cc/resources/resource_provider.cc » ('j') | media/video/gpu_memory_buffer_video_frame_pool.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8ae089ed7b9131597caf371bb84c513c1e025a12 100644
--- a/cc/raster/staging_buffer_pool.cc
+++ b/cc/raster/staging_buffer_pool.cc
@@ -114,8 +114,14 @@ void StagingBuffer::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
const uint64_t tracing_process_id =
base::trace_event::MemoryDumpManager::GetInstance()
->GetTracingProcessId();
- MemoryAllocatorDumpGuid shared_buffer_guid =
- gfx::GetGpuMemoryBufferGUIDForTracing(tracing_process_id, buffer_id);
+ MemoryAllocatorDumpGuid shared_buffer_guid;
+ if (gpu_memory_buffer->GetHandle().type == gfx::SHARED_MEMORY_BUFFER) {
ericrk 2017/04/14 19:49:39 Why not use GetGUIDForTracing in this case?
hajimehoshi 2017/04/17 06:18:06 Oops, I forgot to do this. Done.
+ shared_buffer_guid =
+ gfx::GetSharedMemoryGUIDForTracing(tracing_process_id, buffer_id);
+ } else {
+ shared_buffer_guid = gfx::GetGenericSharedGpuMemoryGUIDForTracing(
+ tracing_process_id, buffer_id);
+ }
pmd->CreateSharedGlobalAllocatorDump(shared_buffer_guid);
// By creating an edge with a higher |importance| (w.r.t. browser-side dumps)
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | media/video/gpu_memory_buffer_video_frame_pool.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698