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

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

Issue 2225563002: Reland "Raster display item lists via a visual rect RTree." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 4 years, 4 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.h ('k') | cc/layers/empty_content_layer_client.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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // quantization when the layer is very small. 154 // quantization when the layer is very small.
155 LapTimer timer(kWarmupRuns, 155 LapTimer timer(kWarmupRuns,
156 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), 156 base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
157 kTimeCheckInterval); 157 kTimeCheckInterval);
158 158
159 do { 159 do {
160 display_list = painter->PaintContentsToDisplayList(painting_control); 160 display_list = painter->PaintContentsToDisplayList(painting_control);
161 if (display_list->ShouldBeAnalyzedForSolidColor()) { 161 if (display_list->ShouldBeAnalyzedForSolidColor()) {
162 gfx::Size layer_size = layer->paint_properties().bounds; 162 gfx::Size layer_size = layer->paint_properties().bounds;
163 skia::AnalysisCanvas canvas(layer_size.width(), layer_size.height()); 163 skia::AnalysisCanvas canvas(layer_size.width(), layer_size.height());
164 display_list->Raster(&canvas, nullptr, gfx::Rect(), 1.f); 164 display_list->Raster(&canvas, nullptr, gfx::Rect(layer_size), 1.f);
165 } 165 }
166 166
167 if (memory_used) { 167 if (memory_used) {
168 // Verify we are recording the same thing each time. 168 // Verify we are recording the same thing each time.
169 DCHECK_EQ(memory_used, display_list->ApproximateMemoryUsage()); 169 DCHECK_EQ(memory_used, display_list->ApproximateMemoryUsage());
170 } else { 170 } else {
171 memory_used = display_list->ApproximateMemoryUsage(); 171 memory_used = display_list->ApproximateMemoryUsage();
172 } 172 }
173 173
174 timer.NextLap(); 174 timer.NextLap();
(...skipping 14 matching lines...) Expand all
189 } 189 }
190 } 190 }
191 191
192 RasterizeAndRecordBenchmark::RecordResults::RecordResults() 192 RasterizeAndRecordBenchmark::RecordResults::RecordResults()
193 : pixels_recorded(0), bytes_used(0) { 193 : pixels_recorded(0), bytes_used(0) {
194 } 194 }
195 195
196 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {} 196 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {}
197 197
198 } // namespace cc 198 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark.h ('k') | cc/layers/empty_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698