aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/modes
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-04-13 14:24:56 +0200
committermarha <marha@users.sourceforge.net>2014-04-13 14:24:56 +0200
commitd2ad10d03be8e6d4b150bbdf2a28ea3d5a18a2ed (patch)
tree2a860c9d687826b3cb48facfa21c616e14e69347 /xorg-server/hw/xfree86/modes
parentedb5b380994125bf33929ef7dc5a3c456dfbe93b (diff)
downloadvcxsrv-d2ad10d03be8e6d4b150bbdf2a28ea3d5a18a2ed.tar.gz
vcxsrv-d2ad10d03be8e6d4b150bbdf2a28ea3d5a18a2ed.tar.bz2
vcxsrv-d2ad10d03be8e6d4b150bbdf2a28ea3d5a18a2ed.zip
fontconfig libxcb mesa xserver xcb-proto git update 13 Apr 2014
xserver commit 3028ae6c9aa37168e249e0d847b29f8e3efb05b2 libxcb commit 29e419c5840a1eeda3336a0802686ee723dcaab3 libxcb/xcb-proto commit 70fea02b7d90d86e9d3b0dc5b61406bf4c910999 pixman commit 4b76bbfda670f9ede67d0449f3640605e1fc4df0 fontconfig commit f44157c809d280e2a0ce87fb078fc4b278d24a67 mesa commit 936dda08ee6d7b2be2b016bc06780e401088ec13
Diffstat (limited to 'xorg-server/hw/xfree86/modes')
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.h4
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Cursors.c35
2 files changed, 24 insertions, 15 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.h b/xorg-server/hw/xfree86/modes/xf86Crtc.h
index c127d78af..5407deb0e 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.h
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.h
@@ -186,13 +186,13 @@ typedef struct _xf86CrtcFuncs {
/**
* Load monochrome image
*/
- void
+ Bool
(*load_cursor_image) (xf86CrtcPtr crtc, CARD8 *image);
/**
* Load ARGB image
*/
- void
+ Bool
(*load_cursor_argb) (xf86CrtcPtr crtc, CARD32 *image);
/**
diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c
index 2b0db3492..10ef6f6d4 100644
--- a/xorg-server/hw/xfree86/modes/xf86Cursors.c
+++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c
@@ -211,7 +211,7 @@ set_bit(CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask)
/*
* Load a two color cursor into a driver that supports only ARGB cursors
*/
-static void
+static Bool
xf86_crtc_convert_cursor_to_argb(xf86CrtcPtr crtc, unsigned char *src)
{
ScrnInfoPtr scrn = crtc->scrn;
@@ -244,7 +244,7 @@ xf86_crtc_convert_cursor_to_argb(xf86CrtcPtr crtc, unsigned char *src)
bits = 0;
cursor_image[y * cursor_info->MaxWidth + x] = bits;
}
- crtc->funcs->load_cursor_argb(crtc, cursor_image);
+ return crtc->funcs->load_cursor_argb(crtc, cursor_image);
}
/*
@@ -415,7 +415,7 @@ xf86_set_cursor_position(ScrnInfoPtr scrn, int x, int y)
/*
* Load a two-color cursor into a crtc, performing rotation as needed
*/
-static void
+static Bool
xf86_crtc_load_cursor_image(xf86CrtcPtr crtc, CARD8 *src)
{
ScrnInfoPtr scrn = crtc->scrn;
@@ -450,13 +450,13 @@ xf86_crtc_load_cursor_image(xf86CrtcPtr crtc, CARD8 *src)
set_bit(cursor_image, cursor_info, x, y, TRUE);
}
}
- crtc->funcs->load_cursor_image(crtc, cursor_image);
+ return crtc->funcs->load_cursor_image(crtc, cursor_image);
}
/*
* Load a cursor image into all active CRTCs
*/
-static void
+static Bool
xf86_load_cursor_image(ScrnInfoPtr scrn, unsigned char *src)
{
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
@@ -466,12 +466,17 @@ xf86_load_cursor_image(ScrnInfoPtr scrn, unsigned char *src)
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);
+ if (crtc->funcs->load_cursor_image) {
+ if (!xf86_crtc_load_cursor_image(crtc, src))
+ return FALSE;
+ } else if (crtc->funcs->load_cursor_argb) {
+ if (!xf86_crtc_convert_cursor_to_argb(crtc, src))
+ return FALSE;
+ } else
+ return FALSE;
}
}
+ return TRUE;
}
static Bool
@@ -516,7 +521,7 @@ xf86_use_hw_cursor_argb(ScreenPtr screen, CursorPtr cursor)
return TRUE;
}
-static void
+static Bool
xf86_crtc_load_cursor_argb(xf86CrtcPtr crtc, CursorPtr cursor)
{
ScrnInfoPtr scrn = crtc->scrn;
@@ -544,10 +549,10 @@ xf86_crtc_load_cursor_argb(xf86CrtcPtr crtc, CursorPtr cursor)
cursor_image[y * image_width + x] = bits;
}
- crtc->funcs->load_cursor_argb(crtc, cursor_image);
+ return crtc->funcs->load_cursor_argb(crtc, cursor_image);
}
-static void
+static Bool
xf86_load_cursor_argb(ScrnInfoPtr scrn, CursorPtr cursor)
{
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
@@ -557,8 +562,10 @@ xf86_load_cursor_argb(ScrnInfoPtr scrn, CursorPtr cursor)
xf86CrtcPtr crtc = xf86_config->crtc[c];
if (crtc->enabled)
- xf86_crtc_load_cursor_argb(crtc, cursor);
+ if (!xf86_crtc_load_cursor_argb(crtc, cursor))
+ return FALSE;
}
+ return TRUE;
}
Bool
@@ -608,6 +615,8 @@ xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags)
* 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