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

Unified Diff: cc/tiles/software_image_decode_cache.cc

Issue 2713483002: cc: Always report locked_size in software image cache. (Closed)
Patch Set: update Created 3 years, 10 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 | « cc/tiles/gpu_image_decode_cache.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/software_image_decode_cache.cc
diff --git a/cc/tiles/software_image_decode_cache.cc b/cc/tiles/software_image_decode_cache.cc
index 01698198636201e06ff790388774e7310ff8a50d..f68fd69c4489351d80fe056a5b4ac145b8d9a547 100644
--- a/cc/tiles/software_image_decode_cache.cc
+++ b/cc/tiles/software_image_decode_cache.cc
@@ -864,15 +864,15 @@ void SoftwareImageDecodeCache::DumpImageMemoryForCache(
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.
+ // total size. 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()) {
- dump->AddScalar("locked_size", MemoryAllocatorDump::kUnitsBytes,
- image_pair.first.locked_bytes());
- }
+ size_t locked_bytes =
+ image_pair.second->is_locked() ? image_pair.first.locked_bytes() : 0u;
+ dump->AddScalar("locked_size", MemoryAllocatorDump::kUnitsBytes,
+ locked_bytes);
}
}
« no previous file with comments | « cc/tiles/gpu_image_decode_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698