Add git cl format presubmit warning for extension and apps.
[chromium-blink-merge.git] / cc / debug / rendering_stats.h
blob72262c8b6ad8906d1760285f5706ef8c924855bd
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_DEBUG_RENDERING_STATS_H_
6 #define CC_DEBUG_RENDERING_STATS_H_
8 #include "base/basictypes.h"
9 #include "base/time/time.h"
10 #include "cc/base/cc_export.h"
11 #include "cc/debug/traced_value.h"
13 namespace cc {
15 struct CC_EXPORT MainThreadRenderingStats {
16 // Note: when adding new members, please remember to update EnumerateFields
17 // and Add in rendering_stats.cc.
19 int64 frame_count;
20 base::TimeDelta paint_time;
21 int64 painted_pixel_count;
22 base::TimeDelta record_time;
23 int64 recorded_pixel_count;
25 MainThreadRenderingStats();
26 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const;
27 void Add(const MainThreadRenderingStats& other);
30 struct CC_EXPORT ImplThreadRenderingStats {
31 // Note: when adding new members, please remember to update EnumerateFields
32 // and Add in rendering_stats.cc.
34 int64 frame_count;
35 base::TimeDelta rasterize_time;
36 base::TimeDelta analysis_time;
37 int64 rasterized_pixel_count;
39 ImplThreadRenderingStats();
40 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const;
41 void Add(const ImplThreadRenderingStats& other);
44 struct CC_EXPORT RenderingStats {
45 MainThreadRenderingStats main_stats;
46 ImplThreadRenderingStats impl_stats;
48 // Add fields of |other| to the fields in this structure.
49 void Add(const RenderingStats& other);
52 } // namespace cc
54 #endif // CC_DEBUG_RENDERING_STATS_H_