Index: cc/resources/tile_manager.cc |
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc |
index 8dc9c29ff0ae4527fc343c60bf58bf7b88a6092f..0ac17a29094938c08a97475bdb179d065d570b64 100644 |
--- a/cc/resources/tile_manager.cc |
+++ b/cc/resources/tile_manager.cc |
@@ -32,6 +32,9 @@ namespace { |
// a tile is of solid color. |
const bool kUseColorEstimator = true; |
+// Minimum width/height of a pile that would require analysis for tiles. |
+const int kMinLengthToAnalyze = 256; |
reveman
2014/03/27 18:11:26
kMinDimensionForAnalysis?
vmpstr
2014/03/27 18:41:27
Done.
|
+ |
class DisableLCDTextFilter : public SkDrawFilter { |
public: |
// SkDrawFilter interface. |
@@ -1163,7 +1166,14 @@ scoped_refptr<internal::RasterWorkerPoolTask> TileManager::CreateRasterTask( |
// It is drawn directly as a solid-color quad saving raster and upload cost. |
// The analysis step is however expensive and is not justified when doing |
// gpu rasterization where there is no upload. |
- bool analyze_picture = !tile->use_gpu_rasterization(); |
+ // |
+ // Additionally, we do not want to do the analysis if the layer that produced |
+ // this tile is narrow, since more likely than not the tile would not be |
+ // solid. |
+ gfx::Size pile_size = tile->picture_pile()->size(); |
+ bool analyze_picture = |
+ !tile->use_gpu_rasterization() && |
+ std::min(pile_size.width(), pile_size.height()) >= kMinLengthToAnalyze; |
reveman
2014/03/27 18:11:26
Comment mentions layer but you use the picture pil
vmpstr
2014/03/27 18:41:27
I think it has to be the same. In any case, if it'
|
return make_scoped_refptr(new RasterWorkerPoolTaskImpl( |
const_resource, |