Reduce typed array allocations on gradients.
Reduce typed array usage on setting/saving/restoring line dash.