aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rrcrtc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 14:16:16 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 14:16:16 +0000
commitd1e4f4b8546c7955c66dd023bfd6ef437db9d21d (patch)
tree529985e77bfc95aa95fe5b540e8f42b0ef041206 /xorg-server/randr/rrcrtc.c
parent13919cf85a6ca41d97238de13344aba59e0f7680 (diff)
parent4c61bf84b11e26e6f22648668c95ea760a379163 (diff)
downloadvcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.gz
vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.bz2
vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.zip
svn merge ^/branches/released .
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 45166cbff..a23c824c3 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;