Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: cc/debug/rendering_stats.h

Issue 12780025: cc: Chromify rendering_stats (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Renamed vars, removed fixme Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/debug/rendering_stats.cc » ('j') | cc/debug/rendering_stats.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_DEBUG_RENDERING_STATS_H_ 5 #ifndef CC_DEBUG_RENDERING_STATS_H_
6 #define CC_DEBUG_RENDERING_STATS_H_ 6 #define CC_DEBUG_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/base/cc_export.h" 10 #include "cc/base/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 int64 animation_frame_count;
16 int64 numAnimationFrames; 16 int64 screen_frame_count;
17 int64 numFramesSentToScreen; 17 int64 dropped_frame_count;
18 int64 droppedFrameCount; 18 base::TimeDelta total_paint_time;
19 base::TimeDelta totalPaintTime; 19 base::TimeDelta total_rasterize_time;
20 base::TimeDelta totalRasterizeTime; 20 base::TimeDelta total_rasterize_time_for_now_bins_on_pending_tree;
21 base::TimeDelta totalRasterizeTimeForNowBinsOnPendingTree; 21 base::TimeDelta total_commit_time;
22 base::TimeDelta totalCommitTime; 22 int64 total_commit_count;
23 int64 totalCommitCount; 23 int64 total_pixels_painted;
24 int64 totalPixelsPainted; 24 int64 total_pixels_rasterized;
25 int64 totalPixelsRasterized; 25 int64 num_impl_thread_scrolls;
26 int64 numImplThreadScrolls; 26 int64 num_main_thread_scrolls;
27 int64 numMainThreadScrolls; 27 int64 num_layers_drawn;
28 int64 numLayersDrawn; 28 int64 num_missing_tiles;
29 int64 numMissingTiles; 29 int64 total_deferred_image_decode_count;
30 int64 totalDeferredImageDecodeCount; 30 int64 total_deferred_image_cache_hit_count;
31 int64 totalDeferredImageCacheHitCount; 31 int64 total_image_gathering_count;
32 int64 totalImageGatheringCount; 32 base::TimeDelta total_deferred_image_decode_time;
33 base::TimeDelta totalDeferredImageDecodeTime; 33 base::TimeDelta total_image_gathering_time;
34 base::TimeDelta totalImageGatheringTime; 34 // Note: when adding new members, please remember to update EnumerateFields
35 // Note: when adding new members, please remember to update EnumerateFields 35 // and Add in rendering_stats.cc.
36 // and Add in rendering_stats.cc.
37 36
38 RenderingStats(); 37 RenderingStats();
39 38
40 // In conjunction with enumerateFields, this allows the embedder to 39 // In conjunction with enumerateFields, this allows the embedder to
41 // enumerate the values in this structure without 40 // enumerate the values in this structure without
42 // having to embed references to its specific member variables. This 41 // having to embed references to its specific member variables. This
43 // simplifies the addition of new fields to this type. 42 // simplifies the addition of new fields to this type.
44 class Enumerator { 43 class Enumerator {
45 public: 44 public:
46 virtual void AddInt64(const char* name, int64 value) = 0; 45 virtual void AddInt64(const char* name, int64 value) = 0;
47 virtual void AddDouble(const char* name, double value) = 0; 46 virtual void AddDouble(const char* name, double value) = 0;
48 virtual void AddInt(const char* name, int value) = 0; 47 virtual void AddInt(const char* name, int value) = 0;
49 virtual void AddTimeDeltaInSecondsF(const char* name, 48 virtual void AddTimeDeltaInSecondsF(const char* name,
50 const base::TimeDelta& value) = 0; 49 const base::TimeDelta& value) = 0;
51 50
52 protected: 51 protected:
53 virtual ~Enumerator() { } 52 virtual ~Enumerator() {}
54 }; 53 };
55 54
56 // Outputs the fields in this structure to the provided enumerator. 55 // Outputs the fields in this structure to the provided enumerator.
57 void EnumerateFields(Enumerator* enumerator) const; 56 void EnumerateFields(Enumerator* enumerator) const;
58 57
59 // Add fields of |other| to the fields in this structure. 58 // Add fields of |other| to the fields in this structure.
60 void Add(const RenderingStats& other); 59 void Add(const RenderingStats& other);
61 }; 60 };
62 61
63 } // namespace cc 62 } // namespace cc
64 63
65 #endif // CC_DEBUG_RENDERING_STATS_H_ 64 #endif // CC_DEBUG_RENDERING_STATS_H_
OLDNEW
« no previous file with comments | « no previous file | cc/debug/rendering_stats.cc » ('j') | cc/debug/rendering_stats.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698