[[ ThreadedRendering ]] Updated stack tile creation and rendering to platform indapendent level.
[[ ThreadedRendering ]] Put locks around stack id cache access.
[[ ThreadedRendering ]] Fixed minor bug in legacy gradients.