Chromium Code Reviews| Index: ui/gl/gl_image_memory.cc |
| diff --git a/ui/gl/gl_image_memory.cc b/ui/gl/gl_image_memory.cc |
| index e5160a6cbec3c4e5e59e43018b36d431209ac0c7..a42a9e95a8b686411099d4490e9f95b07e2cfc09 100644 |
| --- a/ui/gl/gl_image_memory.cc |
| +++ b/ui/gl/gl_image_memory.cc |
| @@ -443,17 +443,18 @@ void GLImageMemory::DoBindTexImage(unsigned target) { |
| } |
| } |
| -void GLImageMemory::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
| - uint64_t process_tracing_id, |
| - const std::string& dump_name) { |
| - // Log size 0 if |ref_counted_memory_| has been released. |
| - size_t size_in_bytes = memory_ ? SizeInBytes(size_, format_) : 0; |
| +void GLImageMemory::DumpGLTexture(base::trace_event::ProcessMemoryDump* pmd, |
| + const std::string& dump_name) { |
| + size_t size_in_bytes = egl_texture_id_ ? SizeInBytes(size_, format_) : 0; |
|
reveman
2015/08/28 18:18:43
This is not enough. The gl(Compressed)TexImage2D c
ericrk
2015/08/31 17:19:32
Re worked this to track the bound texture_id_ and
|
| base::trace_event::MemoryAllocatorDump* dump = |
| - pmd->CreateAllocatorDump(dump_name); |
| + pmd->CreateAllocatorDump(dump_name + "/gl_texture"); |
|
reveman
2015/08/28 18:18:43
nit: s/gl_texture/texture_memory/ as I think that'
ericrk
2015/08/31 17:19:32
sgtm
|
| dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, |
| base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
| static_cast<uint64_t>(size_in_bytes)); |
| + |
| + // No need for a global shared edge here. This object in the GPU process is |
| + // the sole owner of this texture id. |
| } |
| } // namespace gfx |