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

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

Issue 689503002: cc: Use commit to activation time in repaint HUD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge + cl format 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
« no previous file with comments | « cc/debug/rendering_stats.h ('k') | cc/layers/heads_up_display_layer_impl.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 #include "cc/debug/rendering_stats.h" 5 #include "cc/debug/rendering_stats.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 RenderingStats::TimeDeltaList::TimeDeltaList() { 9 RenderingStats::TimeDeltaList::TimeDeltaList() {
10 } 10 }
(...skipping 10 matching lines...) Expand all
21 std::list<base::TimeDelta>::const_iterator iter; 21 std::list<base::TimeDelta>::const_iterator iter;
22 for (iter = values.begin(); iter != values.end(); ++iter) { 22 for (iter = values.begin(); iter != values.end(); ++iter) {
23 list_value->AppendDouble(iter->InMillisecondsF()); 23 list_value->AppendDouble(iter->InMillisecondsF());
24 } 24 }
25 } 25 }
26 26
27 void RenderingStats::TimeDeltaList::Add(const TimeDeltaList& other) { 27 void RenderingStats::TimeDeltaList::Add(const TimeDeltaList& other) {
28 values.insert(values.end(), other.values.begin(), other.values.end()); 28 values.insert(values.end(), other.values.begin(), other.values.end());
29 } 29 }
30 30
31 base::TimeDelta RenderingStats::TimeDeltaList::GetLastTimeDelta() const {
32 return values.empty() ? base::TimeDelta() : values.back();
33 }
34
31 RenderingStats::MainThreadRenderingStats::MainThreadRenderingStats() 35 RenderingStats::MainThreadRenderingStats::MainThreadRenderingStats()
32 : painted_pixel_count(0), recorded_pixel_count(0) { 36 : painted_pixel_count(0), recorded_pixel_count(0) {
33 } 37 }
34 38
35 RenderingStats::MainThreadRenderingStats::~MainThreadRenderingStats() { 39 RenderingStats::MainThreadRenderingStats::~MainThreadRenderingStats() {
36 } 40 }
37 41
38 scoped_refptr<base::debug::ConvertableToTraceFormat> 42 scoped_refptr<base::debug::ConvertableToTraceFormat>
39 RenderingStats::MainThreadRenderingStats::AsTraceableData() const { 43 RenderingStats::MainThreadRenderingStats::AsTraceableData() const {
40 scoped_refptr<base::debug::TracedValue> record_data = 44 scoped_refptr<base::debug::TracedValue> record_data =
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 commit_to_activate_duration_estimate.Add( 124 commit_to_activate_duration_estimate.Add(
121 other.commit_to_activate_duration_estimate); 125 other.commit_to_activate_duration_estimate);
122 } 126 }
123 127
124 void RenderingStats::Add(const RenderingStats& other) { 128 void RenderingStats::Add(const RenderingStats& other) {
125 main_stats.Add(other.main_stats); 129 main_stats.Add(other.main_stats);
126 impl_stats.Add(other.impl_stats); 130 impl_stats.Add(other.impl_stats);
127 } 131 }
128 132
129 } // namespace cc 133 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats.h ('k') | cc/layers/heads_up_display_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698