[PATCH 5/6] cursor: add hw cursor support for prime

Michel Dänzer michel at daenzer.net
Sun Jun 14 23:22:32 PDT 2015


On 15.06.2015 08:25, Dave Airlie wrote:
> @@ -165,6 +209,30 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y)
>      return TRUE;
>  }
>  
> +Bool
> +xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y)
> +{
> +    ScreenPtr pSlave;
> +    PixmapDirtyUpdatePtr ent;
> +    Bool ret;
> +
> +    ret = xf86ScreenSetCursor(pScreen, pCurs, x, y);
> +    if (ret == FALSE)
> +        return FALSE;
> +
> +    if (xorg_list_is_empty(&pScreen->pixmap_dirty_list))
> +        return TRUE;
> +
> +    /* ask each driver consuming a pixmap if it can support HW cursor */
> +    xorg_list_for_each_entry(ent, &pScreen->pixmap_dirty_list, ent) {
> +        pSlave = ent->slave_dst->drawable.pScreen;
> +        ret = xf86ScreenSetCursor(pSlave, pCurs, x, y);
> +        if (ret == FALSE)
> +            return ret;
> +    }
> +    return TRUE;
> +}
> +
>  void
>  xf86SetTransparentCursor(ScreenPtr pScreen)
>  {

[...]

> @@ -202,6 +270,24 @@ xf86MoveCursor(ScreenPtr pScreen, int x, int y)
>  }
>  
>  void
> +xf86MoveCursor(ScreenPtr pScreen, int x, int y)
> +{
> +    ScreenPtr pSlave;
> +    PixmapDirtyUpdatePtr ent;
> +
> +    xf86ScreenMoveCursor(pScreen, x, y);
> +
> +    if (xorg_list_is_empty(&pScreen->pixmap_dirty_list))
> +        return;
> +
> +    /* ask each driver consuming a pixmap if it can support HW cursor */
> +    xorg_list_for_each_entry(ent, &pScreen->pixmap_dirty_list, ent) {
> +        pSlave = ent->slave_dst->drawable.pScreen;
> +        xf86ScreenMoveCursor(pSlave, x, y);
> +    }
> +}
> +
> +void
>  xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed)
>  {
>      xf86CursorScreenPtr ScreenPriv =
> 

The comments in these two functions look off.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list