gecko-dev/layout/reftests/border-image
Glenn Watson e22f19cf52 Bug 1558106 - Support picture caching for multiple scroll roots. r=kvark
This patch implements the majority of the planned picture caching
improvements. It supports most of the functionality required to
(as a follow up) support OS compositor integration. It also improves
on the robustness and functionality of the previous picture caching
implementation.

There are some expected temporary performance regressions in
some cases (such as content that is constantly invalidating) and
during initial page render when many render targets must be drawn
to. These performance regressions will be resolved in follow up
commits by supporting multi-resolution tiles.

The scene is split into a number of slices, determined by the scroll
root of each primitive, which can be found by the primitive's
spatial node indices. If a scene contains too many slices, then
picture caching is disabled on the page, to avoid excessive texture
memory usage, and rendering falls back to rasterizing each frame.

The specific changes in this patch are:
    * Support tile caches for multiple scroll roots, allowing the
      entire page (including fixed divs and the main UI bar) to be
      cached in most cases, in addition to the main content.
    * Remove requirement to read tiles back from the framebuffer.
      Instead, they are drawn into the picture cache target tiles,
      and blitted to the screen. This is slightly slower than the
      existing picture caching when content is constantly changing,
      however this cost will disappear / become irrelevant when
      the OS compositor integration work is complete.
    * Switch picture cache render targets to be nearest sampled (they
      are always rendered 1:1) and support depth buffer targets.
    * Make use of the external scroll offset support to allow removal
      of the primitive correlation hacks in the previous picture
      caching implementation. Also allows storing of primitive
      dependencies in picture space rather than world space, which
      reduces floating point inaccuracies.
    * Determine if each tile and picture cache can be considered
      opaque. This is used to determine whether subpixel AA text
      rendering is available on a slice, and for rendering optimizations
      related to disabling blending and/or tile clears.
    * Use the clip chain instance results from the recent visibility pass
      work to determine clip chain dependencies. This results in fewer
      clip item dependencies in tiles, which is faster to check validity
      and reduces redundant invalidations.
    * Remove extra overhead during batching related to batch lists,
      and region iteration, as they are no longer required.
    * Support PrimitiveVisibilityMask during batching. This allows a
      single traversal of a picture (surface) root during batching to
      efficiently construct multiple alpha batcher objects (typically
      one per invalida tile).
    * Picture caching is now handled implicitly by WR, depending on
      the content of the scene. There is no requirement for client
      code to manually select which stacking context should be cached.
    * Simplify how clip chain / transform dependencies are tracked by
      picture cache tiles.
    * Support pushing / popping enclosing clip chain roots without
      the need for a stacking context / picture in some cases. This
      simplifies the logic to split the scene into multiple slices.

The main remaining work in this area is (a) extend the code to
optionally provide each slice as an input to the OS compositor
rather than drawing the tiles in WR, and (b) support multi-resolution
tiles so that we reduce the draw call, batching and render target
overhead in cases where much of the page content is changing.

Differential Revision: https://phabricator.services.mozilla.com/D34319

--HG--
extra : moz-landing-system : lando
2019-06-13 04:43:56 +00:00
..
3x3green-1DD813.png
3x3multicolor.png
3x3transparent.png
4x4multicolor.png
10x5multicolor.png
470250-1-ref.html
470250-1.html
470250-2-ref.html
470250-2.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
border-image-element-ref.html
border-image-element.html
border-image-linear-gradient-outset-ref.html
border-image-linear-gradient-outset.html
border-image-linear-gradient-ref.html
border-image-linear-gradient-repeat-repeat-1-ref.html
border-image-linear-gradient-repeat-repeat-1.html
border-image-linear-gradient-repeat-repeat-2-ref.html
border-image-linear-gradient-repeat-repeat-2.html
border-image-linear-gradient-repeat-repeat-3-ref.html
border-image-linear-gradient-repeat-repeat-3.html
border-image-linear-gradient-repeat-round-1-ref.html
border-image-linear-gradient-repeat-round-1.html
border-image-linear-gradient-repeat-round-2-ref.html
border-image-linear-gradient-repeat-round-2.html
border-image-linear-gradient-repeat-round-3-ref.html
border-image-linear-gradient-repeat-round-3.html
border-image-linear-gradient-slice-1-ref.html
border-image-linear-gradient-slice-1.html
border-image-linear-gradient-slice-2-ref.html
border-image-linear-gradient-slice-2.html
border-image-linear-gradient-slice-fill-1-ref.html
border-image-linear-gradient-slice-fill-1.html
border-image-linear-gradient-slice-fill-2-ref.html
border-image-linear-gradient-slice-fill-2.html
border-image-linear-gradient-slice-width-ref.html
border-image-linear-gradient-slice-width.html
border-image-linear-gradient-width-ref.html
border-image-linear-gradient-width.html
border-image-linear-gradient.html
border-image-nofill-1-ref.html
border-image-nofill-1.html
border-image-outset-1-ref.html
border-image-outset-1a.html
border-image-outset-1b.html
border-image-outset-1c.html
border-image-outset-move-1-ref.html
border-image-outset-move-1.html
border-image-outset-resize-1-ref.html
border-image-outset-resize-1.html
border-image-radial-gradient-ref.html
border-image-radial-gradient-slice-1-ref.html
border-image-radial-gradient-slice-1.html
border-image-radial-gradient-slice-2-ref.html
border-image-radial-gradient-slice-2.html
border-image-radial-gradient-slice-fill-1-ref.html
border-image-radial-gradient-slice-fill-1.html
border-image-radial-gradient-slice-fill-2-ref.html
border-image-radial-gradient-slice-fill-2.html
border-image-radial-gradient-slice-width-ref.html
border-image-radial-gradient-slice-width.html
border-image-radial-gradient-width-ref.html
border-image-radial-gradient-width.html
border-image-radial-gradient.html
border-image-repeating-linear-gradient-ref.html
border-image-repeating-linear-gradient-repeat-round-2-ref.html
border-image-repeating-linear-gradient-repeat-round-2.html
border-image-repeating-linear-gradient-slice-fill-2-ref.html
border-image-repeating-linear-gradient-slice-fill-2.html
border-image-repeating-linear-gradient.html
border-image-repeating-radial-gradient-ref.html
border-image-repeating-radial-gradient-repeat-repeat-2-ref.html
border-image-repeating-radial-gradient-repeat-repeat-2.html
border-image-repeating-radial-gradient-repeat-round-2-ref.html
border-image-repeating-radial-gradient-repeat-round-2.html
border-image-repeating-radial-gradient-slice-1-ref.html
border-image-repeating-radial-gradient-slice-1.html
border-image-repeating-radial-gradient-slice-2-ref.html
border-image-repeating-radial-gradient-slice-2.html
border-image-repeating-radial-gradient-slice-fill-1-ref.html
border-image-repeating-radial-gradient-slice-fill-1.html
border-image-repeating-radial-gradient-slice-fill-2-ref.html
border-image-repeating-radial-gradient-slice-fill-2.html
border-image-repeating-radial-gradient-slice-width-ref.html
border-image-repeating-radial-gradient-slice-width.html
border-image-repeating-radial-gradient-width-ref.html
border-image-repeating-radial-gradient-width.html
border-image-repeating-radial-gradient.html
border-image-style-none-auto-ref.html
border-image-style-none-auto.html
border-image-style-none-length-ref.html
border-image-style-none-length.html
border-image-style-none-ref.html
border-image-style-none.html
border-image-width-1-ref.html
border-image-width-1a.html
border-image-width-1b.html
border-image-width-1c.html
border-image-width-large-ref.html
border-image-width-large.html
center-scaling-1-ref.html
center-scaling-1.html
center-scaling-2-ref.html
center-scaling-2.html
center-scaling-3-ref.html
center-scaling-3.html
center-scaling-4b-ref.html
center-scaling-4b.html
center-scaling-4l-ref.html
center-scaling-4l.html
center-scaling-4lr-ref.html
center-scaling-4lr.html
center-scaling-4r-ref.html
center-scaling-4r.html
center-scaling-4t-ref.html
center-scaling-4t.html
center-scaling-4tb-ref.html
center-scaling-4tb.html
diamonds.png
different-h-v-1.html
different-h-v-2.html
different-h-v-ref.html
gen-refs.py
multicolor-image-1-ref.html
multicolor-image-1.html
multicolor-image-2-ref.html
multicolor-image-2.html
multicolor-image-3-ref.html
multicolor-image-3.html
multicolor-image-4-ref.html
multicolor-image-4.html
multicolor-image-5-ref.html
multicolor-image-5.html
reftest.list Bug 1558106 - Support picture caching for multiple scroll roots. r=kvark 2019-06-13 04:43:56 +00:00
repeat-image-1-ref.html
repeat-image-1.html
reticule-bl.png
reticule-bo.png
reticule-br.png
reticule-ct.png
reticule-le.png
reticule-ri.png
reticule-tl.png
reticule-to.png
reticule-tr.png
reticule.png
roundrectbutton.png
side-scaling-1h-ref.html
side-scaling-1h.html
side-scaling-1v-ref.html
side-scaling-1v.html
solid-image-1-ref.html
solid-image-1.html
solid-image-1a.html
solid-image-2-ref.html
solid-image-2.html
solid-image-2a.html
svg-as-border-image-1-ref.html
svg-as-border-image-1a.html
svg-as-border-image-1b.html
svg-as-border-image-1c.html
svg-as-border-image-2-ref.html Bug 1264809 - (Part 3) Add reftest. r=dholbert 2016-07-01 00:44:00 +02:00
svg-as-border-image-2.html Bug 1264809 - (Part 3) Add reftest. r=dholbert 2016-07-01 00:44:00 +02:00
svg-as-border-image-3-ref.html Bug 1264809 - (Part 3) Add reftest. r=dholbert 2016-07-01 00:44:00 +02:00
svg-as-border-image-3.html Bug 1264809 - (Part 3) Add reftest. r=dholbert 2016-07-01 00:44:00 +02:00
svg-as-border-image-4-ref.html Bug 1290782 Part 3 - Add test cases for using an SVG image as border-image. r=cjku,dholbert 2017-09-20 10:06:26 +08:00
svg-as-border-image-4a.html Bug 1290782 Part 3 - Add test cases for using an SVG image as border-image. r=cjku,dholbert 2017-09-20 10:06:26 +08:00
svg-as-border-image-4b.html Bug 1290782 Part 3 - Add test cases for using an SVG image as border-image. r=cjku,dholbert 2017-09-20 10:06:26 +08:00
transparent-image-1-ref.html
transparent-image-1.html