Closed Bug 1533236 Opened 7 months ago Closed 7 months ago

Add a fast path to WR for common gradient types.

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: gw, Assigned: gw)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → gwatson

The existing linear gradient shader is quite slow, especially
on very large gradients on integrated GPUs.

The vast majority of gradients in real content are very simple
(typically < 4 stops, no angle, no repeat). For these, we can
run a fast path to persist a small gradient in the texture cache
and draw the gradient via the image shader.

This is much faster than the catch-all gradient shader, and also
results in better batching while drawing the main scene.

In future, we can expand the fast path to handle more cases, such
as angled gradients. For now, it takes a conservative approach,
but still seems to hit the fast path on most real content.

See Also: → 1493068
Blocks: wr-perf
Priority: -- → P3
Pushed by gwatson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/59d1e67be63c
Add a fast path to WR for common gradient types. r=kvark
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.