mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
dri2: declare variables where needed in dri2_copy_region()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
baaf408471
commit
e9b9610d45
@@ -869,11 +869,8 @@ static void dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
|
||||
DRI2BufferPtr pDest, DRI2BufferPtr pSrc)
|
||||
{
|
||||
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
|
||||
DRI2ScreenPtr ds;
|
||||
ScreenPtr primeScreen;
|
||||
|
||||
primeScreen = GetScreenPrime(pDraw->pScreen, pPriv->prime_id);
|
||||
ds = DRI2GetScreen(primeScreen);
|
||||
ScreenPtr primeScreen = GetScreenPrime(pDraw->pScreen, pPriv->prime_id);
|
||||
DRI2ScreenPtr ds = DRI2GetScreen(primeScreen);
|
||||
|
||||
if (ds->CopyRegion2)
|
||||
(*ds->CopyRegion2)(primeScreen, pDraw, pRegion, pDest, pSrc);
|
||||
@@ -882,17 +879,16 @@ static void dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
|
||||
|
||||
/* cause damage to the box */
|
||||
if (pPriv->prime_id) {
|
||||
BoxRec box;
|
||||
RegionRec region;
|
||||
box.x1 = 0;
|
||||
box.x2 = box.x1 + pDraw->width;
|
||||
box.y1 = 0;
|
||||
box.y2 = box.y1 + pDraw->height;
|
||||
RegionInit(®ion, &box, 1);
|
||||
RegionTranslate(®ion, pDraw->x, pDraw->y);
|
||||
DamageRegionAppend(pDraw, ®ion);
|
||||
DamageRegionProcessPending(pDraw);
|
||||
RegionUninit(®ion);
|
||||
BoxRec box = {
|
||||
.x2 = pDraw->width,
|
||||
.y2 = pDraw->height,
|
||||
};
|
||||
RegionRec region;
|
||||
RegionInit(®ion, &box, 1);
|
||||
RegionTranslate(®ion, pDraw->x, pDraw->y);
|
||||
DamageRegionAppend(pDraw, ®ion);
|
||||
DamageRegionProcessPending(pDraw);
|
||||
RegionUninit(®ion);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user