We now use the repaint system to do all the painting. During initialization, we set up a root layer that applies the device pixel ratio. Fixes #706