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

Unified Diff: ui/gl/gl_image_memory.cc

Issue 1323593003: Log both GL and cpu-side memory in GLImage*Memory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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

Powered by Google App Engine
This is Rietveld 408576698