| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 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_H_ | 5 #ifndef CC_DEBUG_RENDERING_STATS_H_ |
| 6 #define CC_DEBUG_RENDERING_STATS_H_ | 6 #define CC_DEBUG_RENDERING_STATS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 int64 total_deferred_image_decode_count; | 29 int64 total_deferred_image_decode_count; |
| 30 int64 total_deferred_image_cache_hit_count; | 30 int64 total_deferred_image_cache_hit_count; |
| 31 int64 total_image_gathering_count; | 31 int64 total_image_gathering_count; |
| 32 base::TimeDelta total_deferred_image_decode_time; | 32 base::TimeDelta total_deferred_image_decode_time; |
| 33 base::TimeDelta total_image_gathering_time; | 33 base::TimeDelta total_image_gathering_time; |
| 34 // Note: when adding new members, please remember to update EnumerateFields | 34 // Note: when adding new members, please remember to update EnumerateFields |
| 35 // and Add in rendering_stats.cc. | 35 // and Add in rendering_stats.cc. |
| 36 | 36 |
| 37 RenderingStats(); | 37 RenderingStats(); |
| 38 | 38 |
| 39 // In conjunction with enumerateFields, this allows the embedder to | 39 // In conjunction with EnumerateFields, this allows the embedder to |
| 40 // enumerate the values in this structure without | 40 // enumerate the values in this structure without |
| 41 // having to embed references to its specific member variables. This | 41 // having to embed references to its specific member variables. This |
| 42 // simplifies the addition of new fields to this type. | 42 // simplifies the addition of new fields to this type. |
| 43 class Enumerator { | 43 class Enumerator { |
| 44 public: | 44 public: |
| 45 virtual void AddInt64(const char* name, int64 value) = 0; | 45 virtual void AddInt64(const char* name, int64 value) = 0; |
| 46 virtual void AddDouble(const char* name, double value) = 0; | 46 virtual void AddDouble(const char* name, double value) = 0; |
| 47 virtual void AddInt(const char* name, int value) = 0; | 47 virtual void AddInt(const char* name, int value) = 0; |
| 48 virtual void AddTimeDeltaInSecondsF(const char* name, | 48 virtual void AddTimeDeltaInSecondsF(const char* name, |
| 49 const base::TimeDelta& value) = 0; | 49 const base::TimeDelta& value) = 0; |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 virtual ~Enumerator() {} | 52 virtual ~Enumerator() {} |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 // Outputs the fields in this structure to the provided enumerator. | 55 // Outputs the fields in this structure to the provided enumerator. |
| 56 void EnumerateFields(Enumerator* enumerator) const; | 56 void EnumerateFields(Enumerator* enumerator) const; |
| 57 | 57 |
| 58 // Add fields of |other| to the fields in this structure. | 58 // Add fields of |other| to the fields in this structure. |
| 59 void Add(const RenderingStats& other); | 59 void Add(const RenderingStats& other); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace cc | 62 } // namespace cc |
| 63 | 63 |
| 64 #endif // CC_DEBUG_RENDERING_STATS_H_ | 64 #endif // CC_DEBUG_RENDERING_STATS_H_ |
| OLD | NEW |