Closed Bug 1694165 (sw-wr-perf-drop-shadow) Opened 2 months ago Closed 2 months ago

Drop shadows fall off the image fast-path in SWGL


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




88 Branch
Tracking Status
firefox87 --- fixed
firefox88 --- fixed


(Reporter: lsalzman, Assigned: lsalzman)


(Blocks 1 open bug)



(1 file)

Because drop shadows need to sample the image alpha as if it was the color, they use ShaderColorMode::Alpha/COLOR_MODE_ALPHA in the brush_image shader, which causes a mask swizzle. This in turn causes us to fall off the drawSpan fast-path. We can transparently handle this by overriding the blend mode for drop shadows, so that WR doesn't need to know about it, but yet all the swgl texture extensions will also work with it without modification.

I noticed this on some pages (like that have prominent google ads, and up to 30% of the profile was spent rendering drop shadows.

Alias: sw-wr-perf-drop-shadow
Blocks: sw-wr-perf
Severity: -- → S3
Priority: -- → P3
Pushed by
Override SWGL blend mode for drop shadows. r=jrmuizel
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

Comment on attachment 9204597 [details]
Bug 1694165 - Override SWGL blend mode for drop shadows. r?jrmuizel

Beta/Release Uplift Approval Request

  • User impact if declined: Trying to do partial SW-WR rollout on Linux. Would like to avoid people reporting significant performance regressions months down the line.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Only impacts SW-WR/Linux. We can abort the rollout if unstable. Adequate time to deal with any bugs.
  • String changes made/needed:
Attachment #9204597 - Flags: approval-mozilla-beta?

Comment on attachment 9204597 [details]
Bug 1694165 - Override SWGL blend mode for drop shadows. r?jrmuizel

Approved for 87.0b3.

Attachment #9204597 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.