Chromium Code Reviews| 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 cc4f7a7807d4b95b21a292c48d7440b560fbc222..a5000698e1475d7924559e0c41ebee367cdcda72 100644 |
| --- a/cc/playback/display_list_raster_source.cc |
| +++ b/cc/playback/display_list_raster_source.cc |
| @@ -217,6 +217,20 @@ size_t DisplayListRasterSource::GetPictureMemoryUsage() const { |
| painter_reported_memory_usage_; |
| } |
| +bool DisplayListRasterSource::IsSolidColorTile(gfx::Rect content_rect, |
|
vmpstr
2015/12/17 18:55:47
Can you use PerformSolidColorAnalysis instead? Tha
sohanjg
2015/12/18 12:50:00
Yes, i thought we would remove PerformSolidColorAn
vmpstr
2015/12/18 19:03:06
I don't a rename, it's just this is the patch that
sohanjg
2015/12/29 14:29:47
Acknowledged.
|
| + float scale, |
| + SkColor* color) { |
| + DCHECK(display_list_); |
| + |
| + if (!display_list_->ShouldBeAnalyzedForSolidColor()) { |
| + return false; |
| + } |
| + |
| + skia::AnalysisCanvas canvas(content_rect.width(), content_rect.height()); |
| + RasterForAnalysis(&canvas, content_rect, scale); |
| + return canvas.GetColorIfSolid(color); |
| +} |
| + |
| void DisplayListRasterSource::PerformSolidColorAnalysis( |
| const gfx::Rect& content_rect, |
| float contents_scale, |