Clip display list based on frame viewport

Instead of creating a display list for the entire page, only create one
for an area that expands around the viewport. On my machine this makes
incremental layout of http://timecube.com 50% faster.
This commit is contained in:
Martin Robinson 2014-10-22 14:00:09 -07:00
parent f4471f0602
commit c7327450ef
11 changed files with 130 additions and 34 deletions

View file

@ -499,6 +499,10 @@ impl FragmentDisplayListBuilding for Fragment {
return
}
if !absolute_fragment_bounds.intersects(clip_rect) {
return;
}
debug!("Fragment::build_display_list: intersected. Adding display item...");
if self.is_primary_fragment() {