Closed Bug 1755299 Opened 3 years ago Closed 3 years ago

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

VERIFIED FIXED
99 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox97 --- unaffected
firefox98 --- unaffected
firefox99 --- fixed
firefox100 --- verified

People

(Reporter: mayankleoboy1, Assigned: gw)

References

(Regression, )

Details

(Keywords: regression)

go to https://themaninblue.com/experiment/BlobbyBlendMode/
Observe the blue blob when it is at the top if its vertical trajectory

AR: Glitches in rendering

Has Regression Range: --- → yes
Has STR: --- → yes
Regressed by: 1749380

2022-02-14T19:11:40.150000: INFO : application_version: 99.0a1
2022-02-14T19:11:40.150000: INFO : platform_buildid: 20220207222633
2022-02-14T19:11:40.150000: INFO : platform_changeset: b7f88e5c537bb7d64ba9d4cb58b052650d510638
2022-02-14T19:11:40.150000: INFO : platform_repository: https://hg.mozilla.org/integration/autoland
2022-02-14T19:11:40.150000: INFO : platform_version: 99.0a1
2022-02-14T19:11:50.335000: INFO : Narrowed integration regression window from [8e9c1ffd, 41535e3d] (3 builds) to [8e9c1ffd, b7f88e5c] (2 builds) (~1 steps left)
2022-02-14T19:11:50.335000: DEBUG : Starting merge handling...
2022-02-14T19:11:50.335000: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=b7f88e5c537bb7d64ba9d4cb58b052650d510638&full=1
2022-02-14T19:11:50.335000: DEBUG : redo: attempt 1/3
2022-02-14T19:11:50.335000: DEBUG : redo: retry: calling _default_get with args: ('https://hg.mozilla.org/integration/autoland/json-pushes?changeset=b7f88e5c537bb7d64ba9d4cb58b052650d510638&full=1',), kwargs: {}, attempt #1
2022-02-14T19:11:50.335000: DEBUG : urllib3.connectionpool: Resetting dropped connection: hg.mozilla.org
2022-02-14T19:11:52.505000: DEBUG : urllib3.connectionpool: https://hg.mozilla.org:443 "GET /integration/autoland/json-pushes?changeset=b7f88e5c537bb7d64ba9d4cb58b052650d510638&full=1 HTTP/1.1" 200 None
2022-02-14T19:11:52.520000: DEBUG : Found commit message:
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-14T19:11:52.520000: DEBUG : Did not find a branch, checking all integration branches
2022-02-14T19:11:52.520000: INFO : The bisection is done.
2022-02-14T19:11:52.520000: INFO : Stopped

Severity: -- → S3
Flags: needinfo?(gwatson)
Keywords: regression
Assignee: nobody → gwatson
Flags: needinfo?(gwatson)

Fixed by backout. I will be re-landing this patch series next week, with changes that fix this issue. Please re-open if it occurs again.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Flags: qe-verify+

Hi Mayank,

I am not able to reproduce the issue on Win10 using builds 99.0a1(20220223190530) and 98.0a1 (20220201175554).
Can you please confirm issue is fixed on your side on latest Nightly build (https://archive.mozilla.org/pub/firefox/nightly/2022/03/2022-03-17-09-28-57-mozilla-central/) ?
Thank you.

Flags: needinfo?(mayankleoboy1)

fixed on nightly

Flags: needinfo?(mayankleoboy1)

(In reply to Mayank Bansal from comment #4)

fixed on nightly

Mark as verified based on previous comment. Thank you.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.