The 37-year-old played effortlessly, smacking winners around the court with self-confidence.
Mayer offered some semblance of resistance in the third set until the sixth game, when Federer broke decisively, ending his opponent's ordeal on the first match point.
"Big serving, windy, it was tough conditions. We didn't have many baseline rallies that were sort of neutral," said Federer.
"Either one was always pressing and the other guy was defending."
It was Mayer who did most of the defending against Federer, who won his only French Open title 10 years ago.
Federer showed off his repertoire -- the single-handed backhand, some chip-and-charge tennis, sliced backhands -- to dispatch the Argentine on Court Philippe Chatrier.
With the Big Three -- Federer, Nadal and world number one Novak Djokovic -- showing little signs of giving up their stranglehold of men's tennis, the Swiss is aware that when they do eventually retire, it will leave a gaping hole in the sport.