mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
dri2: declare variables where needed in DRI2GetMSC()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
31520b857b
commit
63eeb1ea05
@@ -1181,10 +1181,8 @@ DRI2GetMSC(DrawablePtr pDraw, CARD64 * ust, CARD64 * msc, CARD64 * sbc)
|
||||
{
|
||||
ScreenPtr pScreen = pDraw->pScreen;
|
||||
DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen);
|
||||
DRI2DrawablePtr pPriv;
|
||||
Bool ret;
|
||||
|
||||
pPriv = DRI2GetDrawable(pDraw);
|
||||
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
|
||||
if (pPriv == NULL) {
|
||||
xf86DrvMsg(pScreen->myNum, X_ERROR,
|
||||
"[DRI2] %s: bad drawable\n", __func__);
|
||||
@@ -1203,8 +1201,7 @@ DRI2GetMSC(DrawablePtr pDraw, CARD64 * ust, CARD64 * msc, CARD64 * sbc)
|
||||
* drawables
|
||||
*/
|
||||
|
||||
ret = (*ds->GetMSC) (pDraw, ust, msc);
|
||||
if (!ret)
|
||||
if (!(ds->GetMSC(pDraw, ust, msc)))
|
||||
return BadDrawable;
|
||||
|
||||
*sbc = pPriv->swap_count;
|
||||
@@ -1217,23 +1214,17 @@ DRI2WaitMSC(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
|
||||
CARD64 divisor, CARD64 remainder)
|
||||
{
|
||||
DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen);
|
||||
DRI2DrawablePtr pPriv;
|
||||
Bool ret;
|
||||
|
||||
pPriv = DRI2GetDrawable(pDraw);
|
||||
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
|
||||
if (pPriv == NULL)
|
||||
return BadDrawable;
|
||||
|
||||
/* Old DDX just completes immediately */
|
||||
if (!ds->ScheduleWaitMSC) {
|
||||
DRI2WaitMSCComplete(client, pDraw, target_msc, 0, 0);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
ret =
|
||||
(*ds->ScheduleWaitMSC) (client, pDraw, target_msc, divisor, remainder);
|
||||
if (!ret)
|
||||
if (!(ds->ScheduleWaitMSC(client, pDraw, target_msc, divisor, remainder)))
|
||||
return BadDrawable;
|
||||
|
||||
return Success;
|
||||
@@ -1242,9 +1233,7 @@ DRI2WaitMSC(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
|
||||
int
|
||||
DRI2WaitSBC(ClientPtr client, DrawablePtr pDraw, CARD64 target_sbc)
|
||||
{
|
||||
DRI2DrawablePtr pPriv;
|
||||
|
||||
pPriv = DRI2GetDrawable(pDraw);
|
||||
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
|
||||
if (pPriv == NULL)
|
||||
return BadDrawable;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user