| Index: ui/gl/gl_image_io_surface.mm
|
| diff --git a/ui/gl/gl_image_io_surface.mm b/ui/gl/gl_image_io_surface.mm
|
| index 2044f3775a16590370ee323eac853eb007aaf98f..e7b85ad967318b79fdb87e1815973cfda9c2c4b8 100644
|
| --- a/ui/gl/gl_image_io_surface.mm
|
| +++ b/ui/gl/gl_image_io_surface.mm
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/lazy_instance.h"
|
| #include "base/mac/foundation_util.h"
|
| +#include "base/trace_event/generic_shared_memory_id.h"
|
| #include "ui/gl/gl_bindings.h"
|
| #include "ui/gl/gl_context.h"
|
|
|
| @@ -226,4 +227,19 @@ void GLImageIOSurface::SetLayerForWidget(
|
| g_widget_to_layer_map.Pointer()->erase(widget);
|
| }
|
|
|
| +void GLImageIOSurface::DumpMemory(base::trace_event::ProcessMemoryDump* pmd,
|
| + uint64_t process_tracing_id,
|
| + const std::string& dump_name) {
|
| + base::trace_event::MemoryAllocatorDump* dump =
|
| + pmd->CreateAllocatorDump(dump_name);
|
| + dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
|
| + base::trace_event::MemoryAllocatorDump::kUnitsBytes,
|
| + static_cast<uint64_t>(IOSurfaceGetAllocSize(io_surface_)));
|
| +
|
| + auto guid = base::trace_event::GetGenericSharedMemoryGUIDForTracing(
|
| + process_tracing_id, shared_memory_id_);
|
| + pmd->CreateSharedGlobalAllocatorDump(guid);
|
| + pmd->AddOwnershipEdge(dump->guid(), guid);
|
| +}
|
| +
|
| } // namespace gfx
|
|
|