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

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

Issue 363003002: Add duration estimation data to RenderingStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add CC_EXPORT Created 6 years, 5 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 | « cc/debug/benchmark_instrumentation.cc ('k') | cc/debug/rendering_stats.cc » ('j') | no next file with comments »
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 <list>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "base/values.h"
10 #include "cc/base/cc_export.h" 13 #include "cc/base/cc_export.h"
11 #include "cc/debug/traced_value.h" 14 #include "cc/debug/traced_value.h"
12 15
13 namespace cc { 16 namespace cc {
14 17
15 struct CC_EXPORT MainThreadRenderingStats { 18 struct CC_EXPORT RenderingStats {
16 // Note: when adding new members, please remember to update EnumerateFields 19 // Stores a sequence of TimeDelta objects.
17 // and Add in rendering_stats.cc. 20 class CC_EXPORT TimeDeltaList {
21 public:
22 TimeDeltaList();
23 ~TimeDeltaList();
18 24
19 int64 frame_count; 25 void Append(base::TimeDelta value);
20 base::TimeDelta paint_time; 26 scoped_ptr<base::ListValue> AsListValueInMilliseconds() const;
21 int64 painted_pixel_count; 27 void Add(const TimeDeltaList& other);
22 base::TimeDelta record_time;
23 int64 recorded_pixel_count;
24 28
25 MainThreadRenderingStats(); 29 private:
26 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; 30 std::list<base::TimeDelta> values;
27 void Add(const MainThreadRenderingStats& other); 31 };
28 };
29 32
30 struct CC_EXPORT ImplThreadRenderingStats { 33 struct CC_EXPORT MainThreadRenderingStats {
31 // Note: when adding new members, please remember to update EnumerateFields 34 // Note: when adding new members, please remember to update Add in
32 // and Add in rendering_stats.cc. 35 // rendering_stats.cc.
33 36
34 int64 frame_count; 37 int64 frame_count;
35 base::TimeDelta rasterize_time; 38 base::TimeDelta paint_time;
36 base::TimeDelta analysis_time; 39 int64 painted_pixel_count;
37 int64 rasterized_pixel_count; 40 base::TimeDelta record_time;
38 int64 visible_content_area; 41 int64 recorded_pixel_count;
39 int64 approximated_visible_content_area;
40 42
41 ImplThreadRenderingStats(); 43 MainThreadRenderingStats();
42 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; 44 ~MainThreadRenderingStats();
43 void Add(const ImplThreadRenderingStats& other); 45 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData()
44 }; 46 const;
47 void Add(const MainThreadRenderingStats& other);
48 };
45 49
46 struct CC_EXPORT RenderingStats { 50 struct CC_EXPORT ImplThreadRenderingStats {
51 // Note: when adding new members, please remember to update Add in
52 // rendering_stats.cc.
53
54 int64 frame_count;
55 base::TimeDelta rasterize_time;
56 base::TimeDelta analysis_time;
57 int64 rasterized_pixel_count;
58 int64 visible_content_area;
59 int64 approximated_visible_content_area;
60
61 TimeDeltaList draw_duration;
62 TimeDeltaList draw_duration_estimate;
63 TimeDeltaList begin_main_frame_to_commit_duration;
64 TimeDeltaList begin_main_frame_to_commit_duration_estimate;
65 TimeDeltaList commit_to_activate_duration;
66 TimeDeltaList commit_to_activate_duration_estimate;
67
68 ImplThreadRenderingStats();
69 ~ImplThreadRenderingStats();
70 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData()
71 const;
72 void Add(const ImplThreadRenderingStats& other);
73 };
74
47 MainThreadRenderingStats main_stats; 75 MainThreadRenderingStats main_stats;
48 ImplThreadRenderingStats impl_stats; 76 ImplThreadRenderingStats impl_stats;
49 77
50 // Add fields of |other| to the fields in this structure. 78 // Add fields of |other| to the fields in this structure.
51 void Add(const RenderingStats& other); 79 void Add(const RenderingStats& other);
52 }; 80 };
53 81
54 } // namespace cc 82 } // namespace cc
55 83
56 #endif // CC_DEBUG_RENDERING_STATS_H_ 84 #endif // CC_DEBUG_RENDERING_STATS_H_
OLDNEW
« no previous file with comments | « cc/debug/benchmark_instrumentation.cc ('k') | cc/debug/rendering_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698