gecko-dev/gfx/tests/reftest
Glenn Watson 331e48d4fe Bug 1749380 - Improve how WR handles bounding rects for off-screen surfaces r=gfx-reviewers,kvark
This patch introduces a number of subtle but important changes
to how we deal with off-screen surfaces. The overall goals are:

 - Improve rendering correctness in a number of edge cases.
 - Begin reducing complexity related to surfaces, scaling
   factors, surface size adjustments and clipping.
 - Improve CPU performance by removing some per-primitive work.
 - Simplify implementation of future SVG and CSS filters by
   having explicit support for picture rects + inflation regions.
 - Lay the groundwork for caching child picture surfaces,
   reduction of per-primitive work during visibility pass,
   simplifying picture code.

Unfortunately, the nature of the changes make it impossible to
split up in to small isolated patches. Details below:

* Introduce `LocalRectKind` concept. This allows us to separate
  out the bounding rect of the surface (a group of primitives
  backed by a texture) from the bounding rect of the picture
  compositing that surface (e.g. a drop-shadow which draws the
  surface once at the local origin and once at a specific offset
  + blur-radius). This fixes a number of correctness bugs we have
  related to culling, clipping, invalidation regions of complex
  primitives such as drop-shadows and blur filters. Importantly,
  it makes it simpler to implement (or fix) SVG filter chains,
  backdrop-filter implementations.

* Establish raster roots for all off-screen surfaces. Every off-screen
  surface uses the spatial node of the enclosing stacking context as
  a coordinate system root, ensuring that each off-screen surface is
  drawn in a 2D coordinate system, with appropriate scaling factors
  applied to ensure high quality rendering. The primary goal is to make
  it possible to correctly inflate and clip off-screen surfaces, removing
  some correctness issues we currently have with complex filters interacting
  with transforms. The initial work here doesn't reduce complexity a huge
  amount, but will allow us to simplify large parts of the picture/surface
  handling code in future, as well as simplify a number of shaders that
  currently must handle arbitrarily complex transform matrices. This will
  also allow us to simplify the implementation of features such as
  mix-blend-mode and backdrop-filter, which rely on readback and UV mapping
  from the parent surface.

* Remove concepts of `estimated` and `precise` local rects for pictures. This
  is both a performance optimization and a code simplification. Instead, we
  only determine the estimated local rect during bounding rect propagation,
  and rely on the clipping regions from the tile dirty regions to reduce which
  parts of the picture we allocate if drawing to an off-screen surface. This
  removes some per-primitive work during the visibility pass, and also means
  we can rely on the final picture bounding rect from the start of the visibility
  pass. This also removes much of the complexity in `take_context` where we
  previously determined surface scale factors and device pixel ratio - instead
  these can be determined earlier during `propagate_bounding_rects`.

* Remove some complexity in `update_prim_visibility`. This is still recursive,
  but follow up patches will aim to remove this recursion and integrate this
  pass with the picture graph (similar to how `propagate_bounding_rects` works).

* Remove `PictureOptions` struct. Instead, store `inflate_if_required` with
  the Blur filter enum, which is the only place that uses it.

* Remove `root_scaling_factor` from text runs - this is handled implicitly
  by the surface device-pixel scale.

* Skip calling `update_clip_task` for pass-through pictures (since they have
  no defined local rect).

* Improve scaling factors used for determining the render task cache size for
  complex line decorations.

Differential Revision: https://phabricator.services.mozilla.com/D137569
2022-02-07 22:14:47 +00:00
..
468496-1-ref.html
468496-1.html
611498-1.html
611498-ref.html
709477-1-ref.html
709477-1.html
853889-1-ref.html
853889-1.html
1086723-ref.html
1086723.html
1131264-1.svg
1143303-1.svg
1149923-ref.html
1149923.html
1419528-ref.html
1419528.html
1424673-ref.html
1424673.html
1429411-ref.html
1429411.html
1435143-ref.html Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham 2020-12-15 10:34:54 +00:00
1435143.html Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham 2020-12-15 10:34:54 +00:00
1444904-ref.html Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham 2020-12-15 10:34:54 +00:00
1444904.html
1451168-ref.html
1451168.html
1461313-ref.html
1461313.html
1463802-ref.html
1463802.html
1474722-ref.html Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi 2021-01-07 08:53:08 +00:00
1474722.html Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi 2021-01-07 08:53:08 +00:00
1501195-ref.html
1501195.html
1519754-ref.html
1519754.html
1523080-ref.html
1523080.html
1523776-ref.html
1523776.html
1524261-ref.html
1524261.html
1524353-ref.html
1524353.html
1616444-same-color-different-paths-ref.html
1616444-same-color-different-paths.html Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi 2021-01-07 08:53:08 +00:00
1662062-1-no-blurry.html Bug 1662062. Make StackingContextHelper constructor handle pinch zooming resolution when calculatoring the scale. r=jrmuizel 2020-11-28 09:50:14 +00:00
1662062-1-ref.html Bug 1662062. Make StackingContextHelper constructor handle pinch zooming resolution when calculatoring the scale. r=jrmuizel 2020-11-28 09:50:14 +00:00
1681610-ref.html Bug 1681610: Use thicker borders when faking rounded rectangles. r=gw 2021-01-09 19:55:03 +00:00
1681610.html Bug 1681610: Use thicker borders when faking rounded rectangles. r=gw 2021-01-09 19:55:03 +00:00
1687157-1-ref.html Bug 1687157 - Support 24-bit depth in SWGL. r=jrmuizel 2021-03-09 02:01:26 +00:00
1687157-1.html Bug 1687157 - Support 24-bit depth in SWGL. r=jrmuizel 2021-03-09 02:01:26 +00:00
1696439-1-ref.html Bug 1696439 - Fix corner apex distance calculation in cs_clip_rectangle. r=jrmuizel 2021-03-09 19:08:09 +00:00
1696439-1.html Bug 1696439 - Fix corner apex distance calculation in cs_clip_rectangle. r=jrmuizel 2021-03-09 19:08:09 +00:00
1722689-1-ref.html Bug 1722689 - Don't clamp minimum font size on macOS to 1 pixel; allow really tiny sizes (which may subsequently be scaled). r=lsalzman 2021-08-01 20:06:38 +00:00
1722689-1.html Bug 1722689 - Don't clamp minimum font size on macOS to 1 pixel; allow really tiny sizes (which may subsequently be scaled). r=lsalzman 2021-08-01 20:06:38 +00:00
1724901-1-helper.svg Bug 1724901. Add test. r=hiro 2021-08-18 03:44:56 +00:00
1724901-1-ref.html Bug 1724901. Add test. r=hiro 2021-08-18 03:44:56 +00:00
1724901-1.html Bug 1724901. Add test. r=hiro 2021-08-18 03:44:56 +00:00
1724901-2-helper.html Bug 1739015. Add another, better, reftest for bug 1724901. r=hiro 2021-11-03 00:41:36 +00:00
1724901-2-ref.html Bug 1739015. Add another, better, reftest for bug 1724901. r=hiro 2021-11-03 00:41:36 +00:00
1724901-2.html Bug 1739015. Add another, better, reftest for bug 1724901. r=hiro 2021-11-03 00:41:36 +00:00
Ahem.ttf Bug 1722689 - Don't clamp minimum font size on macOS to 1 pixel; allow really tiny sizes (which may subsequently be scaled). r=lsalzman 2021-08-01 20:06:38 +00:00
blacktrans.png
bug1523410-translate-scale-snap-ref.html
bug1523410-translate-scale-snap.html
bwinton.jpg
pass.svg
picture-caching-on-async-zoom.html Bug 1667124 - Add a reftest that captures improper picture caching behaviour, in at least some of the cases. r=gw 2020-10-09 14:47:02 +00:00
reftest.list Bug 1749380 - Improve how WR handles bounding rects for off-screen surfaces r=gfx-reviewers,kvark 2022-02-07 22:14:47 +00:00