Bug 1981304 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

When LinearGradient enables dithering, fast path is used only when color is same between 2 stops in [LinearGradientTemplate::from()](https://searchfox.org/mozilla-central/rev/5446303cba9b19b9e88937be62936a96086dcf32/gfx/wr/webrender/src/prim_store/gradient/linear.rs#400).

By changing [optimize_linear_gradient()](https://searchfox.org/mozilla-central/rev/5446303cba9b19b9e88937be62936a96086dcf32/gfx/wr/webrender/src/prim_store/gradient/linear.rs#117), it is possible to increase it.
When LinearGradient enables dithering, fast path is used only when color is same between 2 stops in [LinearGradientTemplate::from()](https://searchfox.org/mozilla-central/rev/5446303cba9b19b9e88937be62936a96086dcf32/gfx/wr/webrender/src/prim_store/gradient/linear.rs#400).

By changing [optimize_linear_gradient()](https://searchfox.org/mozilla-central/rev/5446303cba9b19b9e88937be62936a96086dcf32/gfx/wr/webrender/src/prim_store/gradient/linear.rs#117), it is possible to increase it.

It could disable dithering more when there is no color change.
When LinearGradient enables dithering, fast path is used only when color is same between 2 stops in [LinearGradientTemplate::from()](https://searchfox.org/mozilla-central/rev/5446303cba9b19b9e88937be62936a96086dcf32/gfx/wr/webrender/src/prim_store/gradient/linear.rs#400).

By changing [optimize_linear_gradient()](https://searchfox.org/mozilla-central/rev/5446303cba9b19b9e88937be62936a96086dcf32/gfx/wr/webrender/src/prim_store/gradient/linear.rs#117), it is possible to increase it.

When there is no color change between 2 stops, dithering could be disabled.

Back to Bug 1981304 Comment 0