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

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

Issue 1539203002: Switch to standard integer types in cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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 | « cc/debug/rendering_stats.h ('k') | 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 <stdint.h>
9
10 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
9 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
10 #include "cc/debug/rendering_stats.h" 13 #include "cc/debug/rendering_stats.h"
11 14
12 namespace cc { 15 namespace cc {
13 16
14 // RenderingStatsInstrumentation is shared among threads and manages conditional 17 // RenderingStatsInstrumentation is shared among threads and manages conditional
15 // recording of rendering stats into a private RenderingStats instance. 18 // recording of rendering stats into a private RenderingStats instance.
16 class CC_EXPORT RenderingStatsInstrumentation { 19 class CC_EXPORT RenderingStatsInstrumentation {
17 public: 20 public:
(...skipping 12 matching lines...) Expand all
30 33
31 // Read and write access to the record_rendering_stats_ flag is not locked to 34 // Read and write access to the record_rendering_stats_ flag is not locked to
32 // improve performance. The flag is commonly turned off and hardly changes 35 // improve performance. The flag is commonly turned off and hardly changes
33 // it's value during runtime. 36 // it's value during runtime.
34 bool record_rendering_stats() const { return record_rendering_stats_; } 37 bool record_rendering_stats() const { return record_rendering_stats_; }
35 void set_record_rendering_stats(bool record_rendering_stats) { 38 void set_record_rendering_stats(bool record_rendering_stats) {
36 if (record_rendering_stats_ != record_rendering_stats) 39 if (record_rendering_stats_ != record_rendering_stats)
37 record_rendering_stats_ = record_rendering_stats; 40 record_rendering_stats_ = record_rendering_stats;
38 } 41 }
39 42
40 void IncrementFrameCount(int64 count); 43 void IncrementFrameCount(int64_t count);
41 void AddVisibleContentArea(int64 area); 44 void AddVisibleContentArea(int64_t area);
42 void AddApproximatedVisibleContentArea(int64 area); 45 void AddApproximatedVisibleContentArea(int64_t area);
43 void AddCheckerboardedVisibleContentArea(int64 area); 46 void AddCheckerboardedVisibleContentArea(int64_t area);
44 void AddCheckerboardedNoRecordingContentArea(int64 area); 47 void AddCheckerboardedNoRecordingContentArea(int64_t area);
45 void AddCheckerboardedNeedsRasterContentArea(int64 area); 48 void AddCheckerboardedNeedsRasterContentArea(int64_t area);
46 void AddDrawDuration(base::TimeDelta draw_duration, 49 void AddDrawDuration(base::TimeDelta draw_duration,
47 base::TimeDelta draw_duration_estimate); 50 base::TimeDelta draw_duration_estimate);
48 void AddBeginMainFrameToCommitDuration( 51 void AddBeginMainFrameToCommitDuration(
49 base::TimeDelta begin_main_frame_to_commit_duration, 52 base::TimeDelta begin_main_frame_to_commit_duration,
50 base::TimeDelta begin_main_frame_to_commit_duration_estimate); 53 base::TimeDelta begin_main_frame_to_commit_duration_estimate);
51 void AddCommitToActivateDuration( 54 void AddCommitToActivateDuration(
52 base::TimeDelta commit_to_activate_duration, 55 base::TimeDelta commit_to_activate_duration,
53 base::TimeDelta commit_to_activate_duration_estimate); 56 base::TimeDelta commit_to_activate_duration_estimate);
54 57
55 protected: 58 protected:
56 RenderingStatsInstrumentation(); 59 RenderingStatsInstrumentation();
57 60
58 private: 61 private:
59 RenderingStats impl_thread_rendering_stats_; 62 RenderingStats impl_thread_rendering_stats_;
60 RenderingStats impl_thread_rendering_stats_accu_; 63 RenderingStats impl_thread_rendering_stats_accu_;
61 64
62 bool record_rendering_stats_; 65 bool record_rendering_stats_;
63 66
64 base::Lock lock_; 67 base::Lock lock_;
65 68
66 DISALLOW_COPY_AND_ASSIGN(RenderingStatsInstrumentation); 69 DISALLOW_COPY_AND_ASSIGN(RenderingStatsInstrumentation);
67 }; 70 };
68 71
69 } // namespace cc 72 } // namespace cc
70 73
71 #endif // CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_ 74 #endif // CC_DEBUG_RENDERING_STATS_INSTRUMENTATION_H_
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats.h ('k') | cc/debug/rendering_stats_instrumentation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698