Closed
Bug 1665274
Opened 4 years ago
Closed 4 years ago
rasterflood_gradient spends a lot of time in brush_opacity
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
83 Branch
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: lsalzman, Assigned: nical)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
When testing under SWGL, it seems that half the time in rasterflood_gradient is spent inside brush_opacity, aside from brush_radial_gradient comprising the other half, as rasterflood_gradient sets opacity on the background.
Glenn suggests that brush_opacity is probably very inefficient for this common case that is both axis-aligned and requires no edge AA. He suggests that we could possibly just use a hardware blend mode and a simple blit shader instead to fast-path that case. That would be a win for both SWGL and HW.
Assignee | ||
Updated•4 years ago
|
Blocks: wr-gpu-time
Updated•4 years ago
|
Severity: -- → N/A
Priority: -- → P3
Assignee | ||
Comment 1•4 years ago
|
||
- Remove a bunch of unnecessary arithmetic that un-premultiply/premultiply unmodified rgb channels.
- Clamp the uvs as we do in other shaders instead of doing a point-in-rect test.
- Add a shader variant that doesn't deal with anti-aliasing for the common axis-aligned transform case.
In the future we can merge the opacity funcionality into the brush_image shader to reduce the number of shaders.
Updated•4 years ago
|
Assignee: nobody → nical.bugzilla
Status: NEW → ASSIGNED
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/59d9ce47882b
Speed up brush_opacity. r=lsalzman
Comment 3•4 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox83:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•