Roger Federer is through to the quarter-finals of the French Open after beating unseeded Leonardo Mayer in straight sets, 6-2, 6-3, 6-3.