summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-02-23 11:17:29 -0800
committerKeith Packard <keithp@keithp.com>2011-02-23 11:17:29 -0800
commit7b7cd3f121b3904ad851155f853ce87a0e00d002 (patch)
tree5c2d2a1de14f3f1af423359e2d87732796e5dac4 /randr
parentfd9331f6eb39a28da7de4867b2e3a460f667d514 (diff)
Revert "Set sprite transforms from RRSetCrtcConfigs"
Diffstat (limited to 'randr')
-rw-r--r--randr/mirrcrtc.c23
-rw-r--r--randr/randrstr.h6
-rw-r--r--randr/rrcrtc.c27
3 files changed, 25 insertions, 31 deletions
diff --git a/randr/mirrcrtc.c b/randr/mirrcrtc.c
index d493a0e88..cc76797d6 100644
--- a/randr/mirrcrtc.c
+++ b/randr/mirrcrtc.c
@@ -60,21 +60,14 @@ miRRSetCrtcConfig(RRCrtcConfigPtr crtc_config)
x = crtc_config->pixmap_x;
y = crtc_config->pixmap_y;
}
- 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;
+ return RRCrtcSet(crtc_config->crtc,
+ crtc_config->mode,
+ x,
+ y,
+ crtc_config->rotation,
+ crtc_config->numOutputs,
+ crtc_config->outputs,
+ crtc_config->pixmap);
}
Bool
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 8240824db..c23197219 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -154,10 +154,8 @@ struct _rrCrtcConfig {
Rotation rotation;
int numOutputs;
RROutputPtr *outputs;
- PictTransform sprite_position_transform;
- PictTransform sprite_image_transform;
- struct pict_f_transform sprite_position_f_transform;
- struct pict_f_transform sprite_image_f_transform;
+ struct pict_f_transform sprite_position_transform;
+ struct pict_f_transform sprite_image_transform;
PixmapPtr pixmap;
int pixmap_x, pixmap_y;
};
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 0b2bc28c5..12982a896 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -430,10 +430,8 @@ 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_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;
+ crtc_config->sprite_position_transform = crtc->client_sprite_f_position_transform;
+ crtc_config->sprite_image_transform = crtc->client_sprite_f_image_transform;
/* XXX add pixmap stuff */
crtc_config->pixmap = NULL;
@@ -720,8 +718,8 @@ RRScreenCoversCrtc(RRScreenConfigPtr screen_config,
crtc_config->mode->mode.width, crtc_config->mode->mode.height,
crtc_config->rotation,
client_transform,
- &crtc_config->sprite_position_f_transform,
- &crtc_config->sprite_image_f_transform,
+ &crtc_config->sprite_position_transform,
+ &crtc_config->sprite_image_transform,
NULL, &f_transform, NULL, NULL, NULL, NULL);
RRModeGetScanoutSize (crtc_config->mode, &f_transform,
@@ -1471,6 +1469,15 @@ 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,
@@ -1587,14 +1594,10 @@ RRConvertCrtcConfig(ClientPtr client, ScreenPtr screen,
config->rotation = x->rotation;
config->numOutputs = x->nOutput;
config->outputs = outputs;
- PictTransform_from_xRenderTransform(&config->sprite_position_transform,
+ pixman_f_transform_from_xRenderTransform(&config->sprite_position_transform,
&x->spritePositionTransform);
- PictTransform_from_xRenderTransform(&config->sprite_image_transform,
+ pixman_f_transform_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;