| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |