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

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: 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 side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698