Moved canvas rendering logic to canvas view.