set correct size on glViewport when using CALayer