xfree86/modes: Remove xf86_reload_cursors v2
No longer needed now that xf86CursorResetCursor is getting called for each CRTC configuration change. v2: Keep xf86_reload_cursors as a deprecated empty inline function until all drivers stop calling it. (Adam Jackson) Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
e156c0ccb5
commit
43dbc556f3
|
@ -508,11 +508,6 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (pScrn->pScreen &&
|
|
||||||
!xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE))
|
|
||||||
xf86_reload_cursors(pScrn->pScreen);
|
|
||||||
#endif
|
|
||||||
done:
|
done:
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
crtc->x = saved_x;
|
crtc->x = saved_x;
|
||||||
|
|
|
@ -968,14 +968,10 @@ extern _X_EXPORT Bool
|
||||||
xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags);
|
xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when anything on the screen is reconfigured.
|
* Superseeded by xf86CursorResetCursor, which is getting called
|
||||||
*
|
* automatically when necessary.
|
||||||
* Reloads cursor images as needed, then adjusts cursor positions.
|
|
||||||
*
|
|
||||||
* Driver should call this from crtc commit function.
|
|
||||||
*/
|
*/
|
||||||
extern _X_EXPORT void
|
static _X_INLINE _X_DEPRECATED void xf86_reload_cursors(ScreenPtr screen) {}
|
||||||
xf86_reload_cursors(ScreenPtr screen);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called from EnterVT to turn the cursors back on
|
* Called from EnterVT to turn the cursors back on
|
||||||
|
|
|
@ -640,63 +640,6 @@ xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags)
|
||||||
return xf86InitCursor(screen, cursor_info);
|
return xf86InitCursor(screen, cursor_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when anything on the screen is reconfigured.
|
|
||||||
*
|
|
||||||
* Reloads cursor images as needed, then adjusts cursor positions
|
|
||||||
* @note We assume that all hardware cursors to be loaded have already been
|
|
||||||
* found to be usable by the hardware.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
xf86_reload_cursors(ScreenPtr screen)
|
|
||||||
{
|
|
||||||
ScrnInfoPtr scrn;
|
|
||||||
xf86CrtcConfigPtr xf86_config;
|
|
||||||
xf86CursorInfoPtr cursor_info;
|
|
||||||
CursorPtr cursor;
|
|
||||||
int x, y;
|
|
||||||
xf86CursorScreenPtr cursor_screen_priv;
|
|
||||||
|
|
||||||
/* initial mode setting will not have set a screen yet.
|
|
||||||
May be called before the devices are initialised.
|
|
||||||
*/
|
|
||||||
if (!screen || !inputInfo.pointer)
|
|
||||||
return;
|
|
||||||
cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
|
|
||||||
xf86CursorScreenKey);
|
|
||||||
/* return if HW cursor is inactive, to avoid displaying two cursors */
|
|
||||||
if (!cursor_screen_priv || !cursor_screen_priv->isUp)
|
|
||||||
return;
|
|
||||||
|
|
||||||
scrn = xf86ScreenToScrn(screen);
|
|
||||||
xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
|
||||||
|
|
||||||
/* make sure the cursor code has been initialized */
|
|
||||||
cursor_info = xf86_config->cursor_info;
|
|
||||||
if (!cursor_info)
|
|
||||||
return;
|
|
||||||
|
|
||||||
cursor = xf86CurrentCursor(screen);
|
|
||||||
GetSpritePosition(inputInfo.pointer, &x, &y);
|
|
||||||
if (!(cursor_info->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN))
|
|
||||||
(*cursor_info->HideCursor) (scrn);
|
|
||||||
|
|
||||||
if (cursor) {
|
|
||||||
void *src =
|
|
||||||
dixLookupScreenPrivate(&cursor->devPrivates, CursorScreenKey,
|
|
||||||
screen);
|
|
||||||
if (cursor->bits->argb && xf86DriverHasLoadCursorARGB(cursor_info))
|
|
||||||
xf86DriverLoadCursorARGB(cursor_info, cursor);
|
|
||||||
else if (src)
|
|
||||||
xf86DriverLoadCursorImage(cursor_info, src);
|
|
||||||
|
|
||||||
x += scrn->frameX0 + cursor_screen_priv->HotX;
|
|
||||||
y += scrn->frameY0 + cursor_screen_priv->HotY;
|
|
||||||
(*cursor_info->SetCursorPosition) (scrn, x, y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up CRTC-based cursor code
|
* Clean up CRTC-based cursor code
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user