• Zhigang Gong's avatar
    Refine CloseScreen and FreeScreen processes. · bf7d79dc
    Zhigang Gong authored
    This commit move the calling to glamor_close_screen from
    glamor_egl_free_screen to glamor_egl_close_screen, as this
    is the right place to do this.
    We should detach screen fbo and destroy the corresponding
    KHR image at glamor_egl_close_screen stage. As latter
    DDX driver will call DestroyPixmap to destroy screen pixmap,
    if the fbo and image are still there but glamor screen private
    data pointer has been freed, then it causes segfault.
    This commit also introduces a new flag GLAMOR_USE_EGL_SCREEN.
    if DDX driver is using EGL layer then should set this bit
    when call to glamor_init and then both glamor_close_screen
    and glamor_egl_close_screen will be registered correctly,
    DDX layer will not need to call these two functions manually.
    This way is also the preferred method within Xorg domain.
    As interfaces changed, bump the version to 0.3.0.
    Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
    Tested-by: default avatarPeng Li <peng.li@intel.com>
glamor.h 11.5 KB