* changes: Refactor RenderState and remove unused functionality. Fix crash when EGLSurface is no longer valid.