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

Unified Diff: cc/tiles/software_image_decode_controller.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
« no previous file with comments | « cc/tiles/software_image_decode_controller.h ('k') | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
}
« no previous file with comments | « cc/tiles/software_image_decode_controller.h ('k') | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698