aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rrcrtc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
commit4c61bf84b11e26e6f22648668c95ea760a379163 (patch)
tree0ac762ab2815eae283dded7447ad7cb5a54b926a /xorg-server/randr/rrcrtc.c
parente1dabd2ce8be0d70c6c15353b58de256129dfd1f (diff)
downloadvcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.gz
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.bz2
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.zip
xserver git update 11/6/2010
Diffstat (limited to 'xorg-server/randr/rrcrtc.c')
-rw-r--r--xorg-server/randr/rrcrtc.c69
1 files changed, 12 insertions, 57 deletions
diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c
index 278b7ff77..60e254e03 100644
--- a/xorg-server/randr/rrcrtc.c
+++ b/xorg-server/randr/rrcrtc.c
@@ -190,8 +190,7 @@ RRCrtcNotify (RRCrtcPtr crtc,
}
else
{
- if (crtc->outputs)
- free(crtc->outputs);
+ free(crtc->outputs);
newoutputs = NULL;
}
crtc->outputs = newoutputs;
@@ -440,8 +439,7 @@ RRCrtcDestroyResource (pointer value, XID pid)
}
}
}
- if (crtc->gammaRed)
- free(crtc->gammaRed);
+ free(crtc->gammaRed);
if (crtc->mode)
RRModeDestroy (crtc->mode);
free(crtc);
@@ -563,8 +561,7 @@ RRCrtcGammaSetSize (RRCrtcPtr crtc,
}
else
gamma = NULL;
- if (crtc->gammaRed)
- free(crtc->gammaRed);
+ free(crtc->gammaRed);
crtc->gammaRed = gamma;
crtc->gammaGreen = gamma + size;
crtc->gammaBlue = gamma + size*2;
@@ -805,8 +802,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
RROutputType, client, DixSetAttrAccess);
if (rc != Success)
{
- if (outputs)
- free(outputs);
+ free(outputs);
return rc;
}
/* validate crtc for this output */
@@ -815,8 +811,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
break;
if (j == outputs[i]->numCrtcs)
{
- if (outputs)
- free(outputs);
+ free(outputs);
return BadMatch;
}
/* validate mode for this output */
@@ -830,8 +825,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
}
if (j == outputs[i]->numModes + outputs[i]->numUserModes)
{
- if (outputs)
- free(outputs);
+ free(outputs);
return BadMatch;
}
}
@@ -850,8 +844,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
}
if (k == outputs[i]->numClones)
{
- if (outputs)
- free(outputs);
+ free(outputs);
return BadMatch;
}
}
@@ -870,19 +863,6 @@ ProcRRSetCrtcConfig (ClientPtr client)
goto sendReply;
}
-#if 0
- /*
- * if the client's config timestamp is not the same as the last config
- * timestamp, then the config information isn't up-to-date and
- * can't even be validated
- */
- if (CompareTimeStamps (configTime, pScrPriv->lastConfigTime) != 0)
- {
- rep.status = RRSetConfigInvalidConfigTime;
- goto sendReply;
- }
-#endif
-
/*
* Validate requested rotation
*/
@@ -900,8 +880,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
* Invalid rotation
*/
client->errorValue = stuff->rotation;
- if (outputs)
- free(outputs);
+ free(outputs);
return BadValue;
}
@@ -913,8 +892,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
* requested rotation or reflection not supported by screen
*/
client->errorValue = stuff->rotation;
- if (outputs)
- free(outputs);
+ free(outputs);
return BadMatch;
}
@@ -943,32 +921,20 @@ ProcRRSetCrtcConfig (ClientPtr client)
if (stuff->x + source_width > pScreen->width)
{
client->errorValue = stuff->x;
- if (outputs)
- free(outputs);
+ free(outputs);
return BadValue;
}
if (stuff->y + source_height > pScreen->height)
{
client->errorValue = stuff->y;
- if (outputs)
- free(outputs);
+ free(outputs);
return BadValue;
}
}
#endif
}
- /*
- * Make sure the requested set-time is not older than
- * the last set-time
- */
- if (CompareTimeStamps (time, pScrPriv->lastSetTime) < 0)
- {
- rep.status = RRSetConfigInvalidTime;
- goto sendReply;
- }
-
if (!RRCrtcSet (crtc, mode, stuff->x, stuff->y,
rotation, numOutputs, outputs))
{
@@ -979,8 +945,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
pScrPriv->lastSetTime = time;
sendReply:
- if (outputs)
- free(outputs);
+ free(outputs);
rep.type = X_Reply;
/* rep.status has already been filled in */
@@ -1100,16 +1065,6 @@ ProcRRSetPanning (ClientPtr client)
time = ClientTimeToServerTime(stuff->timestamp);
- /*
- * Make sure the requested set-time is not older than
- * the last set-time
- */
- if (CompareTimeStamps (time, pScrPriv->lastSetTime) < 0)
- {
- rep.status = RRSetConfigInvalidTime;
- goto sendReply;
- }
-
if (!pScrPriv->rrGetPanning)
return RRErrorBase + BadRRCrtc;