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

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

Issue 898663003: cc: refactor of RenderingStats::TimeDeltaList::AddToTracedValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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') | 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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "base/trace_event/trace_event_argument.h" 12 #include "base/trace_event/trace_event_argument.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(); 23 TimeDeltaList();
24 ~TimeDeltaList(); 24 ~TimeDeltaList();
25 25
26 void Append(base::TimeDelta value); 26 void Append(base::TimeDelta value);
27 void AddToTracedValue(base::debug::TracedValue* list_value) const; 27 void AddToTracedValue(const char* name,
28 base::debug::TracedValue* list_value) const;
28 29
29 void Add(const TimeDeltaList& other); 30 void Add(const TimeDeltaList& other);
30 31
31 base::TimeDelta GetLastTimeDelta() const; 32 base::TimeDelta GetLastTimeDelta() const;
32 33
33 private: 34 private:
34 std::vector<base::TimeDelta> values; 35 std::vector<base::TimeDelta> values;
35 }; 36 };
36 37
37 RenderingStats(); 38 RenderingStats();
(...skipping 13 matching lines...) Expand all
51 TimeDeltaList commit_to_activate_duration; 52 TimeDeltaList commit_to_activate_duration;
52 TimeDeltaList commit_to_activate_duration_estimate; 53 TimeDeltaList commit_to_activate_duration_estimate;
53 54
54 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; 55 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const;
55 void Add(const RenderingStats& other); 56 void Add(const RenderingStats& other);
56 }; 57 };
57 58
58 } // namespace cc 59 } // namespace cc
59 60
60 #endif // CC_DEBUG_RENDERING_STATS_H_ 61 #endif // CC_DEBUG_RENDERING_STATS_H_
OLDNEW
« no previous file with comments | « no previous file | cc/debug/rendering_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698