Would be good to avoid this duplication -- now that the actual rendering work is >1 line, it needs to be factored out.