mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 18:26:15 +00:00
d34bbe138b
This is a new implementation of mix-blend compositing that is meant to be more idiomatic to WR and efficient. Previously, mix-blend mode was composed in the following way: 1. parent stacking context was forced to isolate 2. source picture is also isolated 3. when rendering the isolated context, the framebuffer is read upon reaching the source. Both the readback and the source are placed in the RT cache. 4. a mix-blend draw call is issued to read from those cache segments and blend on top of the backdrop The new implementation works by using the picture cutting (intruduced for preserve-3D contexts earlier) and some bits of magic: 1. backdrop stacking context is isolated with a special composition mode that prevents it from actually rendeing unless the suorce stacking context is invisible. 2. source stacking context is isolated with mix-blend composition mode that has a pointer to the backdrop picture 3. the instance of the backdrop picture is placed as a peer of the source picture (not a child) 4. if the backdrop is invisible, the source is drawn as a simple blit 5. otherwise, it's a draw call that reads from the isolated backdrop and source textures Note the differences: - parent stacking context is not isolated, but backdrop is - no framebuffer readback is involved - the source and backdrop pictures are rendered in parallel in a pass, improving the batching - we don't blend onto the backdrop while reading from the backdrop copy at the same time - the depth of the render pass tree is reduced: previously the parent and the source were isolated, now the source and the backdrop, which are siblings Differential Revision: https://phabricator.services.mozilla.com/D20608 --HG-- rename : gfx/wr/wrench/reftests/blend/multiply-2-ref.yaml => gfx/wr/wrench/reftests/blend/multiply-3-ref.yaml rename : gfx/wr/wrench/reftests/blend/multiply-3.yaml => gfx/wr/wrench/reftests/blend/multiply-4.yaml extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
2d | ||
angle | ||
cairo | ||
config | ||
docs | ||
gl | ||
graphite2 | ||
harfbuzz | ||
ipc | ||
layers | ||
ots | ||
qcms | ||
sfntly | ||
skia | ||
src | ||
tests | ||
thebes | ||
vr | ||
webrender_bindings | ||
wr | ||
ycbcr | ||
moz.build |