gecko-dev/layout/reftests/text-shadow
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
..
723669-ref.html
723669.html
basic-negcoord-ref.html
basic-negcoord-ref.xul
basic-negcoord.html
basic-negcoord.xul
basic-opacity-ref.html
basic-opacity.html
basic-ref.html
basic-ref.xul
basic.html
basic.xul
blur-notref.html
blur-notref.xul
blur-opacity-ref.html
blur-opacity.html
blur.html
blur.xul
color-inherit-ref.html
color-inherit-ref.xul
color-inherit.html
color-inherit.xul
color-parserorder-ref.html
color-parserorder.html
decorations-multiple-zorder-ref.html
decorations-multiple-zorder.html
lineoverflow-ref.html
lineoverflow.html
multiple-noblur-ref.html
multiple-noblur-ref.xul
multiple-noblur.html
multiple-noblur.xul
overflow-clip-ref.html
overflow-clip.html
overflow-decoration-ref.html
overflow-decoration.html
overflow-not-scrollable-1-ref.html
overflow-not-scrollable-1-ref2.html
overflow-not-scrollable-1.html
overflow-not-scrollable-2-ref.html
overflow-not-scrollable-2.html
padding-decoration-ref.html
padding-decoration.html
quirks-decor-noblur-ref.html
quirks-decor-noblur.html
reftest.list Bug 1558106 - Support picture caching for multiple scroll roots. r=kvark 2019-06-13 04:43:56 +00:00
standards-decor-noblur-ref.html
standards-decor-noblur.html
text-shadow-on-selection-1-ref.html
text-shadow-on-selection-1.html
text-shadow-on-selection-2-ref.html
text-shadow-on-selection-2.html
text-shadow-on-space-1-ref.html
text-shadow-on-space-1.html
text-shadow-selected-1-notref.html
text-shadow-selected-1-ref.html
text-shadow-selected-1.html
text-shadow-selected-2-notref.html
text-shadow-selected-2-ref.html
text-shadow-selected-2.html
textindent-ref.html
textindent.html