Chromium Code Reviews| Index: cc/resources/tile_manager.cc |
| diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc |
| index 8dc9c29ff0ae4527fc343c60bf58bf7b88a6092f..c4e75863fcc40fb5d273556167eeb2e39f35cfc0 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 kMinSizeToAnalyze = 256; |
|
alokp
2014/03/27 05:20:45
kMinLengthToAnalyze?
vmpstr
2014/03/27 17:02:53
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 |
|
alokp
2014/03/27 05:20:45
I do not get the connection between the tile being
vmpstr
2014/03/27 17:02:53
It definitely doesn't mean that it's not solid, bu
alokp
2014/03/27 17:45:16
I understand that it is just a heuristic and I am
|
| + // solid. |
| + gfx::Size pile_size = tile->picture_pile()->size(); |
| + bool analyze_picture = |
| + !tile->use_gpu_rasterization() && |
| + std::min(pile_size.width(), pile_size.height()) >= kMinSizeToAnalyze; |
| return make_scoped_refptr(new RasterWorkerPoolTaskImpl( |
| const_resource, |