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

Unified Diff: cc/debug/rasterize_and_record_benchmark_impl.cc

Issue 1531013004: cc: Do solid color analysis before scheduling tiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/playback/display_list_raster_source.h » ('j') | cc/playback/display_list_raster_source.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/rasterize_and_record_benchmark_impl.cc
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.cc b/cc/debug/rasterize_and_record_benchmark_impl.cc
index 2d649cc12a894934ba88eecf0311a0bb7f9dbe05..2e2bf2161f09e40660be3a1c8cd466d837e76d53 100644
--- a/cc/debug/rasterize_and_record_benchmark_impl.cc
+++ b/cc/debug/rasterize_and_record_benchmark_impl.cc
@@ -42,20 +42,19 @@ void RunBenchmark(DisplayListRasterSource* raster_source,
LapTimer timer(kWarmupRuns,
base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
kTimeCheckInterval);
+ SkColor color = SK_ColorTRANSPARENT;
+ *is_solid_color = raster_source->PerformSolidColorAnalysis(
+ content_rect, contents_scale, &color);
+
do {
SkBitmap bitmap;
bitmap.allocPixels(SkImageInfo::MakeN32Premul(content_rect.width(),
content_rect.height()));
SkCanvas canvas(bitmap);
- DisplayListRasterSource::SolidColorAnalysis analysis;
- raster_source->PerformSolidColorAnalysis(content_rect, contents_scale,
- &analysis);
raster_source->PlaybackToCanvas(&canvas, content_rect, content_rect,
contents_scale);
- *is_solid_color = analysis.is_solid_color;
-
timer.NextLap();
} while (!timer.HasTimeLimitExpired());
base::TimeDelta duration =
« no previous file with comments | « no previous file | cc/playback/display_list_raster_source.h » ('j') | cc/playback/display_list_raster_source.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698