Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: cc/debug/rendering_stats.cc

Issue 12780025: cc: Chromify rendering_stats (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "cc/debug/rendering_stats.h" 5 #include "cc/debug/rendering_stats.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 RenderingStats::RenderingStats() 9 RenderingStats::RenderingStats()
10 : numAnimationFrames(0), 10 : num_animation_frames(0),
11 numFramesSentToScreen(0), 11 num_frames_sent_to_screen(0),
12 droppedFrameCount(0), 12 dropped_frame_count(0),
13 totalCommitCount(0), 13 total_commit_count(0),
14 totalPixelsPainted(0), 14 total_pixels_painted(0),
15 totalPixelsRasterized(0), 15 total_pixels_rasterized(0),
16 numImplThreadScrolls(0), 16 num_impl_thread_scrolls(0),
17 numMainThreadScrolls(0), 17 num_main_thread_scrolls(0),
18 numLayersDrawn(0), 18 num_layers_drawn(0),
19 numMissingTiles(0), 19 num_missing_tiles(0),
20 totalDeferredImageDecodeCount(0), 20 total_deferred_image_decode_count(0),
21 totalDeferredImageCacheHitCount(0), 21 total_deferred_image_cache_hit_count(0),
22 totalImageGatheringCount(0) { 22 total_image_gathering_count(0) {}
23 }
24 23
25 void RenderingStats::EnumerateFields(Enumerator* enumerator) const { 24 void RenderingStats::EnumerateFields(Enumerator* enumerator) const {
26 enumerator->AddInt64("numAnimationFrames", numAnimationFrames); 25 enumerator->AddInt64("num_animation_frames", num_animation_frames);
27 enumerator->AddInt64("numFramesSentToScreen", numFramesSentToScreen); 26 enumerator->AddInt64("num_frames_sent_to_screen", num_frames_sent_to_screen);
28 enumerator->AddInt64("droppedFrameCount", droppedFrameCount); 27 enumerator->AddInt64("dropped_frame_count", dropped_frame_count);
29 enumerator->AddDouble("totalPaintTimeInSeconds", 28 enumerator->AddDouble("total_paint_timeInSeconds",
30 totalPaintTime.InSecondsF()); 29 total_paint_time.InSecondsF());
31 enumerator->AddDouble("totalRasterizeTimeInSeconds", 30 enumerator->AddDouble("total_rasterize_timeInSeconds",
32 totalRasterizeTime.InSecondsF()); 31 total_rasterize_time.InSecondsF());
33 enumerator->AddDouble("totalRasterizeTimeForNowBinsOnPendingTree", 32 enumerator->AddDouble(
34 totalRasterizeTimeForNowBinsOnPendingTree.InSecondsF()); 33 "total_rasterize_time_for_now_bins_on_pending_tree",
35 enumerator->AddDouble("totalCommitTimeInSeconds", 34 total_rasterize_time_for_now_bins_on_pending_tree.InSecondsF());
36 totalCommitTime.InSecondsF()); 35 enumerator->AddDouble("total_commit_timeInSeconds",
37 enumerator->AddInt64("totalCommitCount", totalCommitCount); 36 total_commit_time.InSecondsF());
38 enumerator->AddInt64("totalPixelsPainted", totalPixelsPainted); 37 enumerator->AddInt64("total_commit_count", total_commit_count);
39 enumerator->AddInt64("totalPixelsRasterized", totalPixelsRasterized); 38 enumerator->AddInt64("total_pixels_painted", total_pixels_painted);
40 enumerator->AddInt64("numImplThreadScrolls", numImplThreadScrolls); 39 enumerator->AddInt64("total_pixels_rasterized", total_pixels_rasterized);
41 enumerator->AddInt64("numMainThreadScrolls", numMainThreadScrolls); 40 enumerator->AddInt64("num_impl_thread_scrolls", num_impl_thread_scrolls);
42 enumerator->AddInt64("numLayersDrawn", numLayersDrawn); 41 enumerator->AddInt64("num_main_thread_scrolls", num_main_thread_scrolls);
43 enumerator->AddInt64("numMissingTiles", numMissingTiles); 42 enumerator->AddInt64("num_layers_drawn", num_layers_drawn);
44 enumerator->AddInt64("totalDeferredImageDecodeCount", 43 enumerator->AddInt64("num_missing_tiles", num_missing_tiles);
45 totalDeferredImageDecodeCount); 44 enumerator->AddInt64("total_deferred_image_decode_count",
46 enumerator->AddInt64("totalDeferredImageCacheHitCount", 45 total_deferred_image_decode_count);
47 totalDeferredImageCacheHitCount); 46 enumerator->AddInt64("total_deferred_image_cache_hit_count",
48 enumerator->AddInt64("totalImageGatheringCount", totalImageGatheringCount); 47 total_deferred_image_cache_hit_count);
49 enumerator->AddDouble("totalDeferredImageDecodeTimeInSeconds", 48 enumerator->AddInt64("total_image_gathering_count",
50 totalDeferredImageDecodeTime.InSecondsF()); 49 total_image_gathering_count);
51 enumerator->AddDouble("totalImageGatheringTimeInSeconds", 50 enumerator->AddDouble("total_deferred_image_decode_timeInSeconds",
52 totalImageGatheringTime.InSecondsF()); 51 total_deferred_image_decode_time.InSecondsF());
52 enumerator->AddDouble("total_image_gathering_timeInSeconds",
53 total_image_gathering_time.InSecondsF());
53 } 54 }
54 55
55 void RenderingStats::Add(const RenderingStats& other) { 56 void RenderingStats::Add(const RenderingStats& other) {
56 numAnimationFrames += other.numAnimationFrames; 57 num_animation_frames += other.num_animation_frames;
57 numFramesSentToScreen += other.numFramesSentToScreen; 58 num_frames_sent_to_screen += other.num_frames_sent_to_screen;
58 droppedFrameCount += other.droppedFrameCount; 59 dropped_frame_count += other.dropped_frame_count;
59 totalPaintTime += other.totalPaintTime; 60 total_paint_time += other.total_paint_time;
60 totalRasterizeTime += other.totalRasterizeTime; 61 total_rasterize_time += other.total_rasterize_time;
61 totalRasterizeTimeForNowBinsOnPendingTree += 62 total_rasterize_time_for_now_bins_on_pending_tree +=
62 other.totalRasterizeTimeForNowBinsOnPendingTree; 63 other.total_rasterize_time_for_now_bins_on_pending_tree;
63 totalCommitTime += other.totalCommitTime; 64 total_commit_time += other.total_commit_time;
64 totalCommitCount += other.totalCommitCount; 65 total_commit_count += other.total_commit_count;
65 totalPixelsPainted += other.totalPixelsPainted; 66 total_pixels_painted += other.total_pixels_painted;
66 totalPixelsRasterized += other.totalPixelsRasterized; 67 total_pixels_rasterized += other.total_pixels_rasterized;
67 numImplThreadScrolls += other.numImplThreadScrolls; 68 num_impl_thread_scrolls += other.num_impl_thread_scrolls;
68 numMainThreadScrolls += other.numMainThreadScrolls; 69 num_main_thread_scrolls += other.num_main_thread_scrolls;
69 numLayersDrawn += other.numLayersDrawn; 70 num_layers_drawn += other.num_layers_drawn;
70 numMissingTiles += other.numMissingTiles; 71 num_missing_tiles += other.num_missing_tiles;
71 totalDeferredImageDecodeCount += other.totalDeferredImageDecodeCount; 72 total_deferred_image_decode_count += other.total_deferred_image_decode_count;
72 totalDeferredImageCacheHitCount += other.totalDeferredImageCacheHitCount; 73 total_deferred_image_cache_hit_count +=
73 totalImageGatheringCount += other.totalImageGatheringCount; 74 other.total_deferred_image_cache_hit_count;
74 totalDeferredImageDecodeTime += other.totalDeferredImageDecodeTime; 75 total_image_gathering_count += other.total_image_gathering_count;
75 totalImageGatheringTime += other.totalImageGatheringTime; 76 total_deferred_image_decode_time += other.total_deferred_image_decode_time;
77 total_image_gathering_time += other.total_image_gathering_time;
76 } 78 }
77 79
78 } // namespace cc 80 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698