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

Unified Diff: cc/tiles/gpu_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 | « no previous file | cc/tiles/software_image_decode_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/gpu_image_decode_cache.cc
diff --git a/cc/tiles/gpu_image_decode_cache.cc b/cc/tiles/gpu_image_decode_cache.cc
index 1dcc40c471acd9fa494c86e0e73732d035fc2e35..d5b3148d4dbf8137dc09094e51321858073b07c6 100644
--- a/cc/tiles/gpu_image_decode_cache.cc
+++ b/cc/tiles/gpu_image_decode_cache.cc
@@ -614,14 +614,13 @@ bool GpuImageDecodeCache::OnMemoryDump(
MemoryAllocatorDump* dump =
image_data->decode.data()->CreateMemoryAllocatorDump(
discardable_dump_name.c_str(), pmd);
- // If our image is locked, dump the "locked_size" as an additional
- // column.
+ // Dump the "locked_size" as an additional column.
// This lets us see the amount of discardable which is contributing to
// memory pressure.
- if (image_data->decode.is_locked()) {
- dump->AddScalar("locked_size", MemoryAllocatorDump::kUnitsBytes,
- image_data->size);
- }
+ size_t locked_size =
+ image_data->decode.is_locked() ? image_data->size : 0u;
+ dump->AddScalar("locked_size", MemoryAllocatorDump::kUnitsBytes,
+ locked_size);
}
// If we have an uploaded image (that is actually on the GPU, not just a
« no previous file with comments | « no previous file | cc/tiles/software_image_decode_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698