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

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

Issue 1907053004: cc: Make CallFunctionForEveryLayer use LayerListIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: FindLayers should skip layers instead of returning when switching from call-function to iteration l… 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/invalidation_benchmark.cc ('k') | cc/debug/rasterize_and_record_benchmark_impl.cc » ('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.h" 5 #include "cc/debug/rasterize_and_record_benchmark.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 settings->GetInteger("record_repeat_count", &record_repeat_count_); 65 settings->GetInteger("record_repeat_count", &record_repeat_count_);
66 } 66 }
67 67
68 RasterizeAndRecordBenchmark::~RasterizeAndRecordBenchmark() { 68 RasterizeAndRecordBenchmark::~RasterizeAndRecordBenchmark() {
69 weak_ptr_factory_.InvalidateWeakPtrs(); 69 weak_ptr_factory_.InvalidateWeakPtrs();
70 } 70 }
71 71
72 void RasterizeAndRecordBenchmark::DidUpdateLayers(LayerTreeHost* host) { 72 void RasterizeAndRecordBenchmark::DidUpdateLayers(LayerTreeHost* host) {
73 host_ = host; 73 host_ = host;
74 LayerTreeHostCommon::CallFunctionForEveryLayer( 74 LayerTreeHostCommon::CallFunctionForEveryLayer(
75 host, [this](Layer* layer) { layer->RunMicroBenchmark(this); }, 75 host, [this](Layer* layer) { layer->RunMicroBenchmark(this); });
76 CallFunctionLayerType::ALL_LAYERS);
77 76
78 DCHECK(!results_.get()); 77 DCHECK(!results_.get());
79 results_ = base::WrapUnique(new base::DictionaryValue); 78 results_ = base::WrapUnique(new base::DictionaryValue);
80 results_->SetInteger("pixels_recorded", record_results_.pixels_recorded); 79 results_->SetInteger("pixels_recorded", record_results_.pixels_recorded);
81 results_->SetInteger("picture_memory_usage", 80 results_->SetInteger("picture_memory_usage",
82 static_cast<int>(record_results_.bytes_used)); 81 static_cast<int>(record_results_.bytes_used));
83 82
84 for (int i = 0; i < RecordingSource::RECORDING_MODE_COUNT; i++) { 83 for (int i = 0; i < RecordingSource::RECORDING_MODE_COUNT; i++) {
85 std::string name = base::StringPrintf("record_time%s_ms", kModeSuffixes[i]); 84 std::string name = base::StringPrintf("record_time%s_ms", kModeSuffixes[i]);
86 results_->SetDouble(name, 85 results_->SetDouble(name,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 189 }
191 } 190 }
192 191
193 RasterizeAndRecordBenchmark::RecordResults::RecordResults() 192 RasterizeAndRecordBenchmark::RecordResults::RecordResults()
194 : pixels_recorded(0), bytes_used(0) { 193 : pixels_recorded(0), bytes_used(0) {
195 } 194 }
196 195
197 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {} 196 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {}
198 197
199 } // namespace cc 198 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/invalidation_benchmark.cc ('k') | cc/debug/rasterize_and_record_benchmark_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698