Index: cc/layers/heads_up_display_layer_impl.cc |
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc |
index 6149a06be0cf9b05b595e9f0a580af9e78ce5470..fac4325895f5bc1b4874bd1f0e8ef4928b021657 100644 |
--- a/cc/layers/heads_up_display_layer_impl.cc |
+++ b/cc/layers/heads_up_display_layer_impl.cc |
@@ -456,7 +456,7 @@ SkRect HeadsUpDisplayLayerImpl::DrawMemoryDisplay(SkCanvas* canvas, |
int right, |
int top, |
int width) const { |
- if (!memory_entry_.bytes_total()) |
+ if (!memory_entry_.total_bytes_used) |
return SkRect::MakeEmpty(); |
const int kPadding = 4; |
@@ -485,20 +485,14 @@ SkRect HeadsUpDisplayLayerImpl::DrawMemoryDisplay(SkCanvas* canvas, |
kFontHeight, |
title_pos); |
- std::string text = |
- base::StringPrintf("%6.1f MB used", |
- (memory_entry_.bytes_unreleasable + |
- memory_entry_.bytes_allocated) / megabyte); |
+ std::string text = base::StringPrintf( |
+ "%6.1f MB used", memory_entry_.total_bytes_used / megabyte); |
DrawText(canvas, &paint, text, SkPaint::kRight_Align, kFontHeight, stat1_pos); |
- if (memory_entry_.bytes_over) { |
+ if (!memory_entry_.had_enough_memory) |
paint.setColor(SK_ColorRED); |
- text = base::StringPrintf("%6.1f MB over", |
- memory_entry_.bytes_over / megabyte); |
- } else { |
- text = base::StringPrintf("%6.1f MB max ", |
- memory_entry_.total_budget_in_bytes / megabyte); |
- } |
+ text = base::StringPrintf("%6.1f MB max ", |
+ memory_entry_.total_budget_in_bytes / megabyte); |
DrawText(canvas, &paint, text, SkPaint::kRight_Align, kFontHeight, stat2_pos); |
return area; |