The defending champion's near-perfect serving ensured he needed only two breaks from the first two sets to take complete control against the hard-working Lacko.
Federer began at a steady pace and accelerated from there, executing a series of ruthless winners that had the Slovakian well out of his depth and ultimately thrashed in the third.
Tougher tests will undoubtedly lie in wait for Federer, but few will fancy their chances against the eight-time title-winner based on this evidence.
The match began with a lengthy rally that ended with Federer hitting long, Lacko fighting to hold his own early in the opener.
But Federer moved up a gear at 3-3 and broke when Lacko smashed wide. Although the Swiss squandered two opportunities for another break in his opponent's next service game, he then confidently served out the set to love.
A sensational forehand into the left corner of the court secured another Federer break after a steady start to the second, before the top seed saw out the set without dropping a single point on serve.
And Federer moved swiftly to wrap up victory, as Lacko was manoeuvred around the court to draw an error for a quick break, with the second that soon followed ensuring a comfortable finish.
A stunning, swerving drop shot brought about match point on Lacko's serve and Federer capitalised to the delight of an awestruck crowd.
Serena sails past Tomova and into round three
Serena Williams made short work of Viktoriya Tomova as she eased into the third round of Wimbledon in straight sets.
Having seen off Arantxa Rus in straights in the first round, Williams - controversially seeded 25th despite having spent much of the year off following the birth of her first child - was typically destructive in seeing off the qualifier 6-1 6-4 in an hour and six minutes.
Tomova, competing in just the second grand slam main draw of her career, never looked like being a match for the 23-time major winner, who has yet to receive a real test of her credentials as a contender for the Venus Rosewater Dish.
The winner of Kristina Mladenovic's clash with Tatjana Maria awaits in round three, but a prospective fourth-round clash with Madison Keys, seen as one of her successors at the top of American women's tennis, is more likely to provide a clearer indication of whether she is capable of winning a tournament with just three of the top eight seeds still in the draw.
A foreboding sign of things to come for Tomova was provided in her first service game as a wonderful cross-court forehand put Williams up 30-0, though the Bulgarian was able to survive a break point and hold.
However, Tomova could not fend off the second break point she faced, which came on the back of a double fault, firing long to hand Williams the initiative.
Williams grew increasingly brutal in dispatching the Tomova serve in the fifth game of the contest and was equally dismissive of an attempted lob from her opponent, an emphatic smash bringing about the double break, before Tomova thudded a forehand into the net to concede the set.
Tomova played with more freedom and belief in the second, saving three break points at the start of the set, but two games later she was broken to love courtesy of a limp netted backhand.
Still the increasingly competitive nature of the contest was relished by Williams, who let out a roar after a cross-court backhand winner brought up another break point that Tomova saved, before applauding the 23-year-old as she survived a match point and forced her to successfully serve it out.
Second seed Wozniacki bows out to Makarova
World number two Caroline Wozniacki was the latest big name to tumble out of Wimbledon as she lost 6-4 1-6 7-5 to Ekaterina Makarova in the second round.
Wozniacki won the Nature Valley International title at Eastbourne last week, but she has never been beyond the fourth round at the All England Club and largely looked off the pace throughout on Wednesday, joining pre-tournament favourite Petra Kvitova in making an early exit.
The Dane, who claimed her first grand slam title at the Australian Open, was undone by the powerful Makarova in the opener, the Russian holding off a fightback to clinch the set with a forehand winner down the line.
And Wozniacki then spent much of the second set complaining about the conditions on Number One Court, even as she came roaring back into the contest.
The second seed grew frustrated by the vast number of insects buzzing around the arena - telling the chair umpire "I am here to focus on playing tennis, not eating bugs", while she appeared to be struggling with her footing on a slippery court later on.
Makarova rallied but squandered four match points and gave up a two-break lead, before finally brilliantly sealing victory with a lengthy rally to set up a contest with Lucie Safarova.
With Wozniacki and Kvitova - a two-time champion - both out, the likes of French Open victor Simona Halep, defending champion Garbine Muguruza and Serena Williams will fancy their chances of going all the way.
STATISTICAL BREAKDOWN Federer bt Lacko 6-4 6-4 6-1
WINNERS/UNFORCED ERRORS Federer - 47/11 Lacko - 21/15
ACES/DOUBLE FAULTS Federer - 16/0 Lacko - 6/4
BREAK POINTS WON Federer - 4/8 Lacko - 0/0
FIRST SERVE PERCENTAGE Federer - 70 Lacko - 58
PERCENTAGE OF POINTS WON ON FIRST/SECOND SERVE Federer - 93/67 Lacko - 67/43
TOTAL POINTS Federer - 90 Lacko - 60
STATISTICAL BREAKDOWN Williams bt Tomova 6-1 6-4
WINNERS/UNFORCED ERRORS Williams - 24/16 Tomova - 14/7
ACES/DOUBLE FAULTS Williams - 4/4 Tomova - 1/2
BREAK POINTS WON Williams - 3/9 Tomova - 0/1
FIRST SERVE PERCENTAGE Williams - 64 Tomova - 70
PERCENTAGE OF POINTS WON ON FIRST/SECOND SERVE Williams - 84/56 Tomova - 47/63
TOTAL POINTS Williams - 68 Tomova - 46
Source: OPTA/OmniSport