The 36-year-old marvel continues to defy the ageing process as he needed just 58 minutes to overpower the Serb with a brilliant display of Swiss timing.
"I was feeling like he was not loving my slice and I was also mixing in dropshots," said Federer who extended his perfect record this season to 14-0.
"I really I was able to mix up my game nicely, make it difficult for him.
"At the same time, have fun with my game, play a variation, but for the most part try to stay on the offensive."
Also Read
"I actually was explosive out there today and I felt good," he said. "So I'm very happy how things are turning out to be."
After handing back an early break to allow Krajinovic to draw level at two-all, Federer moved into cruise control.
At one point he won 17 straight points en route to taking a 6-2, 3-0 lead, winning 10 of the final 11 games in the match.
Federer, who is the defending champion and trying to win a record sixth title in the California desert, was on the centre stadium for the third day in a row.
He said playing matches three days in a row doesn't faze him.
"You've got to be ready for it. It's what tennis players do. We wait, we play, we wait again, we play again.
"In Rotterdam I played five matches in a row," he said. "Back in the day, I used to play six matches in a row.
"At the Masters 1000s, when the format was different, it was the best-of-five-set finals in the finals. Playing three matches in a row. I think I'm okay."
In the next round he faces Jeremy Chardy who beat fellow Frenchman Adrian Mannarino 7-5, 4-6, 6-1.
In other men's matches, American Taylor Fritz defeated Fernando Verdasco, of Spain, 4-6, 6-2, 7-6 (7/1), Croatia's Borna Coric breezed past Roberto Bautista 6-1, 6-3 and Pablo Carreno-Busta, of Spain, stopped Russian Daniil Medvedev 6-1, 7-5.
Disclaimer: No Business Standard Journalist was involved in creation of this content