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

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

Issue 1835843002: WIP: Fix foreignObject cullrect Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « cc/blink/web_display_item_list_impl.cc ('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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // quantization when the layer is very small. 159 // quantization when the layer is very small.
160 LapTimer timer(kWarmupRuns, 160 LapTimer timer(kWarmupRuns,
161 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), 161 base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
162 kTimeCheckInterval); 162 kTimeCheckInterval);
163 163
164 do { 164 do {
165 display_list = painter->PaintContentsToDisplayList(painting_control); 165 display_list = painter->PaintContentsToDisplayList(painting_control);
166 if (display_list->ShouldBeAnalyzedForSolidColor()) { 166 if (display_list->ShouldBeAnalyzedForSolidColor()) {
167 gfx::Size layer_size = layer->paint_properties().bounds; 167 gfx::Size layer_size = layer->paint_properties().bounds;
168 skia::AnalysisCanvas canvas(layer_size.width(), layer_size.height()); 168 skia::AnalysisCanvas canvas(layer_size.width(), layer_size.height());
169 display_list->Raster(&canvas, nullptr, gfx::Rect(), 1.f); 169 display_list->Raster(&canvas, nullptr, visible_layer_rect, 1.f);
170 } 170 }
171 171
172 if (memory_used) { 172 if (memory_used) {
173 // Verify we are recording the same thing each time. 173 // Verify we are recording the same thing each time.
174 DCHECK_EQ(memory_used, display_list->ApproximateMemoryUsage()); 174 DCHECK_EQ(memory_used, display_list->ApproximateMemoryUsage());
175 } else { 175 } else {
176 memory_used = display_list->ApproximateMemoryUsage(); 176 memory_used = display_list->ApproximateMemoryUsage();
177 } 177 }
178 178
179 timer.NextLap(); 179 timer.NextLap();
(...skipping 14 matching lines...) Expand all
194 } 194 }
195 } 195 }
196 196
197 RasterizeAndRecordBenchmark::RecordResults::RecordResults() 197 RasterizeAndRecordBenchmark::RecordResults::RecordResults()
198 : pixels_recorded(0), bytes_used(0) { 198 : pixels_recorded(0), bytes_used(0) {
199 } 199 }
200 200
201 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {} 201 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {}
202 202
203 } // namespace cc 203 } // namespace cc
OLDNEW
« no previous file with comments | « cc/blink/web_display_item_list_impl.cc ('k') | cc/layers/empty_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698