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

Unified Diff: gpu/command_buffer/service/texture_manager.cc

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 | « gpu/command_buffer/service/texture_definition.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index a31a5f7c70a43164798b91e13862734d3b3b4fe4..b88f6bc6656c48d7339cc878ffb6a879f204bd15 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -2059,10 +2059,6 @@ bool TextureManager::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) {
void TextureManager::DumpTextureRef(base::trace_event::ProcessMemoryDump* pmd,
TextureRef* ref) {
- // TODO(ericrk): Trace image-backed textures. crbug.com/514914
- if (ref->texture()->HasImages())
- return;
-
uint32_t size = ref->texture()->estimated_size();
// Ignore unallocated texture IDs.
@@ -2072,6 +2068,15 @@ void TextureManager::DumpTextureRef(base::trace_event::ProcessMemoryDump* pmd,
std::string dump_name =
base::StringPrintf("gl/textures/client_%d/texture_%d",
memory_tracker_->ClientId(), ref->client_id());
+
+ // TODO(ericrk): GLImage tracing. crbug.com/514914
+ if (ref->texture()->HasImages()) {
+ ref->texture()
+ ->GetLevelImage(GL_TEXTURE_2D, 0)
+ ->DumpMemory(pmd, memory_tracker_->ClientTracingId(), dump_name);
+ return;
+ }
+
base::trace_event::MemoryAllocatorDump* dump =
pmd->CreateAllocatorDump(dump_name);
dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
« no previous file with comments | « gpu/command_buffer/service/texture_definition.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698