Chromium Code Reviews| Index: cc/debug/rendering_stats_instrumentation.h |
| diff --git a/cc/debug/rendering_stats_instrumentation.h b/cc/debug/rendering_stats_instrumentation.h |
| index 6f7515a94186f506a44d05467bba6d77c81bc907..a7f9b308685a2134decab49c2a3c2281905d560c 100644 |
| --- a/cc/debug/rendering_stats_instrumentation.h |
| +++ b/cc/debug/rendering_stats_instrumentation.h |
| @@ -18,8 +18,24 @@ class CC_EXPORT RenderingStatsInstrumentation { |
| static scoped_ptr<RenderingStatsInstrumentation> Create(); |
| virtual ~RenderingStatsInstrumentation(); |
|
nduca
2013/08/13 19:16:46
should this thing split in half too as a followup?
ernstm
2013/08/13 21:10:19
Probably yes. Filed crbug.com/272475.
|
| + // Return current main thread rendering stats. |
| + MainThreadRenderingStats GetMainThreadRenderingStats() { |
| + return main_stats_; |
| + } |
| + // Return current impl thread rendering stats. |
| + ImplThreadRenderingStats GetImplThreadRenderingStats() { |
| + return impl_stats_; |
| + } |
| + // Return the accumulated, combined rendering stats. |
| RenderingStats GetRenderingStats(); |
| + // Add current main thread rendering stats to accumulator and |
| + // clear current stats |
| + void AccumulateAndClearMainThreadStats(); |
| + // Add current impl thread rendering stats to accumulator and |
| + // clear current stats |
| + void AccumulateAndClearImplThreadStats(); |
| + |
| // Read and write access to the record_rendering_stats_ flag is not locked to |
| // improve performance. The flag is commonly turned off and hardly changes |
| // it's value during runtime. |
| @@ -33,8 +49,8 @@ class CC_EXPORT RenderingStatsInstrumentation { |
| base::TimeDelta EndRecording(base::TimeTicks start_time) const; |
| void IncrementAnimationFrameCount(); |
| - void SetScreenFrameCount(int64 count); |
| - void SetDroppedFrameCount(int64 count); |
| + void IncrementScreenFrameCount(int64 count); |
| + void IncrementDroppedFrameCount(int64 count); |
| void AddCommit(base::TimeDelta duration); |
| void AddPaint(base::TimeDelta duration, int64 pixels); |
| @@ -61,7 +77,11 @@ class CC_EXPORT RenderingStatsInstrumentation { |
| RenderingStatsInstrumentation(); |
| private: |
| - RenderingStats rendering_stats_; |
| + MainThreadRenderingStats main_stats_; |
| + MainThreadRenderingStats main_stats_accu_; |
| + ImplThreadRenderingStats impl_stats_; |
| + ImplThreadRenderingStats impl_stats_accu_; |
| + |
| bool record_rendering_stats_; |
| base::Lock lock_; |