Merge "Distinguish between createSurface error codes." into pi-dev