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

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

Issue 258093005: cc: Record statistics about approximated content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix resolution condition. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/debug/rendering_stats_instrumentation.h ('k') | cc/layers/append_quads_data.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_instrumentation.h" 5 #include "cc/debug/rendering_stats_instrumentation.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 // static 9 // static
10 scoped_ptr<RenderingStatsInstrumentation> 10 scoped_ptr<RenderingStatsInstrumentation>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 void RenderingStatsInstrumentation::AddAnalysis(base::TimeDelta duration, 102 void RenderingStatsInstrumentation::AddAnalysis(base::TimeDelta duration,
103 int64 pixels) { 103 int64 pixels) {
104 if (!record_rendering_stats_) 104 if (!record_rendering_stats_)
105 return; 105 return;
106 106
107 base::AutoLock scoped_lock(lock_); 107 base::AutoLock scoped_lock(lock_);
108 impl_stats_.analysis_time += duration; 108 impl_stats_.analysis_time += duration;
109 } 109 }
110 110
111 void RenderingStatsInstrumentation::AddVisibleContentArea(int64 area) {
112 if (!record_rendering_stats_)
113 return;
114
115 base::AutoLock scoped_lock(lock_);
116 impl_stats_.visible_content_area += area;
117 }
118
119 void RenderingStatsInstrumentation::AddApproximatedVisibleContentArea(
120 int64 area) {
121 if (!record_rendering_stats_)
122 return;
123
124 base::AutoLock scoped_lock(lock_);
125 impl_stats_.approximated_visible_content_area += area;
126 }
127
111 } // namespace cc 128 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats_instrumentation.h ('k') | cc/layers/append_quads_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698