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

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

Issue 707963003: cc: Remove main thread rendering stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed class member initialization :( Created 6 years, 1 month 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
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> 8 #include <list>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/debug/trace_event_argument.h" 11 #include "base/debug/trace_event_argument.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
15 #include "cc/debug/traced_value.h" 15 #include "cc/debug/traced_value.h"
16 16
17 namespace cc { 17 namespace cc {
18 18
19 struct CC_EXPORT RenderingStats { 19 struct CC_EXPORT RenderingStats {
20 // Stores a sequence of TimeDelta objects. 20 // Stores a sequence of TimeDelta objects.
21 class CC_EXPORT TimeDeltaList { 21 class CC_EXPORT TimeDeltaList {
22 public: 22 public:
23 TimeDeltaList();
24 ~TimeDeltaList();
25
26 void Append(base::TimeDelta value); 23 void Append(base::TimeDelta value);
27 void AddToTracedValue(base::debug::TracedValue* list_value) const; 24 void AddToTracedValue(base::debug::TracedValue* list_value) const;
28 25
29 void Add(const TimeDeltaList& other); 26 void Add(const TimeDeltaList& other);
30 27
31 base::TimeDelta GetLastTimeDelta() const; 28 base::TimeDelta GetLastTimeDelta() const;
32 29
33 private: 30 private:
34 std::list<base::TimeDelta> values; 31 std::vector<base::TimeDelta> values;
vmpstr 2014/11/07 22:41:19 Consider making this type of a change a separate p
35 }; 32 };
36 33
37 struct CC_EXPORT MainThreadRenderingStats { 34 RenderingStats();
38 // Note: when adding new members, please remember to update Add in
39 // rendering_stats.cc.
40 35
41 base::TimeDelta paint_time; 36 // Note: when adding new members, please remember to update Add in
42 int64 painted_pixel_count; 37 // rendering_stats.cc.
43 base::TimeDelta record_time;
44 int64 recorded_pixel_count;
45 38
46 MainThreadRenderingStats(); 39 int64 frame_count;
47 ~MainThreadRenderingStats(); 40 int64 visible_content_area;
48 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() 41 int64 approximated_visible_content_area;
49 const;
50 void Add(const MainThreadRenderingStats& other);
51 };
52 42
53 struct CC_EXPORT ImplThreadRenderingStats { 43 TimeDeltaList draw_duration;
54 // Note: when adding new members, please remember to update Add in 44 TimeDeltaList draw_duration_estimate;
55 // rendering_stats.cc. 45 TimeDeltaList begin_main_frame_to_commit_duration;
46 TimeDeltaList begin_main_frame_to_commit_duration_estimate;
47 TimeDeltaList commit_to_activate_duration;
48 TimeDeltaList commit_to_activate_duration_estimate;
56 49
57 int64 frame_count; 50 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const;
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
75 MainThreadRenderingStats main_stats;
76 ImplThreadRenderingStats impl_stats;
77
78 // Add fields of |other| to the fields in this structure.
79 void Add(const RenderingStats& other); 51 void Add(const RenderingStats& other);
80 }; 52 };
81 53
82 } // namespace cc 54 } // namespace cc
83 55
84 #endif // CC_DEBUG_RENDERING_STATS_H_ 56 #endif // CC_DEBUG_RENDERING_STATS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698