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

Unified Diff: cc/resources/picture_pile_impl.cc

Issue 213093003: cc: Skip analysis for narrow layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 6 years, 9 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/resources/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile_impl.cc
diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc
index 2e771faca8071bf58e45cb03493d7192afaaf30c..766e6d3cbf28e726bc057e6a3e07f1efc92edee9 100644
--- a/cc/resources/picture_pile_impl.cc
+++ b/cc/resources/picture_pile_impl.cc
@@ -376,10 +376,11 @@ void PicturePileImpl::AnalyzeInRect(
analysis->has_text = canvas.HasText();
}
-PicturePileImpl::Analysis::Analysis()
- : is_solid_color(false),
- has_text(false) {
-}
+// Since there are situations when we can skip analysis, the variables have to
+// be set to their safest values. That is, we have to assume that the tile is
+// not solid color. As well, we have to assume that the tile has text so we
+// don't early out incorrectly.
+PicturePileImpl::Analysis::Analysis() : is_solid_color(false), has_text(true) {}
PicturePileImpl::Analysis::~Analysis() {
}
« no previous file with comments | « no previous file | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698