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 "base/time.h" | 9 #include "base/time.h" |
10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 struct CC_EXPORT RenderingStats { | 14 struct CC_EXPORT RenderingStats { |
15 // FIXME: Rename these to animationFrameCount and screenFrameCount, crbug.co m/138641. | 15 // FIXME: Rename these to animationFrameCount and screenFrameCount, crbug.co m/138641. |
16 int64 numAnimationFrames; | 16 int64 numAnimationFrames; |
17 int64 numFramesSentToScreen; | 17 int64 numFramesSentToScreen; |
18 int64 droppedFrameCount; | 18 int64 droppedFrameCount; |
19 double totalPaintTimeInSeconds; | 19 double totalPaintTimeInSeconds; |
20 double totalRasterizeTimeInSeconds; | 20 double totalRasterizeTimeInSeconds; |
21 double totalCommitTimeInSeconds; | 21 double totalCommitTimeInSeconds; |
22 int64 totalCommitCount; | 22 int64 totalCommitCount; |
23 int64 totalPixelsPainted; | 23 int64 totalPixelsPainted; |
24 int64 totalPixelsRasterized; | 24 int64 totalPixelsRasterized; |
25 int64 numImplThreadScrolls; | 25 int64 numImplThreadScrolls; |
26 int64 numMainThreadScrolls; | 26 int64 numMainThreadScrolls; |
27 int64 numLayersDrawn; | 27 int64 numLayersDrawn; |
28 int64 numMissingTiles; | 28 int64 numMissingTiles; |
29 int64 totalDeferredImageDecodeCount; | |
30 int64 totalDeferredImageCacheHitCount; | |
31 int64 totalPixelGatheringCount; | |
reveman
2012/12/13 21:58:37
PixelGathering is not the best name. Can you make
qinmin
2012/12/13 22:42:55
Done.
| |
32 double totalDeferredImageDecodeTimeInSeconds; | |
33 double totalPixelGatheringTimeInSeconds; | |
29 // Note: when adding new members, please remember to update enumerateFields | 34 // Note: when adding new members, please remember to update enumerateFields |
30 // in rendering_stats.cc. | 35 // in rendering_stats.cc. |
31 | 36 |
32 RenderingStats(); | 37 RenderingStats(); |
33 | 38 |
34 // In conjunction with enumerateFields, this allows the embedder to | 39 // In conjunction with enumerateFields, this allows the embedder to |
35 // enumerate the values in this structure without | 40 // enumerate the values in this structure without |
36 // having to embed references to its specific member variables. This | 41 // having to embed references to its specific member variables. This |
37 // simplifies the addition of new fields to this type. | 42 // simplifies the addition of new fields to this type. |
38 class Enumerator { | 43 class Enumerator { |
39 public: | 44 public: |
40 virtual void AddInt64(const char* name, int64 value) = 0; | 45 virtual void AddInt64(const char* name, int64 value) = 0; |
41 virtual void AddDouble(const char* name, double value) = 0; | 46 virtual void AddDouble(const char* name, double value) = 0; |
42 virtual void AddInt(const char* name, int value) = 0; | 47 virtual void AddInt(const char* name, int value) = 0; |
43 virtual void AddTimeDeltaInSecondsF(const char* name, | 48 virtual void AddTimeDeltaInSecondsF(const char* name, |
44 const base::TimeDelta& value) = 0; | 49 const base::TimeDelta& value) = 0; |
45 | 50 |
46 protected: | 51 protected: |
47 virtual ~Enumerator() { } | 52 virtual ~Enumerator() { } |
48 }; | 53 }; |
49 | 54 |
50 // Outputs the fields in this structure to the provided enumerator. | 55 // Outputs the fields in this structure to the provided enumerator. |
51 void EnumerateFields(Enumerator* enumerator) const; | 56 void EnumerateFields(Enumerator* enumerator) const; |
52 }; | 57 }; |
53 | 58 |
54 } // namespace cc | 59 } // namespace cc |
55 | 60 |
56 #endif // CC_RENDERING_STATS_H_ | 61 #endif // CC_RENDERING_STATS_H_ |
OLD | NEW |