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

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

Issue 1489713004: Remove the clip parameter from ContentLayerClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clipremoval
Patch Set: Created 5 years 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_content_layer_impl.cc ('k') | cc/layers/content_layer_client.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.h" 5 #include "cc/debug/rasterize_and_record_benchmark.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 scoped_refptr<DisplayItemList> display_list; 151 scoped_refptr<DisplayItemList> display_list;
152 for (int i = 0; i < record_repeat_count_; ++i) { 152 for (int i = 0; i < record_repeat_count_; ++i) {
153 // Run for a minimum amount of time to avoid problems with timer 153 // Run for a minimum amount of time to avoid problems with timer
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(visible_layer_rect, 160 display_list = painter->PaintContentsToDisplayList(painting_control);
161 painting_control);
162 if (display_list->ShouldBeAnalyzedForSolidColor()) { 161 if (display_list->ShouldBeAnalyzedForSolidColor()) {
163 gfx::Size layer_size = layer->paint_properties().bounds; 162 gfx::Size layer_size = layer->paint_properties().bounds;
164 skia::AnalysisCanvas canvas(layer_size.width(), layer_size.height()); 163 skia::AnalysisCanvas canvas(layer_size.width(), layer_size.height());
165 display_list->Raster(&canvas, nullptr, gfx::Rect(), 1.f); 164 display_list->Raster(&canvas, nullptr, gfx::Rect(), 1.f);
166 } 165 }
167 166
168 if (memory_used) { 167 if (memory_used) {
169 // Verify we are recording the same thing each time. 168 // Verify we are recording the same thing each time.
170 DCHECK_EQ(memory_used, display_list->ApproximateMemoryUsage()); 169 DCHECK_EQ(memory_used, display_list->ApproximateMemoryUsage());
171 } else { 170 } else {
(...skipping 18 matching lines...) Expand all
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/blink/web_content_layer_impl.cc ('k') | cc/layers/content_layer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698