Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCreate a simpler RadialGradient DisplayItem #996
Conversation
|
Note that with |
|
So another way of doing this could keep one display item with all the properties for both, and then optimize to a better shader for things like the gradient having the same start and end center. The reason I didn't go that way was mostly because the display item would need to support either
I am open to ways of keeping one DisplayItem because internally we can optimize for the specific type of gradient. SVG and |
|
I think that moz-element should be treated generically (render in an intermediate surface and composite it using the image primitive), since it needs to support any kind of content. I don't think we should worry about it for now. |
|
|
|
|
A RadialGradient is designed to support the properties needed for a CSS radial-gradient(). It has a center, a radius X, a radius Y, a collection of stops, and a repeat flag. This means it can be an ellipse or a circle. The prim fragment shader does its calculations on a sphere, so the prim vertex shader sets up a scale transform for ellipses if needed.
Borders will be better suited to use RadialGradientDisplayItem.
|
Apologies for not getting to this one yet - it looks like the plan is to simplify the items (based on reading the #gfx logs)? If so, should I wait for those changes before looking at this now? |
|
|
|
@glennw Yes, the new plan is to not split the RadialGradient display item. That should be simpler and easier to maintain. I'll close this PR and open a new one for the new branch of work. |
eqrion commentedMar 20, 2017
•
edited by larsbergstrom
RadialGradient has more properties in common with SVG radialGradients
than with CSS radial-gradients().
We can simplify the shaders by changing the DisplayItem to be more in line
with CSS radial-gradients(). The existing RadialGradient can then be
renamed to ComplexRadialGradient
This change is