diff options
author | Keith Packard <keithp@keithp.com> | 2010-12-05 20:55:46 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-12-06 20:08:58 -0800 |
commit | a88d70fb20a2bc3152b84adff4380857e6cfadf5 (patch) | |
tree | 0451c44070ae0d6d3ba3b194d26aca609dba27e5 | |
parent | 96b4d4787bf82edd9d06eb9a6e94bc45412c7df2 (diff) |
Set sprite transforms from RRSetCrtcConfigs
These were getting ignored.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
-rw-r--r-- | hw/xfree86/modes/xf86RandR12.c | 4 | ||||
-rw-r--r-- | randr/mirrcrtc.c | 23 | ||||
-rw-r--r-- | randr/randrstr.h | 6 | ||||
-rw-r--r-- | randr/rrcrtc.c | 27 |
4 files changed, 33 insertions, 27 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index b0eabdd80..dfe2cc33f 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -1819,8 +1819,8 @@ xf86RRConvertCrtcConfig(xf86CrtcSetConfigPtr xf86_config, return FALSE; for (o = 0; o < rr_config->numOutputs; o++) xf86_config->outputs[o] = rr_config->outputs[o]->devPrivate; - xf86_config->sprite_position_transform = rr_config->sprite_position_transform; - xf86_config->sprite_image_transform = rr_config->sprite_image_transform; + xf86_config->sprite_position_transform = rr_config->sprite_position_f_transform; + xf86_config->sprite_image_transform = rr_config->sprite_image_f_transform; xf86_config->pixmap = rr_config->pixmap; xf86_config->pixmap_x = rr_config->pixmap_x; xf86_config->pixmap_y = rr_config->pixmap_y; diff --git a/randr/mirrcrtc.c b/randr/mirrcrtc.c index cc76797d6..d493a0e88 100644 --- a/randr/mirrcrtc.c +++ b/randr/mirrcrtc.c @@ -60,14 +60,21 @@ miRRSetCrtcConfig(RRCrtcConfigPtr crtc_config) x = crtc_config->pixmap_x; y = crtc_config->pixmap_y; } - return RRCrtcSet(crtc_config->crtc, - crtc_config->mode, - x, - y, - crtc_config->rotation, - crtc_config->numOutputs, - crtc_config->outputs, - crtc_config->pixmap); + if (!RRCrtcSet(crtc_config->crtc, + crtc_config->mode, + x, + y, + crtc_config->rotation, + crtc_config->numOutputs, + crtc_config->outputs, + crtc_config->pixmap)) + return FALSE; + RRCrtcSpriteTransformSet(crtc_config->crtc, + &crtc_config->sprite_position_transform, + &crtc_config->sprite_image_transform, + &crtc_config->sprite_position_f_transform, + &crtc_config->sprite_image_f_transform); + return TRUE; } Bool diff --git a/randr/randrstr.h b/randr/randrstr.h index c23197219..8240824db 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -154,8 +154,10 @@ struct _rrCrtcConfig { Rotation rotation; int numOutputs; RROutputPtr *outputs; - struct pict_f_transform sprite_position_transform; - struct pict_f_transform sprite_image_transform; + PictTransform sprite_position_transform; + PictTransform sprite_image_transform; + struct pict_f_transform sprite_position_f_transform; + struct pict_f_transform sprite_image_f_transform; PixmapPtr pixmap; int pixmap_x, pixmap_y; }; diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index 12982a896..0b2bc28c5 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -430,8 +430,10 @@ RRCrtcCurrentConfig(RRCrtcPtr crtc, if (!crtc_config->outputs) return FALSE; memcpy(crtc_config->outputs, crtc->outputs, crtc->numOutputs * sizeof (RROutputPtr)); - crtc_config->sprite_position_transform = crtc->client_sprite_f_position_transform; - crtc_config->sprite_image_transform = crtc->client_sprite_f_image_transform; + crtc_config->sprite_position_transform = crtc->client_sprite_position_transform; + crtc_config->sprite_image_transform = crtc->client_sprite_image_transform; + crtc_config->sprite_position_f_transform = crtc->client_sprite_f_position_transform; + crtc_config->sprite_image_f_transform = crtc->client_sprite_f_image_transform; /* XXX add pixmap stuff */ crtc_config->pixmap = NULL; @@ -718,8 +720,8 @@ RRScreenCoversCrtc(RRScreenConfigPtr screen_config, crtc_config->mode->mode.width, crtc_config->mode->mode.height, crtc_config->rotation, client_transform, - &crtc_config->sprite_position_transform, - &crtc_config->sprite_image_transform, + &crtc_config->sprite_position_f_transform, + &crtc_config->sprite_image_f_transform, NULL, &f_transform, NULL, NULL, NULL, NULL); RRModeGetScanoutSize (crtc_config->mode, &f_transform, @@ -1469,15 +1471,6 @@ ProcRRGetCrtcTransform (ClientPtr client) return Success; } -static void -pixman_f_transform_from_xRenderTransform(struct pixman_f_transform *f_transform, - xRenderTransform *x_transform) -{ - struct pixman_transform transform; - PictTransform_from_xRenderTransform(&transform, x_transform); - pixman_f_transform_from_pixman_transform(f_transform, &transform); -} - static int RRConvertCrtcConfig(ClientPtr client, ScreenPtr screen, RRScreenConfigPtr screen_config, @@ -1594,10 +1587,14 @@ RRConvertCrtcConfig(ClientPtr client, ScreenPtr screen, config->rotation = x->rotation; config->numOutputs = x->nOutput; config->outputs = outputs; - pixman_f_transform_from_xRenderTransform(&config->sprite_position_transform, + PictTransform_from_xRenderTransform(&config->sprite_position_transform, &x->spritePositionTransform); - pixman_f_transform_from_xRenderTransform(&config->sprite_image_transform, + PictTransform_from_xRenderTransform(&config->sprite_image_transform, &x->spriteImageTransform); + pixman_f_transform_from_pixman_transform(&config->sprite_position_f_transform, + &config->sprite_position_transform); + pixman_f_transform_from_pixman_transform(&config->sprite_image_f_transform, + &config->sprite_image_transform); config->pixmap = pixmap; config->pixmap_x = x->xPixmap; config->pixmap_y = x->yPixmap; |