aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/modes/xf86Rotate.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-12-08 16:07:08 +0000
committermarha <marha@users.sourceforge.net>2010-12-08 16:07:08 +0000
commit8308417ba79394ca96a326c8cb5c36024b36c1e2 (patch)
treec6e087e837c83457b68a7a10363af47778a9b1b7 /xorg-server/hw/xfree86/modes/xf86Rotate.c
parentfea28ce54ffbea6eda28791518ccca0e0df2df0d (diff)
parent531a0d974b98074978535f086a73b6b662fa0cea (diff)
downloadvcxsrv-8308417ba79394ca96a326c8cb5c36024b36c1e2.tar.gz
vcxsrv-8308417ba79394ca96a326c8cb5c36024b36c1e2.tar.bz2
vcxsrv-8308417ba79394ca96a326c8cb5c36024b36c1e2.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xfree86/modes/xf86Rotate.c')
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Rotate.c44
1 files changed, 42 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86Rotate.c b/xorg-server/hw/xfree86/modes/xf86Rotate.c
index 655857597..0181bc381 100644
--- a/xorg-server/hw/xfree86/modes/xf86Rotate.c
+++ b/xorg-server/hw/xfree86/modes/xf86Rotate.c
@@ -369,6 +369,39 @@ xf86CrtcFitsScreen (xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb)
0 <= b.y1 && b.y2 <= pScrn->virtualY);
}
+/*
+ * A subset of xf86CrtcRotate that just deals with
+ * cursor image/position transforms. Used when changing
+ * the cursor transform
+ */
+void
+xf86CrtcRotateCursor (xf86CrtcPtr crtc)
+{
+ /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
+ RRTransformPtr transform = NULL;
+ PictTransform crtc_to_fb;
+ struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc, f_screen_to_crtc, f_crtc_to_cursor;
+
+ if (crtc->transformPresent)
+ transform = &crtc->transform;
+
+ (void) RRTransformCompute (crtc->x, crtc->y,
+ crtc->mode.HDisplay, crtc->mode.VDisplay,
+ crtc->rotation,
+ transform,
+ &crtc->user_sprite_position_transform,
+ &crtc->user_sprite_image_transform,
+
+ &crtc_to_fb,
+ &f_crtc_to_fb,
+ &f_fb_to_crtc,
+ &f_screen_to_crtc,
+ &f_crtc_to_cursor,
+ &crtc->sprite_transform_in_use);
+ crtc->f_screen_to_crtc = f_screen_to_crtc;
+ crtc->f_crtc_to_cursor = f_crtc_to_cursor;
+}
+
Bool
xf86CrtcRotate (xf86CrtcPtr crtc)
{
@@ -377,7 +410,7 @@ xf86CrtcRotate (xf86CrtcPtr crtc)
/* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
PictTransform crtc_to_fb;
- struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+ struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc, f_screen_to_crtc, f_crtc_to_cursor;
xFixed *new_params = NULL;
int new_nparams = 0;
PictFilterPtr new_filter = NULL;
@@ -393,10 +426,15 @@ xf86CrtcRotate (xf86CrtcPtr crtc)
crtc->mode.HDisplay, crtc->mode.VDisplay,
crtc->rotation,
transform,
+ &crtc->user_sprite_position_transform,
+ &crtc->user_sprite_image_transform,
&crtc_to_fb,
&f_crtc_to_fb,
- &f_fb_to_crtc) &&
+ &f_fb_to_crtc,
+ &f_screen_to_crtc,
+ &f_crtc_to_cursor,
+ &crtc->sprite_transform_in_use) &&
xf86CrtcFitsScreen (crtc, &f_crtc_to_fb))
{
/*
@@ -505,6 +543,8 @@ xf86CrtcRotate (xf86CrtcPtr crtc)
crtc->crtc_to_framebuffer = crtc_to_fb;
crtc->f_crtc_to_framebuffer = f_crtc_to_fb;
crtc->f_framebuffer_to_crtc = f_fb_to_crtc;
+ crtc->f_screen_to_crtc = f_screen_to_crtc;
+ crtc->f_crtc_to_cursor = f_crtc_to_cursor;
free(crtc->params);
crtc->params = new_params;
crtc->nparams = new_nparams;