And second-seeded Rafael Nadal ended the run of Paris debutant Juan Ignacio Londero with a typically dominant 6-2 6-3 6-3 victory.
Federer, the 20-time Grand Slam champion, back at Roland Garros after a three-year hiatus, cruised through the opening rounds seemingly unchallenged and his last-16 encounter was no exception.
But things are likely to get trickier for Federer as the third seed will next face his old friend and 2015 champion Stan Wawrinka after the 34-year-old won an extraordinary contest against sixth seed Stefanos Tsitsipas.
The pair battled for five hours and nine minutes on Court Suzanne Lenglen before Wawrinka eventually triumphed 7-6(6) 5-7 6-4 3-6 8-6.
— Roland-Garros (@rolandgarros) June 2, 2019
After just over an hour in his match, Federer was already two sets up but Mayer offered some semblance of resistance in the third until the sixth game, when Federer, 37, broke decisively, ending his opponent’s ordeal on the first match point.
“I served super well and Leonardo had trouble returning. I was able to put pressure on him and I’m very happy with my performance,” Federer said.
Nadal also produced claycourt tennis of the highest quality to make the last eight of a Grand Slam event for the 38th time.
The Spaniard won his 90th match at the French Open as the 11-time champion cruised to victory against the 78th-ranked tournament debutant Londero in two hours and 13 minutes.
Nadal has only lost two matches at the tournament, in 2009 and 2015 and 13th quarterfinal appearance will move him one ahead of world No.1 Novak Djokovic, who can, however, draw level on Monday against German Jan-Lennard Struff.
Nadal must wait until Monday to see who he now meets out of Japanese seventh seed Kei Nishikori or unseeded Frenchman Benoit Paire after their match was suspended due to darkness, with Nishikori leading two sets to one.
16 August 2019
A fearless Andrey Rublev outfoxed Roger Federer 6-3 6-4 in the third round on Thursday in ... More
29 April 2016
Victory was never out of the question when Bernard Tomic faced 17-time Grand Slam champion... More
23 August 2019
The draws are out and the US Open is almost upon us. So it's time to delve into the storyl... More