Forming a polymer layer by liquid coating