HardwareRender: reorder EGL calls for onTerminate override