Apply use_non_zero_size_for_client_side_stream_buffers on PowerVR SGX 540
[chromium-blink-merge.git] / cc / debug / rendering_stats.h
blob4256f3d0b39773cef67f0fa5ecddb7da7c65a315
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 <vector>
10 #include "base/basictypes.h"
11 #include "base/debug/trace_event_argument.h"
12 #include "base/time/time.h"
13 #include "base/values.h"
14 #include "cc/base/cc_export.h"
15 #include "cc/debug/traced_value.h"
17 namespace cc {
19 struct CC_EXPORT RenderingStats {
20 // Stores a sequence of TimeDelta objects.
21 class CC_EXPORT TimeDeltaList {
22 public:
23 TimeDeltaList();
24 ~TimeDeltaList();
26 void Append(base::TimeDelta value);
27 void AddToTracedValue(base::debug::TracedValue* list_value) const;
29 void Add(const TimeDeltaList& other);
31 base::TimeDelta GetLastTimeDelta() const;
33 private:
34 std::vector<base::TimeDelta> values;
37 RenderingStats();
38 ~RenderingStats();
40 // Note: when adding new members, please remember to update Add in
41 // rendering_stats.cc.
43 int64 frame_count;
44 int64 visible_content_area;
45 int64 approximated_visible_content_area;
47 TimeDeltaList draw_duration;
48 TimeDeltaList draw_duration_estimate;
49 TimeDeltaList begin_main_frame_to_commit_duration;
50 TimeDeltaList begin_main_frame_to_commit_duration_estimate;
51 TimeDeltaList commit_to_activate_duration;
52 TimeDeltaList commit_to_activate_duration_estimate;
54 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const;
55 void Add(const RenderingStats& other);
58 } // namespace cc
60 #endif // CC_DEBUG_RENDERING_STATS_H_