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

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

Issue 2467973004: Revert of Add BACKGROUND dump mode to various GPU/CC MemoryDumpProviders (Closed)
Patch Set: Created 4 years, 1 month 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: 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 7944b5151dddcd4536dc9e9bc2105cfdc711ad8a..dbe95db5b0987cc247aae5d060983263bef23dea 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -33,9 +33,6 @@
#include "ui/gl/gl_state_restorer.h"
#include "ui/gl/gl_version_info.h"
#include "ui/gl/trace_util.h"
-
-using base::trace_event::MemoryAllocatorDump;
-using base::trace_event::MemoryDumpLevelOfDetail;
namespace gpu {
namespace gles2 {
@@ -1684,10 +1681,12 @@
// texture allocation also as the storage is not provided by the
// GLImage in that case.
if (level_infos[level_index].image_state != BOUND) {
- MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(base::StringPrintf(
- "%s/face_%d/level_%d", dump_name.c_str(), face_index, level_index));
+ base::trace_event::MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(
+ base::StringPrintf("%s/face_%d/level_%d", dump_name.c_str(),
+ face_index, level_index));
dump->AddScalar(
- MemoryAllocatorDump::kNameSize, MemoryAllocatorDump::kUnitsBytes,
+ base::trace_event::MemoryAllocatorDump::kNameSize,
+ base::trace_event::MemoryAllocatorDump::kUnitsBytes,
static_cast<uint64_t>(level_infos[level_index].estimated_size));
}
}
@@ -3132,21 +3131,8 @@
bool TextureManager::OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) {
- if (args.level_of_detail == MemoryDumpLevelOfDetail::BACKGROUND) {
- std::string dump_name =
- base::StringPrintf("gpu/gl/textures/share_group_%" PRIu64 "",
- memory_tracker_->ShareGroupTracingGUID());
- MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(dump_name);
- dump->AddScalar(MemoryAllocatorDump::kNameSize,
- MemoryAllocatorDump::kUnitsBytes, mem_represented());
-
- // Early out, no need for more detail in a BACKGROUND dump.
- return true;
- }
-
for (const auto& resource : textures_) {
- // Only dump memory info for textures actually owned by this
- // TextureManager.
+ // Only dump memory info for textures actually owned by this TextureManager.
DumpTextureRef(pmd, resource.second.get());
}
@@ -3172,9 +3158,10 @@
"gpu/gl/textures/share_group_%" PRIu64 "/texture_%d",
memory_tracker_->ShareGroupTracingGUID(), ref->client_id());
- MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(dump_name);
- dump->AddScalar(MemoryAllocatorDump::kNameSize,
- MemoryAllocatorDump::kUnitsBytes,
+ 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>(size));
// Add the |client_guid| which expresses shared ownership with the client
« no previous file with comments | « gpu/command_buffer/service/renderbuffer_manager.cc ('k') | gpu/command_buffer/service/transfer_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698