Add copySurfaceTye argument to copySurface function.