OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_RENDERING_STATS_H_ | 5 #ifndef CC_RENDERING_STATS_H_ |
6 #define CC_RENDERING_STATS_H_ | 6 #define CC_RENDERING_STATS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
10 | 10 |
11 namespace cc { | 11 namespace cc { |
12 | 12 |
13 struct CC_EXPORT RenderingStats { | 13 struct CC_EXPORT RenderingStats { |
14 // FIXME: Rename these to animationFrameCount and screenFrameCount, crbug.co m/138641. | 14 // FIXME: Rename these to animationFrameCount and screenFrameCount, crbug.co m/138641. |
15 int64 numAnimationFrames; | 15 int64 numAnimationFrames; |
16 int64 numFramesSentToScreen; | 16 int64 numFramesSentToScreen; |
17 int64 droppedFrameCount; | 17 int64 droppedFrameCount; |
18 double totalPaintTimeInSeconds; | 18 double totalPaintTimeInSeconds; |
19 double totalRasterizeTimeInSeconds; | 19 double totalRasterizeTimeInSeconds; |
20 double totalCommitTimeInSeconds; | 20 double totalCommitTimeInSeconds; |
21 int64 totalCommitCount; | 21 int64 totalCommitCount; |
22 int64 totalPixelsPainted; | 22 int64 totalPixelsPainted; |
23 int64 totalPixelsRasterized; | 23 int64 totalPixelsRasterized; |
24 int64 numImplThreadScrolls; | 24 int64 numImplThreadScrolls; |
25 int64 numMainThreadScrolls; | 25 int64 numMainThreadScrolls; |
26 int64 numLayersInLayerTree; | 26 int64 numLayersInLayerTree; |
nduca
2012/11/28 21:27:35
Put a comment up here that reminds folks who add f
hartmanng
2012/11/28 23:18:17
Done.
| |
27 | 27 |
28 RenderingStats(); | 28 RenderingStats(); |
29 | |
30 // In conjunction with enumerateFields, this allows the embedder to | |
31 // enumerate the values in this structure without | |
32 // having to embed references to its specific member variables. This | |
33 // simplifies the addition of new fields to this type. | |
34 class Enumerator { | |
35 public: | |
36 virtual void addInt64(const char* name, int64 value) = 0; | |
37 virtual void addDouble(const char* name, double value) = 0; | |
38 | |
39 protected: | |
40 virtual ~Enumerator() { } | |
41 }; | |
42 | |
43 // Outputs the fields in this structure to the provided enumerator. | |
44 void enumerateFields(Enumerator* enumerator) const; | |
29 }; | 45 }; |
30 | 46 |
31 } // namespace cc | 47 } // namespace cc |
32 | 48 |
33 #endif // CC_RENDERING_STATS_H_ | 49 #endif // CC_RENDERING_STATS_H_ |
OLD | NEW |