mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-09 11:10:17 +01:00
xfree86/modes: Refactor xf86_use_hw_cursor_argb to use xf86_use_hw_cursor (v2)
This reduces code duplication.
v2: No functional change this time.
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit c3e4e9fc5d)
This commit is contained in:
parent
87c23dc471
commit
af87ab6287
1 changed files with 2 additions and 8 deletions
|
|
@ -535,19 +535,13 @@ xf86_use_hw_cursor_argb(ScreenPtr screen, CursorPtr cursor)
|
|||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
|
||||
cursor = RefCursor(cursor);
|
||||
if (xf86_config->cursor)
|
||||
FreeCursor(xf86_config->cursor, None);
|
||||
xf86_config->cursor = cursor;
|
||||
if (!xf86_use_hw_cursor(screen, cursor))
|
||||
return FALSE;
|
||||
|
||||
/* Make sure ARGB support is available */
|
||||
if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0)
|
||||
return FALSE;
|
||||
|
||||
if (cursor->bits->width > cursor_info->MaxWidth ||
|
||||
cursor->bits->height > cursor_info->MaxHeight)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue