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

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

Issue 363003002: Add duration estimation data to RenderingStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check we only add duration data once per frame. Created 6 years, 5 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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 base::TimeTicks StartRecording() const; 47 base::TimeTicks StartRecording() const;
48 base::TimeDelta EndRecording(base::TimeTicks start_time) const; 48 base::TimeDelta EndRecording(base::TimeTicks start_time) const;
49 49
50 void IncrementFrameCount(int64 count, bool main_thread); 50 void IncrementFrameCount(int64 count, bool main_thread);
51 void AddPaint(base::TimeDelta duration, int64 pixels); 51 void AddPaint(base::TimeDelta duration, int64 pixels);
52 void AddRecord(base::TimeDelta duration, int64 pixels); 52 void AddRecord(base::TimeDelta duration, int64 pixels);
53 void AddRaster(base::TimeDelta duration, int64 pixels); 53 void AddRaster(base::TimeDelta duration, int64 pixels);
54 void AddAnalysis(base::TimeDelta duration, int64 pixels); 54 void AddAnalysis(base::TimeDelta duration, int64 pixels);
55 void AddVisibleContentArea(int64 area); 55 void AddVisibleContentArea(int64 area);
56 void AddApproximatedVisibleContentArea(int64 area); 56 void AddApproximatedVisibleContentArea(int64 area);
57 void AddDrawDuration(base::TimeDelta draw_duration,
58 base::TimeDelta draw_duration_estimate);
59 void AddBeginMainFrameToCommitDuration(
60 base::TimeDelta begin_main_frame_to_commit_duration,
61 base::TimeDelta begin_main_frame_to_commit_duration_estimate);
62 void AddCommitToActivateDuration(
63 base::TimeDelta commit_to_activate_duration,
64 base::TimeDelta commit_to_activate_duration_estimate);
57 65
58 protected: 66 protected:
59 RenderingStatsInstrumentation(); 67 RenderingStatsInstrumentation();
60 68
61 private: 69 private:
62 MainThreadRenderingStats main_thread_rendering_stats_; 70 MainThreadRenderingStats main_thread_rendering_stats_;
63 MainThreadRenderingStats main_thread_rendering_stats_accu_; 71 MainThreadRenderingStats main_thread_rendering_stats_accu_;
64 ImplThreadRenderingStats impl_thread_rendering_stats_; 72 ImplThreadRenderingStats impl_thread_rendering_stats_;
65 ImplThreadRenderingStats impl_thread_rendering_stats_accu_; 73 ImplThreadRenderingStats impl_thread_rendering_stats_accu_;
66 74
67 bool record_rendering_stats_; 75 bool record_rendering_stats_;
68 76
69 base::Lock lock_; 77 base::Lock lock_;
70 78
71 DISALLOW_COPY_AND_ASSIGN(RenderingStatsInstrumentation); 79 DISALLOW_COPY_AND_ASSIGN(RenderingStatsInstrumentation);
72 }; 80 };
73 81
74 } // namespace cc 82 } // namespace cc
75 83
76 #endif // CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ 84 #endif // CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698