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

Unified Diff: ui/gl/gl_image_io_surface.mm

Issue 1263913002: FREEZE.unindexed Base URL: https://chromium.googlesource.com/chromium/src.git@textures3
Patch Set: Created 5 years, 4 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 | « ui/gl/gl_image_io_surface.h ('k') | ui/gl/gl_image_ozone_native_pixmap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/gl/gl_image_io_surface.h ('k') | ui/gl/gl_image_ozone_native_pixmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698