BitmapImage is lighter weight than Image so if you don't need any features of the spark Image then BitmapImage is recommended.
BitmapImage is a lightweight GraphicElement that (typically) needs to be inside of a Group. If you add a Group to your renderer and put the BitmapImage inside of it that should be faster than just adding a spark Image (make sure to test to verify this in your case).
In the case of IconItemRenderer it has an extra optimization that allows it to handle a BitmapImage directly without requiring an extra Group. This is done by implementing the IGraphicElementContainer and ISharedDisplayObject interfaces.
Thank you, much clearer now.
I was aware that I can add it to a Group, but was worried Group+BitmapImage >> Image.
I studied the IconItemRenderer pretty good, and the only part that is still blurry, is the iconDisplay and all of its family of other auxiliary properties and namespace.
In anycase, I've decided to extend IconItemRenderer instead of LabelItemRender+own creation of decorator.
It seems to me that the IconItemRenderer is much faster and reliable for extending than the LabelItemRenderer (which is inherited by the IconItemRenderer).
1 person found this helpful
The desktop ImageSkin has a few Groups in it which is why I suspect that a simple Group + BitmapImage would be faster. On mobile the ImageSkin is optimized so the difference might not be as obvious. I suspect that Group + BitmapImage is faster, but haven't verified that. As with any performance work you should probably test spark Image vs. Group + BitmapImage to know for sure.
Yup, thanks again.