refactor scale_surface, and add old version as "legacy linear" option