By Malathi Nayak and Gerry Shih SAN FRANCISCO (Reuters) – Zynga Inc will shed 15 percent of its workforce to slash costs and buy mobile game developer NaturalMotion for $527 million to refresh a stalled games pipeline, moves that sent its stock soaring 20 percent in after-hours trading. Chief Executive Officer Don Mattrick, hired last year, is taking aggressive action to revive a company that developed Farmville and once dominated gaming on Facebook Incs social network, but is now struggling to adapt to the rise of mobile gaming. Zyngas largest acquisition to date, NaturalMotion is a 12-year-old studio that has created games like Clumsy Ninja for Apple Inc mobile devices. NaturalMotion is known for its Euphoria game engine, whose simulation technology has helped create powerful visuals in games like Grand Theft Auto V.