liyuqian 3f5e53a4c7 Compute cull_rect and optimize in Layer::Preroll (flutter/engine#6923)
This PR replaces the unused `PrerollContext::child_paint_bounds` with `PrerollContext::cull_rect` so we can prune unnecessary preroll tasks (especially cache) based on clips. This PR fixes https://github.com/flutter/flutter/issues/24712

Performance test has been added (https://github.com/flutter/flutter/pull/25381) to make sure that we won't regress again in the future.

Note that the cull_rect here is very similar to those removed in https://github.com/flutter/engine/pull/6352 .     We can't compute cull rects in SceneBuilder because of retained layers. But we can still compute and use them to optimize performance in Preroll.
2018-12-18 09:54:52 -08:00
..