summaryrefslogtreecommitdiffstats
path: root/cc/rendering_stats.cc
blob: 56e0c129e3d2afb7dfd9033ebf924b462d26111a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/rendering_stats.h"

namespace cc {

RenderingStats::RenderingStats()
    : numAnimationFrames(0),
      numFramesSentToScreen(0),
      droppedFrameCount(0),
      totalPaintTimeInSeconds(0),
      totalRasterizeTimeInSeconds(0),
      totalCommitTimeInSeconds(0),
      totalCommitCount(0),
      totalPixelsPainted(0),
      totalPixelsRasterized(0),
      numImplThreadScrolls(0),
      numMainThreadScrolls(0),
      numLayersDrawn(0) {
}

void RenderingStats::EnumerateFields(Enumerator* enumerator) const {
    enumerator->AddInt64("numAnimationFrames", numAnimationFrames);
    enumerator->AddInt64("numFramesSentToScreen", numFramesSentToScreen);
    enumerator->AddInt64("droppedFrameCount", droppedFrameCount);
    enumerator->AddDouble("totalPaintTimeInSeconds", totalPaintTimeInSeconds);
    enumerator->AddDouble("totalRasterizeTimeInSeconds",
                          totalRasterizeTimeInSeconds);
    enumerator->AddDouble("totalCommitTimeInSeconds", totalCommitTimeInSeconds);
    enumerator->AddInt64("totalCommitCount", totalCommitCount);
    enumerator->AddInt64("totalPixelsPainted", totalPixelsPainted);
    enumerator->AddInt64("totalPixelsRasterized", totalPixelsRasterized);
    enumerator->AddInt64("numImplThreadScrolls", numImplThreadScrolls);
    enumerator->AddInt64("numMainThreadScrolls", numMainThreadScrolls);
    enumerator->AddInt64("numLayersDrawn", numLayersDrawn);
}

}  // namespace cc