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

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

Issue 63443003: cc: Combine analysis and raster (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove analysis time from rendering stats Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « cc/debug/rendering_stats.h ('k') | cc/debug/rendering_stats_instrumentation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/values.h" 5 #include "base/values.h"
6 #include "cc/debug/rendering_stats.h" 6 #include "cc/debug/rendering_stats.h"
7 7
8 namespace cc { 8 namespace cc {
9 9
10 MainThreadRenderingStats::MainThreadRenderingStats() 10 MainThreadRenderingStats::MainThreadRenderingStats()
(...skipping 29 matching lines...) Expand all
40 scoped_ptr<base::DictionaryValue> record_data(new base::DictionaryValue()); 40 scoped_ptr<base::DictionaryValue> record_data(new base::DictionaryValue());
41 record_data->SetInteger("frame_count", frame_count); 41 record_data->SetInteger("frame_count", frame_count);
42 record_data->SetDouble("rasterize_time", rasterize_time.InSecondsF()); 42 record_data->SetDouble("rasterize_time", rasterize_time.InSecondsF());
43 record_data->SetInteger("rasterized_pixel_count", rasterized_pixel_count); 43 record_data->SetInteger("rasterized_pixel_count", rasterized_pixel_count);
44 return TracedValue::FromValue(record_data.release()); 44 return TracedValue::FromValue(record_data.release());
45 } 45 }
46 46
47 void ImplThreadRenderingStats::Add(const ImplThreadRenderingStats& other) { 47 void ImplThreadRenderingStats::Add(const ImplThreadRenderingStats& other) {
48 frame_count += other.frame_count; 48 frame_count += other.frame_count;
49 rasterize_time += other.rasterize_time; 49 rasterize_time += other.rasterize_time;
50 analysis_time += other.analysis_time;
51 rasterized_pixel_count += other.rasterized_pixel_count; 50 rasterized_pixel_count += other.rasterized_pixel_count;
52 } 51 }
53 52
54 void RenderingStats::EnumerateFields(Enumerator* enumerator) const { 53 void RenderingStats::EnumerateFields(Enumerator* enumerator) const {
55 enumerator->AddInt64("frameCount", 54 enumerator->AddInt64("frameCount",
56 main_stats.frame_count + impl_stats.frame_count); 55 main_stats.frame_count + impl_stats.frame_count);
57 enumerator->AddDouble("paintTime", 56 enumerator->AddDouble("paintTime",
58 main_stats.paint_time.InSecondsF()); 57 main_stats.paint_time.InSecondsF());
59 enumerator->AddInt64("paintedPixelCount", 58 enumerator->AddInt64("paintedPixelCount",
60 main_stats.painted_pixel_count); 59 main_stats.painted_pixel_count);
61 enumerator->AddDouble("recordTime", 60 enumerator->AddDouble("recordTime",
62 main_stats.record_time.InSecondsF()); 61 main_stats.record_time.InSecondsF());
63 enumerator->AddInt64("recordedPixelCount", 62 enumerator->AddInt64("recordedPixelCount",
64 main_stats.recorded_pixel_count); 63 main_stats.recorded_pixel_count);
65 // Combine rasterization and analysis time as a precursor to combining
66 // them in the same step internally.
67 enumerator->AddDouble("rasterizeTime", 64 enumerator->AddDouble("rasterizeTime",
68 impl_stats.rasterize_time.InSecondsF() + 65 impl_stats.rasterize_time.InSecondsF());
69 impl_stats.analysis_time.InSecondsF());
70 enumerator->AddInt64("rasterizedPixelCount", 66 enumerator->AddInt64("rasterizedPixelCount",
71 impl_stats.rasterized_pixel_count); 67 impl_stats.rasterized_pixel_count);
72 } 68 }
73 69
74 void RenderingStats::Add(const RenderingStats& other) { 70 void RenderingStats::Add(const RenderingStats& other) {
75 main_stats.Add(other.main_stats); 71 main_stats.Add(other.main_stats);
76 impl_stats.Add(other.impl_stats); 72 impl_stats.Add(other.impl_stats);
77 } 73 }
78 74
79 } // namespace cc 75 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats.h ('k') | cc/debug/rendering_stats_instrumentation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698