Skip to content
  • Faith Ekstrand's avatar
    modesetting: Refactor drmmode_glamor_new_screen_pixmap · b4703a5a
    Faith Ekstrand authored and Keith Packard's avatar Keith Packard committed
    
    
    The original drmmode_glamor_new_screen_pixmap function was specific to the
    primary screen pixmap.  This commit pulls the guts out into a new, more
    general, drmmode_set_pixmap_bo function for setting a buffer on a pixmap.
    The new function also properly tears down the glamor bits if the buffer
    being set is NULL.  The drmmode_glamor_new_screen_pixmap function is now
    just a 3-line wrapper around drmmode_set_pixmap_bo.
    
    v2 Jason Ekstrand <jason.ekstrand@intel.com>:
     - Re-arranged code in drmmode_set_pixmap_bo and
       drmmode_glamor_handle_new_screen_pixmap so that glamor_set_screen_pixmap
       only gets called for the screen pixmap
     - Guard the call to glamor_set_screen_pixmapa with a drmmode->glamor check
    
    Signed-off-by: default avatarJason Ekstrand <jason.ekstrand@intel.com>
    Reviewed-by: default avatarKeith Packard <keithp@keithp.com>
    Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
    b4703a5a