values.insert(values.end(), other.values.begin(), other.values.end());
}
+base::TimeDelta RenderingStats::TimeDeltaList::GetLastTimeDelta() const {
+ return values.empty() ? base::TimeDelta() : values.back();
+}
+
RenderingStats::MainThreadRenderingStats::MainThreadRenderingStats()
- : frame_count(0), painted_pixel_count(0), recorded_pixel_count(0) {
+ : painted_pixel_count(0), recorded_pixel_count(0) {
}
RenderingStats::MainThreadRenderingStats::~MainThreadRenderingStats() {
RenderingStats::MainThreadRenderingStats::AsTraceableData() const {
scoped_refptr<base::debug::TracedValue> record_data =
new base::debug::TracedValue();
- record_data->SetInteger("frame_count", frame_count);
record_data->SetDouble("paint_time", paint_time.InSecondsF());
record_data->SetInteger("painted_pixel_count", painted_pixel_count);
record_data->SetDouble("record_time", record_time.InSecondsF());
void RenderingStats::MainThreadRenderingStats::Add(
const MainThreadRenderingStats& other) {
- frame_count += other.frame_count;
paint_time += other.paint_time;
painted_pixel_count += other.painted_pixel_count;
record_time += other.record_time;
RenderingStats::ImplThreadRenderingStats::ImplThreadRenderingStats()
: frame_count(0),
- rasterized_pixel_count(0),
visible_content_area(0),
approximated_visible_content_area(0) {
}
scoped_refptr<base::debug::TracedValue> record_data =
new base::debug::TracedValue();
record_data->SetInteger("frame_count", frame_count);
- record_data->SetDouble("rasterize_time", rasterize_time.InSecondsF());
- record_data->SetInteger("rasterized_pixel_count", rasterized_pixel_count);
record_data->SetInteger("visible_content_area", visible_content_area);
record_data->SetInteger("approximated_visible_content_area",
approximated_visible_content_area);
void RenderingStats::ImplThreadRenderingStats::Add(
const ImplThreadRenderingStats& other) {
frame_count += other.frame_count;
- rasterize_time += other.rasterize_time;
- analysis_time += other.analysis_time;
- rasterized_pixel_count += other.rasterized_pixel_count;
visible_content_area += other.visible_content_area;
approximated_visible_content_area += other.approximated_visible_content_area;