I'm not well versed enough in canvas to do a pull request for this. http://www.html5rocks.com/en/tutorials/canvas/hidpi/ explains things quite well though.