Refactor canvas building in renderer.