Closed Bug 1686654 Opened 4 years ago Closed 3 years ago

Reenable active SVG images

Categories

(Core :: Graphics: WebRender, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox99 --- wontfix
firefox102 --- fixed

People

(Reporter: longsonr, Assigned: nical)

References

(Blocks 1 open bug, Regressed 3 open bugs)

Details

(Keywords: perf-alert)

Attachments

(5 files)

Originally implemented in bug 1555356 but preffed off in bug 1684625 under the pref gfx.webrender.svg-images

Bug 1684625 includes reftests for a couple of the regressions caused by bug 1555356 (those regressions have been marked fixed by bug 1555356) but the others ought to be looked into too before the pref is set to true.

Blocks: 1555356
Severity: -- → S3
Priority: -- → P3
No longer blocks: wr-perf

It was previously only called where we create a stacking context helper: before entering the grouping code and before pushing an active item into the wr display list, and not between the active items and the next blob group. This caused the leaf clip rect of the active item to leak into the next blob group.

Assignee: nobody → nical.bugzilla
Status: NEW → ASSIGNED
Depends on: 1752348
Depends on: 1755747
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2233117f1193 Ensure SwitchItem is called at the start of each blob group. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch

The patch that landed was just dependency to reenabling active svg images.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Flipping this pref lets us use WebRender display items for a subset of SVG images and rectangles.

No longer blocks: 1555356
Depends on: 1684625, 1555356
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60d43ba90696 Adjust reftest expectations. r=gfx-reviewers,jrmuizel https://hg.mozilla.org/integration/autoland/rev/9af11a2b5add Reenable active SVG images. r=gfx-reviewers,jrmuizel
Flags: needinfo?(nical.bugzilla)
Target Milestone: 99 Branch → ---

The failing mochitest appears to be caused by the fact that we end up ignoring the HitTestInfo display item just before the active rectangle because we act on it during the PaintItemRange loop but we don't get to PaintItemRange in an empty item group (which is the case here the item group before the active rectangle only contains the hit test info item so it has an empty painted rect.

I'm not sure how this is supposed to work but I suspect that the hit test info item applies to the actually painted item directly after it and so we probably have to check when making an item active whether the previous item is a hittest info item and if so push a wr hittest display item.

Flags: needinfo?(nical.bugzilla)

... if the group had hit test flags set.

This is more of a workaround than a proper fix. The general idea is that if we hadn't made the item acitve, its bound would have included in the group's hit tested bounds. Making the item active reduces the area that is covered by hit test items and we don't want that.

Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/235f5e5c65f8 Push hit test items for active items that are split off a group. r=jrmuizel https://hg.mozilla.org/integration/autoland/rev/1e888c5964a4 Adjust reftest expectations. r=gfx-reviewers,jrmuizel https://hg.mozilla.org/integration/autoland/rev/414066984e1e Reenable active SVG images. r=gfx-reviewers,jrmuizel

Before this patch the hit test info is accumulated in the painting loop of a group, there are two issues with that:

  • We can early out before getting to the painting loop if the group does not contain any visible item (hit test info items don't count as visible) so a nsDisplayCompositorHitTestInfo can be ignored if it is between two active items.
  • Group boundaries should not affect the behavior of hit testing.

With this patch, hit test info is accumulated in the ConstructItem loops, is not reset in EndGroup and is carried over from a group to the next.
This means the hit test flags are extended to the scope of the svg container, I'm not entirely sure that it's correct but I believe it is at least less incorrect than the current behavior.

Depends on D143130

Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7b20169526ef Push hit test items for active items that are split off a group. r=jrmuizel https://hg.mozilla.org/integration/autoland/rev/3da39fb722c1 Adjust reftest expectations. r=gfx-reviewers,jrmuizel https://hg.mozilla.org/integration/autoland/rev/2225497ca573 Reenable active SVG images. r=gfx-reviewers,jrmuizel https://hg.mozilla.org/integration/autoland/rev/950227a48351 Track CompositorHitTestInfo accross blob groups. r=jrmuizel
Flags: needinfo?(nical.bugzilla)
Regressions: 1768641
Regressions: 1768643
Regressions: 1768715
Regressions: 1768829
Regressions: 1768962

== Change summary for alert #34116 (as of Fri, 13 May 2022 16:46:05 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
43% tsvgr_opacity linux1804-64-shippable-qr e10s fission stylo webrender-sw 145.55 -> 83.47
43% tsvgr_opacity linux1804-64-shippable-qr e10s fission stylo webrender 148.17 -> 85.15
39% tsvgr_opacity windows10-64-shippable-qr e10s fission stylo webrender-sw 111.25 -> 67.63
39% tsvgr_opacity windows10-64-shippable-qr e10s fission stylo webrender-sw 110.89 -> 67.41
37% tsvgr_opacity macosx1015-64-shippable-qr e10s fission stylo webrender-sw 88.04 -> 55.35
... ... ... ... ...
8% tsvg_static linux1804-64-shippable-qr e10s fission stylo webrender 80.14 -> 73.56

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=34116

(In reply to Pulsebot from comment #14)

Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7b20169526ef
Push hit test items for active items that are split off a group. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/3da39fb722c1
Adjust reftest expectations. r=gfx-reviewers,jrmuizel
https://hg.mozilla.org/integration/autoland/rev/2225497ca573
Reenable active SVG images. r=gfx-reviewers,jrmuizel
https://hg.mozilla.org/integration/autoland/rev/950227a48351
Track CompositorHitTestInfo accross blob groups. r=jrmuizel

== Change summary for alert #34162 (as of Wed, 18 May 2022 05:13:14 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
4% google-slides loadtime linux1804-64-shippable-qr cold webrender 4,631.73 -> 4,456.12
4% google-slides loadtime linux1804-64-shippable-qr cold fission webrender 4,603.23 -> 4,429.08
3% google-slides loadtime linux1804-64-shippable-qr cold fission webrender 4,655.21 -> 4,502.96
2% google-slides PerceptualSpeedIndex linux1804-64-shippable-qr cold fission webrender 868.25 -> 846.67
2% google-slides ContentfulSpeedIndex linux1804-64-shippable-qr cold fission webrender 1,179.83 -> 1,154.83

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=34162

Regressions: 1768650
Regressions: 1780191
Regressions: 1792313
Regressions: 1805715
Regressions: 1828224
Blocks: 1740757
Regressions: 1917715
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: