Fork us on GitHub

Performant Radial Gradients

Fast radial rendering on iOS and Android
Performant Radial Gradients

Performant Radial Gradients

One of the first Codename One performance tips is: "Don’t use gradients". We already wrote about improved performance to gradients in the past but that covered linear gradients and didn’t cover radials on iOS.

With recent commits radial gradients are now performant on iOS/Android and elsewhere. On iOS Steve implemented gradients as a shader which should deliver great performance.

I’m not sure if this is good enough to deliver the level of performance we see from image borders and it’s harder to work with low level graphics primitives.

I think the old assessments still stand. Gradients perform better so it might not be a problem to use them, but I would still use & recommend images over them.

Share this Post:

Posted by Shai Almog

Shai is the co-founder of Codename One. He's been a professional programmer for over 25 years. During that time he has worked with dozens of companies including Sun Microsystems.
For more follow Shai on Twitter & github.