Closed Bug 1961895 Opened 1 month ago Closed 28 days ago

[wpt-sync] Sync PR 52048 - Prevent composited ref filter with empty ref box from optimizing away

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 52048 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/52048
Details from upstream follow.

Sam Fortiner <samfort@microsoft.com> wrote:

Prevent composited ref filter with empty ref box from optimizing away

There are multiple places in the composition layer and layer to render
pass pipeline that make assumptions that an empty layer does not
contribute to the final rendered output. However, an empty composited
div with a reference filter can contribute to the rendered output. This
fix modifies several of those early-outs to avoid bailing if a reference
filter is present.

RenderSurfaceImpl::AppendQuads - would not add a a quad if the
unoccluded_output_rect was empty.

LayerNeedsUpdate - (used by both UI and CC trees) would prevent layer
updates if the layer->bounds() was empty. Similarly,
ComputeListOfNonEmptySurfaces would remove any surface with an empty
content rect. Both of these would cause the surface list to exclude the
surface for the filter, which would eventually cause the render pass to
be missing for the filter.

This change loosens these checks to allow the presence of a reference
filter to bypass them.

Note that if AllowSkipEmptyNonrootRenderPassDraws is disabled, this
change can lead to both HW and SW rendering crashing. But that flag has
been enabled by default for almost a year and is expected to be removed
in the near future.

Also note that this change is dependent on http://crrev.com/1444153.
Without that fix, SW rendering will still fail to draw the filter
content.

Bug: 40694530
Change-Id: I20df2cd920dbf5a1b78270d733124d16701d3fa4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6378573
Reviewed-by: Vladimir Levin \<vmpstr@chromium.org>
Reviewed-by: Vasiliy Telezhnikov \<vasilyt@chromium.org>
Commit-Queue: Sam Fortiner \<samfort@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1448602}

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

Ran 7 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

FAIL: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/215331ab3767 [wpt PR 52048] - Prevent composited ref filter with empty ref box from optimizing away, a=testonly
Status: NEW → RESOLVED
Closed: 28 days ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
You need to log in before you can comment on or make changes to this bug.