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

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

Issue 1864183002: cc: Main thread skip single layers instead of subtrees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Format the comments Created 4 years, 8 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
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark.cc ('k') | cc/layers/layer_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/rasterize_and_record_benchmark_impl.h" 5 #include "cc/debug/rasterize_and_record_benchmark_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 if (settings->HasKey("rasterize_repeat_count")) 120 if (settings->HasKey("rasterize_repeat_count"))
121 settings->GetInteger("rasterize_repeat_count", &rasterize_repeat_count_); 121 settings->GetInteger("rasterize_repeat_count", &rasterize_repeat_count_);
122 } 122 }
123 123
124 RasterizeAndRecordBenchmarkImpl::~RasterizeAndRecordBenchmarkImpl() {} 124 RasterizeAndRecordBenchmarkImpl::~RasterizeAndRecordBenchmarkImpl() {}
125 125
126 void RasterizeAndRecordBenchmarkImpl::DidCompleteCommit( 126 void RasterizeAndRecordBenchmarkImpl::DidCompleteCommit(
127 LayerTreeHostImpl* host) { 127 LayerTreeHostImpl* host) {
128 LayerTreeHostCommon::CallFunctionForEveryLayer( 128 LayerTreeHostCommon::CallFunctionForEveryLayer(
129 host->active_tree(), [this](LayerImpl* layer) { 129 host->active_tree(),
130 [this](LayerImpl* layer) {
130 rasterize_results_.total_layers++; 131 rasterize_results_.total_layers++;
131 layer->RunMicroBenchmark(this); 132 layer->RunMicroBenchmark(this);
132 }); 133 },
134 CallFunctionLayerType::ALL_LAYERS);
133 135
134 scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue()); 136 scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
135 result->SetDouble("rasterize_time_ms", 137 result->SetDouble("rasterize_time_ms",
136 rasterize_results_.total_best_time.InMillisecondsF()); 138 rasterize_results_.total_best_time.InMillisecondsF());
137 result->SetDouble("total_pictures_in_pile_size", 139 result->SetDouble("total_pictures_in_pile_size",
138 static_cast<int>(rasterize_results_.total_memory_usage)); 140 static_cast<int>(rasterize_results_.total_memory_usage));
139 result->SetInteger("pixels_rasterized", rasterize_results_.pixels_rasterized); 141 result->SetInteger("pixels_rasterized", rasterize_results_.pixels_rasterized);
140 result->SetInteger("pixels_rasterized_with_non_solid_color", 142 result->SetInteger("pixels_rasterized_with_non_solid_color",
141 rasterize_results_.pixels_rasterized_with_non_solid_color); 143 rasterize_results_.pixels_rasterized_with_non_solid_color);
142 result->SetInteger("pixels_rasterized_as_opaque", 144 result->SetInteger("pixels_rasterized_as_opaque",
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 total_memory_usage(0), 218 total_memory_usage(0),
217 total_layers(0), 219 total_layers(0),
218 total_picture_layers(0), 220 total_picture_layers(0),
219 total_picture_layers_with_no_content(0), 221 total_picture_layers_with_no_content(0),
220 total_picture_layers_off_screen(0) { 222 total_picture_layers_off_screen(0) {
221 } 223 }
222 224
223 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} 225 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {}
224 226
225 } // namespace cc 227 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698