| Index: cc/resources/picture_pile.cc
|
| diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
|
| index 1af8b4ce05a9df51aaf5b6a4ea7da0cb658e9828..33d37e7f6ef71259401a44c7d07cfa4397c9f76d 100644
|
| --- a/cc/resources/picture_pile.cc
|
| +++ b/cc/resources/picture_pile.cc
|
| @@ -141,8 +141,7 @@ float ClusterTiles(const std::vector<gfx::Rect>& invalid_tiles,
|
|
|
| namespace cc {
|
|
|
| -PicturePile::PicturePile() {
|
| -}
|
| +PicturePile::PicturePile() : is_suitable_for_gpu_rasterization_(true) {}
|
|
|
| PicturePile::~PicturePile() {
|
| }
|
| @@ -244,6 +243,14 @@ bool PicturePile::Update(ContentLayerClient* painter,
|
| tile_grid_info_,
|
| gather_pixel_refs,
|
| num_raster_threads);
|
| + // Note the '&&' with previous is-suitable state.
|
| + // This means that once a picture-pile becomes unsuitable for gpu
|
| + // rasterization due to some content, it will continue to be unsuitable
|
| + // even if that content is replaced by gpu-friendly content.
|
| + // This is an optimization to avoid iterating though all pictures in
|
| + // the pile after each invalidation.
|
| + is_suitable_for_gpu_rasterization_ &=
|
| + picture->IsSuitableForGpuRasterization();
|
| base::TimeDelta duration =
|
| stats_instrumentation->EndRecording(start_time);
|
| best_duration = std::min(duration, best_duration);
|
|
|