Drew Pomeranz is eager to return to his top form from two years ago and forget an injury-shortened year in 2018.

The left-hander agreed Wednesday to a $1.5 million, one-year contract with the San Francisco Giants to provide depth in their rotation, and the deal includes $3.5 million in possible roster and performance bonuses.

Pomeranz is very familiar with the NL West, having pitched for Colorado and San Diego, and also knows the Bay Area. He spent the 2014-15 seasons with Oakland.

"The big thing for me was opportunity," Pomeranz said. "My big thing is getting back on track to doing what I can do and just being myself again because it's very frustrating when you have to fight through a year where you know this isn't me, how do I fix this, what I can I do to make this never happen again? In that regard, this just felt like a great fit for me."

He was an All-Star in 2016 for the San Diego Padres, who traded him to the Red Sox that season for right-hander Anderson Espinoza, then rated as Boston's top prospect.

That trade, and ones the Padres made with the Miami Marlins and Chicago White Sox that season, came with controversy. Padres general manager A.J. Preller was suspended for 30 days by Major League Baseball after team officials had instructed their organization's athletic trainers to maintain two distinct files of medical information on their players: one for industry consumption and the other for internal use, sources told ESPN.

Pomeranz pitched the past three years with Boston. He won a career-high 17 games for the Red Sox in 2017. But he went 2-6 with a 6.08 ERA last season and was limited to 11 starts and 26 appearances for the World Series champions because of two stints on the disabled list -- first with a strained left forearm followed by biceps tendinitis in his pitching arm.

He did not pitch in the World Series but was on the roster. If he can stay healthy, the 30-year-old Pomeranz gives the Giants a reliable arm in the rotation after two injury-plagued years by starters Madison Bumgarner, Johnny Cueto and Jeff Samardzija.

Pomeranz will be built up as a starter come spring training next month but also could be used out of the bullpen as needed.

"You go back to 2016 and `17 he was one of the best left-handed starters in baseball, made 30-plus starts both of those years, put up really good numbers," said Farhan Zaidi, new Giants president of baseball operations. "We value guys who have that flexibility but where we are as a staff with our depth in the bullpen, the need for innings and more of veteran presences on the rotation side, our plan is to bring him to be in the rotation."

Pomeranz began his throwing program earlier this offseason.

"It was a battle all year for me," he said. "There's zero lack of motivation for me this year. I've put in way more time than I have in a long time."

The Giants also re-signed lefty Derek Holland last week for one year and $7 million, so they have depth in the rotation -- and that's something Zaidi appreciates given how many injuries the staff has dealt with recently.

While Samardzija's throwing program "continues to go great," questions remain about how he will perform initially and how durable he will be. All indications are he will be ready for spring training and the start of the season, but the Giants are being cautious in expecting him to be able to make 32 to 34 starts.

"As of now, he's pretty much on schedule," Zaidi said.

Pomeranz can earn $1.5 million in active roster bonuses: $500,000 for opening day, $250,000 each for 90 and 120 days and $500,000 for 150 days.

He also has $500,000 in innings bonuses: $250,000 each for 25 and 50. And he has $1.5 million in bonuses for starts: $125,000 each for two, four, six and eight; $100,,000 apiece for 10, 14, 16, 18, 20, 24, 27 and 30, and $200,000 for 32.

"Obviously excited for another fresh start," Pomeranz said. "Last season for me personally was kind just one of those years where I just had to suck it up and fight through it and know that's not the normal me, it was just a fluke year kind of deal. I've worked really hard this offseason at getting back to where I was the previous years. I feel pretty good about where I'm at right now."

The Associated Press contributed to this report.