using request animation frame to figure out when the layer is available for paint
Merge remote-tracking branch 'origin/master'