mozilla/servo — pull request #1678 by ibnc (2014-02-12 19:17:18+00:00)
Title: Multiple Compositor Layers (Do Not Merge)

This is not anywhere near complete, and probably isn't even the best approach. This PR is purely for review/feedback purposes in order to nail down implementation details and address technical concerns, because some of this stuff is complicated :/ ... Code is also a bit messy in places, e.g.. some superfluous stuff here and there, but I'll clean that up for the actual PR.

Creates multiple compositor layers, and buffers almost make it into the layers, but fail due to positioning:
```
task '' failed at 'Quadtree: Tried to add tile to invalid region', /home/ibnc/dev/rust/servo/src/components/main/compositing/quadtree.rs:291
```

Technical Concerns:
Ensuring the epochs will match up: https://github.com/ibnc/servo/blob/position_fixed_scroll_behavior/src/components/main/compositing/compositor_layer.rs#L621

Happens on and off (https://github.com/mozilla/servo/issues/1187) on linux, but not on osx.
```
task '' failed at 'You should have disposed of the pixmap properly with destroy()! This pixmap will leak!', /home/ibnc/dev/rust/servo/src/support/layers/rust-layers/platform/linux/surface.rs:185
```

Where should I be getting the clipping rect bounds for the new layers?

----------

Also, I explored having compositor layers being created during display list construction, and storing them as a field of the display list. Unfortunately, I don't think it's possible at this point because it would require including all of compositing in gfx.rc, and compositor_layer.rs includes gfx which is a problem.