| Index: cc/picture_layer_tiling.h
|
| diff --git a/cc/picture_layer_tiling.h b/cc/picture_layer_tiling.h
|
| index 4c4bb147111abcaaec55ca20e340f70e7bad07d1..22580bb37dced6168b3a759d31aa171e5d3c1a24 100644
|
| --- a/cc/picture_layer_tiling.h
|
| +++ b/cc/picture_layer_tiling.h
|
| @@ -144,6 +144,21 @@ class CC_EXPORT PictureLayerTiling {
|
| // also updates the pile on each tile to be the current client's pile.
|
| void DidBecomeActive();
|
|
|
| + bool needs_update_tile_priorities(int current_source_frame_number,
|
| + double current_frame_time) const {
|
| + // In pending tree, UpdateTilePriorities is always called with
|
| + // calcDrawProperties. We want to update tile priorities:
|
| + // - Immediately after a commit (first_update_in_new_source_frame).
|
| + // - On animation ticks after the first frame in the tree
|
| + // (first_update_in_new_impl_frame).
|
| + // In active tree, UpdateTilePriorities is only called during draw. We
|
| + // want to update priorities:
|
| + // - Only if properties were not already computed by the pending tree
|
| + // and activated for the frame (first_update_in_new_impl_frame).
|
| + return current_source_frame_number != last_source_frame_number_ ||
|
| + current_frame_time != last_impl_frame_time_;
|
| + }
|
| +
|
| protected:
|
| typedef std::pair<int, int> TileMapKey;
|
| typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap;
|
|
|