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

Unified Diff: cc/playback/display_list_raster_source.cc

Issue 1531013004: cc: Do solid color analysis before scheduling tiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test updated. 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 | « cc/playback/display_list_raster_source.h ('k') | cc/playback/display_list_raster_source_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/display_list_raster_source.cc
diff --git a/cc/playback/display_list_raster_source.cc b/cc/playback/display_list_raster_source.cc
index 4fc0f63ed24abd0f351831aa6cfc67b13bcc0d35..fa927524f8f2a7bf50847f1f3d7d997c5889afc5 100644
--- a/cc/playback/display_list_raster_source.cc
+++ b/cc/playback/display_list_raster_source.cc
@@ -219,11 +219,10 @@ size_t DisplayListRasterSource::GetPictureMemoryUsage() const {
painter_reported_memory_usage_;
}
-void DisplayListRasterSource::PerformSolidColorAnalysis(
+bool DisplayListRasterSource::PerformSolidColorAnalysis(
const gfx::Rect& content_rect,
float contents_scale,
- DisplayListRasterSource::SolidColorAnalysis* analysis) const {
- DCHECK(analysis);
+ SkColor* color) const {
TRACE_EVENT0("cc", "DisplayListRasterSource::PerformSolidColorAnalysis");
gfx::Rect layer_rect =
@@ -232,7 +231,7 @@ void DisplayListRasterSource::PerformSolidColorAnalysis(
layer_rect.Intersect(gfx::Rect(size_));
skia::AnalysisCanvas canvas(layer_rect.width(), layer_rect.height());
RasterForAnalysis(&canvas, layer_rect, 1.0f);
- analysis->is_solid_color = canvas.GetColorIfSolid(&analysis->solid_color);
+ return canvas.GetColorIfSolid(color);
}
void DisplayListRasterSource::GetDiscardableImagesInRect(
« no previous file with comments | « cc/playback/display_list_raster_source.h ('k') | cc/playback/display_list_raster_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698