servo/components/util
Patrick Walton a4a9a46a87 gfx: Rewrite display list construction to make stacking-contexts more
first-class.

This implements the scheme described here:

    https://groups.google.com/forum/#!topic/mozilla.dev.servo/sZVPSfPVfkg

This commit changes Servo to generate one display list per stacking
context instead of one display list per layer. This is purely a
refactoring; there are no functional changes. Performance is essentially
the same as before. However, there should be numerous future benefits
that this is intended to allow for:

* It makes the code simpler to understand because the "new layer needed"
  vs. "no new layer needed" code paths are more consolidated.

* It makes it easy to support CSS properties that did not fit into our
  previous flat display list model (without unconditionally layerizing
  them):

  o `opacity` should be easy to support because the stacking context
    provides the higher-level grouping of display items to which opacity
    is to be applied.

  o `transform` can be easily supported because the stacking context
    provides a place to stash the transformation matrix. This has the side
    benefit of nicely separating the transformation matrix from the
    clipping regions.

* The `flatten` logic is now O(1) instead of O(n) and now only needs to
  be invoked for pseudo-stacking contexts (right now: just floats),
  instead of for every stacking context.

* Layers are now a proper tree instead of a flat list as far as layout
  is concerned, bringing us closer to a production-quality
  compositing/layers framework.

* This commit opens the door to incremental display list construction at
  the level of stacking contexts.

Future performance improvements could come from optimizing allocation of
display list items, and, of course, incremental display list
construction.
2014-11-14 17:31:15 -08:00
..
bloom.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
cache.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Cargo.toml Add layers dependency to util crate. Fixes #3783. 2014-10-23 19:29:05 -04:00
debug_utils.rs Cargoify servo 2014-09-08 20:21:42 -06:00
dlist.rs gfx: Rewrite display list construction to make stacking-contexts more 2014-11-14 17:31:15 -08:00
fnv.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
geometry.rs gfx: Rewrite display list construction to make stacking-contexts more 2014-11-14 17:31:15 -08:00
lib.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
logical_geometry.rs Fix unit test compile error. 2014-11-13 11:17:43 +10:00
memory.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
namespace.rs Use Gecko's simpler Bloom filter instead of one based on hash 2014-10-10 17:02:27 -07:00
opts.rs Corral debug command-line options into a --debug/-Z flag 2014-11-04 10:32:06 -08:00
persistent_list.rs util: Add persistent lists as a useful general-purpose thread-safe data 2014-10-31 12:42:32 -07:00
range.rs layout: Refactor inline layout to remove the code that tried to avoid 2014-10-13 16:33:19 -07:00
resource_files.rs Read user-agent.css at run time. Fix #3516 2014-10-07 21:16:54 +01:00
rtinstrument.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
smallvec.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
sort.rs Fix up and run unit tests. 2014-10-02 23:14:42 -06:00
str.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
task.rs Add task profiler, which works by instrumenting each task runtime when enabled. 2014-10-29 07:34:47 +10:00
task_state.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
taskpool.rs Run all task spawning through util, to allow for easy hooking. 2014-10-28 09:53:45 -07:00
tid.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
time.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
vec.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
workqueue.rs Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00