Merge "return an error when Surface::lock() is called while the surface is already locked."