Stop getting the canvas and context every frame