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

Unified Diff: cc/tiles/software_image_decode_controller.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 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/test/layer_tree_test.cc ('k') | cc/trees/damage_tracker.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 30410279e1e6596cb9417a5653aa45a855ac6f19..14dec6394f5dc198df65bfee3696e526a675e6a7 100644
--- a/cc/tiles/software_image_decode_controller.cc
+++ b/cc/tiles/software_image_decode_controller.cc
@@ -805,16 +805,17 @@ void SoftwareImageDecodeController::DumpImageMemoryForCache(
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());
+ // CreateMemoryAllocatorDump will automatically add tracking values for the
+ // total size. If locked, we also add a "locked_size" below.
+ 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,
image_pair.first.locked_bytes());
}
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/damage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698