summaryrefslogtreecommitdiffstats
path: root/cc/debug
diff options
context:
space:
mode:
Diffstat (limited to 'cc/debug')
-rw-r--r--cc/debug/rendering_stats.cc124
-rw-r--r--cc/debug/rendering_stats.h81
2 files changed, 102 insertions, 103 deletions
diff --git a/cc/debug/rendering_stats.cc b/cc/debug/rendering_stats.cc
index d0292c4..28e7089 100644
--- a/cc/debug/rendering_stats.cc
+++ b/cc/debug/rendering_stats.cc
@@ -7,74 +7,72 @@
namespace cc {
RenderingStats::RenderingStats()
- : animation_frame_count(0),
- screen_frame_count(0),
- dropped_frame_count(0),
- total_commit_count(0),
- total_pixels_painted(0),
- total_pixels_rasterized(0),
- num_impl_thread_scrolls(0),
- num_main_thread_scrolls(0),
- num_layers_drawn(0),
- num_missing_tiles(0),
- total_deferred_image_decode_count(0),
- total_deferred_image_cache_hit_count(0),
- total_image_gathering_count(0) {}
+ : numAnimationFrames(0),
+ numFramesSentToScreen(0),
+ droppedFrameCount(0),
+ totalCommitCount(0),
+ totalPixelsPainted(0),
+ totalPixelsRasterized(0),
+ numImplThreadScrolls(0),
+ numMainThreadScrolls(0),
+ numLayersDrawn(0),
+ numMissingTiles(0),
+ totalDeferredImageDecodeCount(0),
+ totalDeferredImageCacheHitCount(0),
+ totalImageGatheringCount(0) {
+}
void RenderingStats::EnumerateFields(Enumerator* enumerator) const {
- enumerator->AddInt64("animation_frame_count", animation_frame_count);
- enumerator->AddInt64("screen_frame_count", screen_frame_count);
- enumerator->AddInt64("dropped_frame_count", dropped_frame_count);
- enumerator->AddDouble("total_paint_timeInSeconds",
- total_paint_time.InSecondsF());
- enumerator->AddDouble("total_rasterize_timeInSeconds",
- total_rasterize_time.InSecondsF());
- enumerator->AddDouble(
- "total_rasterize_time_for_now_bins_on_pending_tree",
- total_rasterize_time_for_now_bins_on_pending_tree.InSecondsF());
- enumerator->AddDouble("total_commit_timeInSeconds",
- total_commit_time.InSecondsF());
- enumerator->AddInt64("total_commit_count", total_commit_count);
- enumerator->AddInt64("total_pixels_painted", total_pixels_painted);
- enumerator->AddInt64("total_pixels_rasterized", total_pixels_rasterized);
- enumerator->AddInt64("num_impl_thread_scrolls", num_impl_thread_scrolls);
- enumerator->AddInt64("num_main_thread_scrolls", num_main_thread_scrolls);
- enumerator->AddInt64("num_layers_drawn", num_layers_drawn);
- enumerator->AddInt64("num_missing_tiles", num_missing_tiles);
- enumerator->AddInt64("total_deferred_image_decode_count",
- total_deferred_image_decode_count);
- enumerator->AddInt64("total_deferred_image_cache_hit_count",
- total_deferred_image_cache_hit_count);
- enumerator->AddInt64("total_image_gathering_count",
- total_image_gathering_count);
- enumerator->AddDouble("total_deferred_image_decode_timeInSeconds",
- total_deferred_image_decode_time.InSecondsF());
- enumerator->AddDouble("total_image_gathering_timeInSeconds",
- total_image_gathering_time.InSecondsF());
+ enumerator->AddInt64("numAnimationFrames", numAnimationFrames);
+ enumerator->AddInt64("numFramesSentToScreen", numFramesSentToScreen);
+ enumerator->AddInt64("droppedFrameCount", droppedFrameCount);
+ enumerator->AddDouble("totalPaintTimeInSeconds",
+ totalPaintTime.InSecondsF());
+ enumerator->AddDouble("totalRasterizeTimeInSeconds",
+ totalRasterizeTime.InSecondsF());
+ enumerator->AddDouble("totalRasterizeTimeForNowBinsOnPendingTree",
+ totalRasterizeTimeForNowBinsOnPendingTree.InSecondsF());
+ enumerator->AddDouble("totalCommitTimeInSeconds",
+ totalCommitTime.InSecondsF());
+ enumerator->AddInt64("totalCommitCount", totalCommitCount);
+ enumerator->AddInt64("totalPixelsPainted", totalPixelsPainted);
+ enumerator->AddInt64("totalPixelsRasterized", totalPixelsRasterized);
+ enumerator->AddInt64("numImplThreadScrolls", numImplThreadScrolls);
+ enumerator->AddInt64("numMainThreadScrolls", numMainThreadScrolls);
+ enumerator->AddInt64("numLayersDrawn", numLayersDrawn);
+ enumerator->AddInt64("numMissingTiles", numMissingTiles);
+ enumerator->AddInt64("totalDeferredImageDecodeCount",
+ totalDeferredImageDecodeCount);
+ enumerator->AddInt64("totalDeferredImageCacheHitCount",
+ totalDeferredImageCacheHitCount);
+ enumerator->AddInt64("totalImageGatheringCount", totalImageGatheringCount);
+ enumerator->AddDouble("totalDeferredImageDecodeTimeInSeconds",
+ totalDeferredImageDecodeTime.InSecondsF());
+ enumerator->AddDouble("totalImageGatheringTimeInSeconds",
+ totalImageGatheringTime.InSecondsF());
}
void RenderingStats::Add(const RenderingStats& other) {
- animation_frame_count += other.animation_frame_count;
- screen_frame_count += other.screen_frame_count;
- dropped_frame_count += other.dropped_frame_count;
- total_paint_time += other.total_paint_time;
- total_rasterize_time += other.total_rasterize_time;
- total_rasterize_time_for_now_bins_on_pending_tree +=
- other.total_rasterize_time_for_now_bins_on_pending_tree;
- total_commit_time += other.total_commit_time;
- total_commit_count += other.total_commit_count;
- total_pixels_painted += other.total_pixels_painted;
- total_pixels_rasterized += other.total_pixels_rasterized;
- num_impl_thread_scrolls += other.num_impl_thread_scrolls;
- num_main_thread_scrolls += other.num_main_thread_scrolls;
- num_layers_drawn += other.num_layers_drawn;
- num_missing_tiles += other.num_missing_tiles;
- total_deferred_image_decode_count += other.total_deferred_image_decode_count;
- total_deferred_image_cache_hit_count +=
- other.total_deferred_image_cache_hit_count;
- total_image_gathering_count += other.total_image_gathering_count;
- total_deferred_image_decode_time += other.total_deferred_image_decode_time;
- total_image_gathering_time += other.total_image_gathering_time;
+ numAnimationFrames += other.numAnimationFrames;
+ numFramesSentToScreen += other.numFramesSentToScreen;
+ droppedFrameCount += other.droppedFrameCount;
+ totalPaintTime += other.totalPaintTime;
+ totalRasterizeTime += other.totalRasterizeTime;
+ totalRasterizeTimeForNowBinsOnPendingTree +=
+ other.totalRasterizeTimeForNowBinsOnPendingTree;
+ totalCommitTime += other.totalCommitTime;
+ totalCommitCount += other.totalCommitCount;
+ totalPixelsPainted += other.totalPixelsPainted;
+ totalPixelsRasterized += other.totalPixelsRasterized;
+ numImplThreadScrolls += other.numImplThreadScrolls;
+ numMainThreadScrolls += other.numMainThreadScrolls;
+ numLayersDrawn += other.numLayersDrawn;
+ numMissingTiles += other.numMissingTiles;
+ totalDeferredImageDecodeCount += other.totalDeferredImageDecodeCount;
+ totalDeferredImageCacheHitCount += other.totalDeferredImageCacheHitCount;
+ totalImageGatheringCount += other.totalImageGatheringCount;
+ totalDeferredImageDecodeTime += other.totalDeferredImageDecodeTime;
+ totalImageGatheringTime += other.totalImageGatheringTime;
}
} // namespace cc
diff --git a/cc/debug/rendering_stats.h b/cc/debug/rendering_stats.h
index 33ea2c6..799bd88 100644
--- a/cc/debug/rendering_stats.h
+++ b/cc/debug/rendering_stats.h
@@ -12,51 +12,52 @@
namespace cc {
struct CC_EXPORT RenderingStats {
- int64 animation_frame_count;
- int64 screen_frame_count;
- int64 dropped_frame_count;
- base::TimeDelta total_paint_time;
- base::TimeDelta total_rasterize_time;
- base::TimeDelta total_rasterize_time_for_now_bins_on_pending_tree;
- base::TimeDelta total_commit_time;
- int64 total_commit_count;
- int64 total_pixels_painted;
- int64 total_pixels_rasterized;
- int64 num_impl_thread_scrolls;
- int64 num_main_thread_scrolls;
- int64 num_layers_drawn;
- int64 num_missing_tiles;
- int64 total_deferred_image_decode_count;
- int64 total_deferred_image_cache_hit_count;
- int64 total_image_gathering_count;
- base::TimeDelta total_deferred_image_decode_time;
- base::TimeDelta total_image_gathering_time;
- // Note: when adding new members, please remember to update EnumerateFields
- // and Add in rendering_stats.cc.
+ // FIXME: Rename these to animationFrameCount and screenFrameCount, crbug.com/138641.
+ int64 numAnimationFrames;
+ int64 numFramesSentToScreen;
+ int64 droppedFrameCount;
+ base::TimeDelta totalPaintTime;
+ base::TimeDelta totalRasterizeTime;
+ base::TimeDelta totalRasterizeTimeForNowBinsOnPendingTree;
+ base::TimeDelta totalCommitTime;
+ int64 totalCommitCount;
+ int64 totalPixelsPainted;
+ int64 totalPixelsRasterized;
+ int64 numImplThreadScrolls;
+ int64 numMainThreadScrolls;
+ int64 numLayersDrawn;
+ int64 numMissingTiles;
+ int64 totalDeferredImageDecodeCount;
+ int64 totalDeferredImageCacheHitCount;
+ int64 totalImageGatheringCount;
+ base::TimeDelta totalDeferredImageDecodeTime;
+ base::TimeDelta totalImageGatheringTime;
+ // Note: when adding new members, please remember to update EnumerateFields
+ // and Add in rendering_stats.cc.
- RenderingStats();
+ RenderingStats();
- // In conjunction with enumerateFields, this allows the embedder to
- // enumerate the values in this structure without
- // having to embed references to its specific member variables. This
- // simplifies the addition of new fields to this type.
- class Enumerator {
- public:
- virtual void AddInt64(const char* name, int64 value) = 0;
- virtual void AddDouble(const char* name, double value) = 0;
- virtual void AddInt(const char* name, int value) = 0;
- virtual void AddTimeDeltaInSecondsF(const char* name,
- const base::TimeDelta& value) = 0;
+ // In conjunction with enumerateFields, this allows the embedder to
+ // enumerate the values in this structure without
+ // having to embed references to its specific member variables. This
+ // simplifies the addition of new fields to this type.
+ class Enumerator {
+ public:
+ virtual void AddInt64(const char* name, int64 value) = 0;
+ virtual void AddDouble(const char* name, double value) = 0;
+ virtual void AddInt(const char* name, int value) = 0;
+ virtual void AddTimeDeltaInSecondsF(const char* name,
+ const base::TimeDelta& value) = 0;
- protected:
- virtual ~Enumerator() {}
- };
+ protected:
+ virtual ~Enumerator() { }
+ };
- // Outputs the fields in this structure to the provided enumerator.
- void EnumerateFields(Enumerator* enumerator) const;
+ // Outputs the fields in this structure to the provided enumerator.
+ void EnumerateFields(Enumerator* enumerator) const;
- // Add fields of |other| to the fields in this structure.
- void Add(const RenderingStats& other);
+ // Add fields of |other| to the fields in this structure.
+ void Add(const RenderingStats& other);
};
} // namespace cc