Factorises out existing surface initialisation code to reuse. (cherry picked from commit eaa5e071)
Attach a file by drag & drop or click to upload