| Index: cc/debug/rendering_stats_instrumentation.cc
|
| diff --git a/cc/debug/rendering_stats_instrumentation.cc b/cc/debug/rendering_stats_instrumentation.cc
|
| index f19daaef38019de8a140a0fbd102c3a7c24b63ae..42db4a969ce7fa08ce801b49178e35b5ac70d648 100644
|
| --- a/cc/debug/rendering_stats_instrumentation.cc
|
| +++ b/cc/debug/rendering_stats_instrumentation.cc
|
| @@ -4,23 +4,32 @@
|
|
|
| #include "cc/debug/rendering_stats_instrumentation.h"
|
|
|
| +#include <stdio.h>
|
| +
|
| namespace cc {
|
|
|
| // static
|
| scoped_ptr<RenderingStatsInstrumentation>
|
| RenderingStatsInstrumentation::Create() {
|
| + printf("RenderingStatsInstrumentation::Create\n");
|
| return make_scoped_ptr(new RenderingStatsInstrumentation());
|
| }
|
|
|
| RenderingStatsInstrumentation::RenderingStatsInstrumentation()
|
| : record_rendering_stats_(false) {
|
| + printf("RenderingStatsInstrumentation\n");
|
| }
|
|
|
| -RenderingStatsInstrumentation::~RenderingStatsInstrumentation() {}
|
| +RenderingStatsInstrumentation::~RenderingStatsInstrumentation() {
|
| + printf("~RenderingStatsInstrumentation\n");
|
| +}
|
|
|
| RenderingStats RenderingStatsInstrumentation::GetRenderingStats() {
|
| + printf("RenderingStatsInstrumentation::GetRenderingStats\n");
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| return rendering_stats_;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| base::TimeTicks RenderingStatsInstrumentation::StartRecording() const {
|
| @@ -37,62 +46,75 @@ base::TimeDelta RenderingStatsInstrumentation::EndRecording(
|
| }
|
|
|
| void RenderingStatsInstrumentation::AddStats(const RenderingStats& other) {
|
| + printf("RenderingStatsInstrumentation::AddStats\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.Add(other);
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::IncrementAnimationFrameCount() {
|
| + printf("RenderingStatsInstrumentation::IncrementAnimationFrameCount\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.animation_frame_count++;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::SetScreenFrameCount(int64 count) {
|
| + printf("RenderingStatsInstrumentation::SetScreenFrameCount\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.screen_frame_count = count;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::SetDroppedFrameCount(int64 count) {
|
| + printf("RenderingStatsInstrumentation::SetDroppedFrameCount\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.dropped_frame_count = count;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::AddCommit(base::TimeDelta duration) {
|
| + printf("RenderingStatsInstrumentation::AddCommit\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.total_commit_time += duration;
|
| rendering_stats_.total_commit_count++;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::AddPaint(base::TimeDelta duration,
|
| int64 pixels) {
|
| + printf("RenderingStatsInstrumentation::AddPaint\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.total_paint_time += duration;
|
| rendering_stats_.total_pixels_painted += pixels;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::AddRaster(base::TimeDelta duration,
|
| int64 pixels,
|
| bool is_in_pending_tree_now_bin) {
|
| + printf("RenderingStatsInstrumentation::AddRaster\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.total_rasterize_time += duration;
|
| rendering_stats_.total_pixels_rasterized += pixels;
|
| @@ -101,66 +123,83 @@ void RenderingStatsInstrumentation::AddRaster(base::TimeDelta duration,
|
| rendering_stats_.total_rasterize_time_for_now_bins_on_pending_tree +=
|
| duration;
|
| }
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::IncrementImplThreadScrolls() {
|
| + printf("RenderingStatsInstrumentation::IncrementImplThreadScrolls\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.num_impl_thread_scrolls++;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::IncrementMainThreadScrolls() {
|
| + printf("RenderingStatsInstrumentation::IncrementMainThreadScrolls\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.num_main_thread_scrolls++;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::AddLayersDrawn(int64 amount) {
|
| + printf("RenderingStatsInstrumentation::AddLayersDrawn\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.num_layers_drawn += amount;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::AddMissingTiles(int64 amount) {
|
| + printf("RenderingStatsInstrumentation::AddMissingTiles\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.num_missing_tiles += amount;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::AddDeferredImageDecode(
|
| base::TimeDelta duration) {
|
| + printf("RenderingStatsInstrumentation::AddDeferredImageDecode\n");
|
| if (!record_rendering_stats_)
|
| return;
|
| -
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.total_deferred_image_decode_time += duration;
|
| rendering_stats_.total_deferred_image_decode_count++;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::AddImageGathering(
|
| base::TimeDelta duration) {
|
| + printf("RenderingStatsInstrumentation::AddImageGathering\n");
|
| if (!record_rendering_stats_)
|
| return;
|
|
|
| +printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.total_image_gathering_time += duration;
|
| rendering_stats_.total_image_gathering_count++;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| void RenderingStatsInstrumentation::IncrementDeferredImageCacheHitCount() {
|
| + printf("RenderingStatsInstrumentation::IncrementDeferredImageCacheHitCount\n");
|
| if (!record_rendering_stats_)
|
| return;
|
|
|
| + printf("create autolock\n");
|
| base::AutoLock scoped_lock(lock_);
|
| rendering_stats_.total_deferred_image_cache_hit_count++;
|
| + printf("destroy autolock\n");
|
| }
|
|
|
| } // namespace cc
|
|
|