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

Unified Diff: ui/gl/gl_image_io_surface.mm

Issue 2771923006: Add CVPixelBufferRef memory tracking (Closed)
Patch Set: Created 3 years, 9 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 | « media/gpu/vt_video_decode_accelerator_mac.cc ('k') | no next file » | 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 7b24aeaa67e119af7636709e6fc5ac92b09708fb..7d6564b2dd28c38f06f24efc324c86e56261ee4a 100644
--- a/ui/gl/gl_image_io_surface.mm
+++ b/ui/gl/gl_image_io_surface.mm
@@ -361,6 +361,14 @@ GLenum ConvertRequestedInternalFormat(GLenum internalformat) {
base::trace_event::MemoryAllocatorDump::kUnitsBytes,
static_cast<uint64_t>(size_bytes));
+ // The process tracing id is to identify the GpuMemoryBuffer client that
+ // created the allocation. For CVPixelBufferRefs, there is no corresponding
+ // GpuMemoryBuffer, so use an invalid process id.
+ if (cv_pixel_buffer_) {
+ process_tracing_id =
+ base::trace_event::MemoryDumpManager::kInvalidTracingProcessId;
+ }
+
auto guid =
GetGenericSharedMemoryGUIDForTracing(process_tracing_id, io_surface_id_);
pmd->CreateSharedGlobalAllocatorDump(guid);
« no previous file with comments | « media/gpu/vt_video_decode_accelerator_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698