Esempio n. 1
0
/*
 * Load a cursor image into all active CRTCs
 */
static void
xf86_load_cursor_image(ScrnInfoPtr scrn, unsigned char *src)
{
    xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
    int c;

    for (c = 0; c < xf86_config->num_crtc; c++) {
        xf86CrtcPtr crtc = xf86_config->crtc[c];

        if (crtc->enabled) {
            if (crtc->funcs->load_cursor_image)
                xf86_crtc_load_cursor_image(crtc, src);
            else if (crtc->funcs->load_cursor_argb)
                xf86_crtc_convert_cursor_to_argb(crtc, src);
        }
    }
}
Esempio n. 2
0
/*
 * Load a cursor image into all active CRTCs
 */
static Bool
xf86_load_cursor_image(ScrnInfoPtr scrn, unsigned char *src)
{
    xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
    int c;

    for (c = 0; c < xf86_config->num_crtc; c++) {
        xf86CrtcPtr crtc = xf86_config->crtc[c];

        if (crtc->enabled) {
            if (xf86_driver_has_load_cursor_image(crtc)) {
                if (!xf86_crtc_load_cursor_image(crtc, src))
                    return FALSE;
            } else if (xf86_driver_has_load_cursor_argb(crtc)) {
                if (!xf86_crtc_convert_cursor_to_argb(crtc, src))
                    return FALSE;
            } else
                return FALSE;
        }
    }
    return TRUE;
}