| Index: cc/tiles/software_image_decode_controller.cc
|
| diff --git a/cc/tiles/software_image_decode_controller.cc b/cc/tiles/software_image_decode_controller.cc
|
| index 227aa97e9c25aa606b3ab381ce5038fc0167fa4d..af3551be408ad967d5a13eac6724612019847926 100644
|
| --- a/cc/tiles/software_image_decode_controller.cc
|
| +++ b/cc/tiles/software_image_decode_controller.cc
|
| @@ -27,9 +27,6 @@
|
| #include "third_party/skia/include/core/SkImage.h"
|
| #include "third_party/skia/include/core/SkPixmap.h"
|
| #include "ui/gfx/skia_util.h"
|
| -
|
| -using base::trace_event::MemoryAllocatorDump;
|
| -using base::trace_event::MemoryDumpLevelOfDetail;
|
|
|
| namespace cc {
|
| namespace {
|
| @@ -780,18 +777,9 @@
|
| base::trace_event::ProcessMemoryDump* pmd) {
|
| base::AutoLock lock(lock_);
|
|
|
| - if (args.level_of_detail == MemoryDumpLevelOfDetail::BACKGROUND) {
|
| - std::string dump_name =
|
| - base::StringPrintf("cc/image_memory/controller_0x%" PRIXPTR,
|
| - reinterpret_cast<uintptr_t>(this));
|
| - MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(dump_name);
|
| - dump->AddScalar("locked_size", MemoryAllocatorDump::kUnitsBytes,
|
| - locked_images_budget_.GetCurrentUsageSafe());
|
| - } else {
|
| - // Dump each of our caches.
|
| - DumpImageMemoryForCache(decoded_images_, "cached", pmd);
|
| - DumpImageMemoryForCache(at_raster_decoded_images_, "at_raster", pmd);
|
| - }
|
| + // Dump each of our caches.
|
| + DumpImageMemoryForCache(decoded_images_, "cached", pmd);
|
| + DumpImageMemoryForCache(at_raster_decoded_images_, "at_raster", pmd);
|
|
|
| // Memory dump can't fail, always return true.
|
| return true;
|
| @@ -804,17 +792,17 @@
|
| lock_.AssertAcquired();
|
|
|
| for (const auto& image_pair : cache) {
|
| + std::string dump_name = base::StringPrintf(
|
| + "cc/image_memory/controller_0x%" PRIXPTR "/%s/image_%" PRIu64 "_id_%d",
|
| + reinterpret_cast<uintptr_t>(this), cache_name,
|
| + image_pair.second->tracing_id(), image_pair.first.image_id());
|
| + base::trace_event::MemoryAllocatorDump* dump =
|
| + image_pair.second->memory()->CreateMemoryAllocatorDump(
|
| + dump_name.c_str(), pmd);
|
| + DCHECK(dump);
|
| if (image_pair.second->is_locked()) {
|
| - std::string dump_name = base::StringPrintf(
|
| - "cc/image_memory/controller_0x%" PRIXPTR "/%s/image_%" PRIu64
|
| - "_id_%d",
|
| - reinterpret_cast<uintptr_t>(this), cache_name,
|
| - image_pair.second->tracing_id(), image_pair.first.image_id());
|
| - MemoryAllocatorDump* dump =
|
| - image_pair.second->memory()->CreateMemoryAllocatorDump(
|
| - dump_name.c_str(), pmd);
|
| - DCHECK(dump);
|
| - dump->AddScalar("locked_size", MemoryAllocatorDump::kUnitsBytes,
|
| + dump->AddScalar("locked_size",
|
| + base::trace_event::MemoryAllocatorDump::kUnitsBytes,
|
| image_pair.first.locked_bytes());
|
| }
|
| }
|
|
|