summaryrefslogtreecommitdiff
path: root/render/render.c
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-23 10:11:47 -0700
committerJamey Sharp <jamey@minilop.net>2010-06-03 14:03:23 -0700
commita83cff9f4d622b069c96a68b4e87a669bf1f6446 (patch)
treeb29de5e363feb6b7546ce69dfa0685316bf0b234 /render/render.c
parent217ccaa5a341018457f468a774c035c0df47d918 (diff)
Move each screen's x/y origin into ScreenRec.
Many references to the dixScreenOrigins array already had the corresponding screen pointer handy, which meant they usually looked like "dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix declared the dixScreenOrigins array, I figure allocating a screen private for these values is overkill. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
Diffstat (limited to 'render/render.c')
-rw-r--r--render/render.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/render/render.c b/render/render.c
index 11c092776..78ecf43b7 100644
--- a/render/render.c
+++ b/render/render.c
@@ -2832,22 +2832,22 @@ PanoramiXRenderComposite (ClientPtr client)
stuff->src = src->info[j].id;
if (src->u.pict.root)
{
- stuff->xSrc = orig.xSrc - dixScreenOrigins[j].x;
- stuff->ySrc = orig.ySrc - dixScreenOrigins[j].y;
+ stuff->xSrc = orig.xSrc - screenInfo.screens[j]->x;
+ stuff->ySrc = orig.ySrc - screenInfo.screens[j]->y;
}
stuff->dst = dst->info[j].id;
if (dst->u.pict.root)
{
- stuff->xDst = orig.xDst - dixScreenOrigins[j].x;
- stuff->yDst = orig.yDst - dixScreenOrigins[j].y;
+ stuff->xDst = orig.xDst - screenInfo.screens[j]->x;
+ stuff->yDst = orig.yDst - screenInfo.screens[j]->y;
}
if (msk)
{
stuff->mask = msk->info[j].id;
if (msk->u.pict.root)
{
- stuff->xMask = orig.xMask - dixScreenOrigins[j].x;
- stuff->yMask = orig.yMask - dixScreenOrigins[j].y;
+ stuff->xMask = orig.xMask - screenInfo.screens[j]->x;
+ stuff->yMask = orig.yMask - screenInfo.screens[j]->y;
}
}
result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client);
@@ -2881,14 +2881,14 @@ PanoramiXRenderCompositeGlyphs (ClientPtr client)
stuff->src = src->info[j].id;
if (src->u.pict.root)
{
- stuff->xSrc = xSrc - dixScreenOrigins[j].x;
- stuff->ySrc = ySrc - dixScreenOrigins[j].y;
+ stuff->xSrc = xSrc - screenInfo.screens[j]->x;
+ stuff->ySrc = ySrc - screenInfo.screens[j]->y;
}
stuff->dst = dst->info[j].id;
if (dst->u.pict.root)
{
- elt->deltax = origElt.deltax - dixScreenOrigins[j].x;
- elt->deltay = origElt.deltay - dixScreenOrigins[j].y;
+ elt->deltax = origElt.deltax - screenInfo.screens[j]->x;
+ elt->deltay = origElt.deltay - screenInfo.screens[j]->y;
}
result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client);
if(result != Success) break;
@@ -2918,8 +2918,8 @@ PanoramiXRenderFillRectangles (ClientPtr client)
if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root)
{
- int x_off = dixScreenOrigins[j].x;
- int y_off = dixScreenOrigins[j].y;
+ int x_off = screenInfo.screens[j]->x;
+ int y_off = screenInfo.screens[j]->y;
if(x_off || y_off) {
xRectangle *rects = (xRectangle *) (stuff + 1);
@@ -2966,8 +2966,8 @@ PanoramiXRenderTrapezoids(ClientPtr client)
FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) {
- int x_off = dixScreenOrigins[j].x;
- int y_off = dixScreenOrigins[j].y;
+ int x_off = screenInfo.screens[j]->x;
+ int y_off = screenInfo.screens[j]->y;
if(x_off || y_off) {
xTrapezoid *trap = (xTrapezoid *) (stuff + 1);
@@ -3026,8 +3026,8 @@ PanoramiXRenderTriangles(ClientPtr client)
FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) {
- int x_off = dixScreenOrigins[j].x;
- int y_off = dixScreenOrigins[j].y;
+ int x_off = screenInfo.screens[j]->x;
+ int y_off = screenInfo.screens[j]->y;
if(x_off || y_off) {
xTriangle *tri = (xTriangle *) (stuff + 1);
@@ -3082,8 +3082,8 @@ PanoramiXRenderTriStrip(ClientPtr client)
FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) {
- int x_off = dixScreenOrigins[j].x;
- int y_off = dixScreenOrigins[j].y;
+ int x_off = screenInfo.screens[j]->x;
+ int y_off = screenInfo.screens[j]->y;
if(x_off || y_off) {
xPointFixed *fixed = (xPointFixed *) (stuff + 1);
@@ -3134,8 +3134,8 @@ PanoramiXRenderTriFan(ClientPtr client)
FOR_NSCREENS_FORWARD(j) {
if (j) memcpy (stuff + 1, extra, extra_len);
if (dst->u.pict.root) {
- int x_off = dixScreenOrigins[j].x;
- int y_off = dixScreenOrigins[j].y;
+ int x_off = screenInfo.screens[j]->x;
+ int y_off = screenInfo.screens[j]->y;
if(x_off || y_off) {
xPointFixed *fixed = (xPointFixed *) (stuff + 1);
@@ -3188,8 +3188,8 @@ PanoramiXRenderAddTraps (ClientPtr client)
if (picture->u.pict.root)
{
- stuff->xOff = x_off + dixScreenOrigins[j].x;
- stuff->yOff = y_off + dixScreenOrigins[j].y;
+ stuff->xOff = x_off + screenInfo.screens[j]->x;
+ stuff->yOff = y_off + screenInfo.screens[j]->y;
}
result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client);
if(result != Success) break;