1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "cc/rendering_stats.h"
9 RenderingStats::RenderingStats()
10 : numAnimationFrames(0),
11 numFramesSentToScreen(0),
13 totalPaintTimeInSeconds(0),
14 totalRasterizeTimeInSeconds(0),
15 totalCommitTimeInSeconds(0),
17 totalPixelsPainted(0),
18 totalPixelsRasterized(0),
19 numImplThreadScrolls(0),
20 numMainThreadScrolls(0),
24 void RenderingStats::EnumerateFields(Enumerator
* enumerator
) const {
25 enumerator
->AddInt64("numAnimationFrames", numAnimationFrames
);
26 enumerator
->AddInt64("numFramesSentToScreen", numFramesSentToScreen
);
27 enumerator
->AddInt64("droppedFrameCount", droppedFrameCount
);
28 enumerator
->AddDouble("totalPaintTimeInSeconds", totalPaintTimeInSeconds
);
29 enumerator
->AddDouble("totalRasterizeTimeInSeconds",
30 totalRasterizeTimeInSeconds
);
31 enumerator
->AddDouble("totalCommitTimeInSeconds", totalCommitTimeInSeconds
);
32 enumerator
->AddInt64("totalCommitCount", totalCommitCount
);
33 enumerator
->AddInt64("totalPixelsPainted", totalPixelsPainted
);
34 enumerator
->AddInt64("totalPixelsRasterized", totalPixelsRasterized
);
35 enumerator
->AddInt64("numImplThreadScrolls", numImplThreadScrolls
);
36 enumerator
->AddInt64("numMainThreadScrolls", numMainThreadScrolls
);
37 enumerator
->AddInt64("numLayersDrawn", numLayersDrawn
);