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

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

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 190965 Created 7 years, 9 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_instrumentation.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 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 #ifndef CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ 5 #ifndef CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_
6 #define CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ 6 #define CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "cc/debug/rendering_stats.h" 10 #include "cc/debug/rendering_stats.h"
(...skipping 14 matching lines...) Expand all
25 // it's value during runtime. 25 // it's value during runtime.
26 bool record_rendering_stats() const { return record_rendering_stats_; } 26 bool record_rendering_stats() const { return record_rendering_stats_; }
27 void set_record_rendering_stats(bool record_rendering_stats) { 27 void set_record_rendering_stats(bool record_rendering_stats) {
28 if (record_rendering_stats_ != record_rendering_stats) 28 if (record_rendering_stats_ != record_rendering_stats)
29 record_rendering_stats_ = record_rendering_stats; 29 record_rendering_stats_ = record_rendering_stats;
30 } 30 }
31 31
32 base::TimeTicks StartRecording() const; 32 base::TimeTicks StartRecording() const;
33 base::TimeDelta EndRecording(base::TimeTicks start_time) const; 33 base::TimeDelta EndRecording(base::TimeTicks start_time) const;
34 34
35 // TODO(egraether): Remove after switching Layer::update() to use this class.
36 // Used in LayerTreeHost::paintLayerContents().
37 void AddStats(const RenderingStats& other);
38
39 void IncrementAnimationFrameCount(); 35 void IncrementAnimationFrameCount();
40 void SetScreenFrameCount(int64 count); 36 void SetScreenFrameCount(int64 count);
41 void SetDroppedFrameCount(int64 count); 37 void SetDroppedFrameCount(int64 count);
42 38
43 void AddCommit(base::TimeDelta duration); 39 void AddCommit(base::TimeDelta duration);
44 void AddPaint(base::TimeDelta duration, int64 pixels); 40 void AddPaint(base::TimeDelta duration, int64 pixels);
45 void AddRaster(base::TimeDelta duration, 41 void AddRaster(base::TimeDelta duration,
46 int64 pixels, 42 int64 pixels,
47 bool is_in_pending_tree_now_bin); 43 bool is_in_pending_tree_now_bin);
48 44
(...skipping 16 matching lines...) Expand all
65 bool record_rendering_stats_; 61 bool record_rendering_stats_;
66 62
67 base::Lock lock_; 63 base::Lock lock_;
68 64
69 DISALLOW_COPY_AND_ASSIGN(RenderingStatsInstrumentation); 65 DISALLOW_COPY_AND_ASSIGN(RenderingStatsInstrumentation);
70 }; 66 };
71 67
72 } // namespace cc 68 } // namespace cc
73 69
74 #endif // CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ 70 #endif // CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_
OLDNEW
« no previous file with comments | « no previous file | cc/debug/rendering_stats_instrumentation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698