Replies: 2 comments
-
Linked PR for implementaiton: #9622 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Please if you have any negative comment about this issue, Answer this comment with the reason you think this is a bad change |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When i work with gradients it oftens shows up in my flamegraph the color parsing function.
When rendering a gradient run this loop here:
When an opacity is specified for a colorStop we need to multiply that opacity for the color opacity and set it as the global opacity for that color.
That behaviour come from the Gradient definition in SVG but we don't have to support that during real time rendering.
The gradient colorStop today is defined as:
This proposal is about removing the opacity:
Is a breaking change that removes no features and at worst doesn't change the speed of your particular code.
If we remove the opacity from the ColorStop, the developer can still specify a color with an opacity for the color property, if the developer is using a dynamic opacity for some visual effect, can still change the opacity dynamically of the color of the colorStop reusing the code that we want to delete:
Paying the same performance price when he change the opacity rather than when everyone needs to render the Gradient.
In my opinion this change has mostly PROS:
There are some CONS:
Beta Was this translation helpful? Give feedback.
All reactions