#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "third_party/skia/include/effects/SkColorMatrixFilter.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/size.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/size.h"
namespace cc {
scoped_ptr<LayerImpl> HeadsUpDisplayLayerImpl::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
- return HeadsUpDisplayLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
+ return HeadsUpDisplayLayerImpl::Create(tree_impl, id());
}
void HeadsUpDisplayLayerImpl::AcquireResource(
void HeadsUpDisplayLayerImpl::AppendQuads(
RenderPass* render_pass,
- const OcclusionTracker<LayerImpl>& occlusion_tracker,
+ const Occlusion& occlusion_in_content_space,
AppendQuadsData* append_quads_data) {
if (!resources_.back()->id())
return;
bounds.right(),
bounds.top() + indicator_top,
*paint);
- paint->setXfermode(NULL);
+ paint->setXfermode(nullptr);
}
SkRect HeadsUpDisplayLayerImpl::DrawFPSDisplay(
const std::string min_max_text =
base::StringPrintf("%.0f-%.0f", fps_graph_.min, fps_graph_.max);
+ VLOG(1) << value_text;
+
paint.setColor(DebugColors::FPSDisplayTextAndGraphColor());
DrawText(canvas,
&paint,
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;
const int left = bounds().width() - width - right;
const SkRect area = SkRect::MakeXYWH(left, top, width, height);
- const double megabyte = 1024.0 * 1024.0;
+ const double kMegabyte = 1024.0 * 1024.0;
SkPaint paint = CreatePaint();
DrawGraphBackground(canvas, &paint, area);
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 / kMegabyte);
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 / kMegabyte);
DrawText(canvas, &paint, text, SkPaint::kRight_Align, kFontHeight, stat2_pos);
return area;
"%.1f-%.1f", paint_time_graph_.min, paint_time_graph_.max);
paint.setColor(DebugColors::PaintTimeDisplayTextAndGraphColor());
- DrawText(canvas,
- &paint,
- "Page paint time (ms)",
- SkPaint::kLeft_Align,
- kFontHeight,
- text_bounds.left(),
- text_bounds.bottom());
+ DrawText(canvas, &paint, "Compositor frame time (ms)", SkPaint::kLeft_Align,
+ kFontHeight, text_bounds.left(), text_bounds.bottom());
DrawText(canvas,
&paint,
value_text,