- Don't forget to UNINIT miComputeCompositeRegion's regions
- Fix a bit of whitespace nearby.
This commit is contained in:
parent
34d1529731
commit
cff782078c
|
@ -248,10 +248,11 @@ kaaTryDriverSolidFill(PicturePtr pSrc,
|
||||||
if (pDst->pDrawable->type == DRAWABLE_PIXMAP)
|
if (pDst->pDrawable->type == DRAWABLE_PIXMAP)
|
||||||
kaaPixmapUseScreen ((PixmapPtr) pDst->pDrawable);
|
kaaPixmapUseScreen ((PixmapPtr) pDst->pDrawable);
|
||||||
|
|
||||||
pDstPix = kaaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x,
|
pDstPix = kaaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y);
|
||||||
&dst_off_y);
|
if (!pDstPix) {
|
||||||
if (!pDstPix)
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (pSrc->pDrawable->type == DRAWABLE_WINDOW)
|
if (pSrc->pDrawable->type == DRAWABLE_WINDOW)
|
||||||
pSrcPix = (*pSrc->pDrawable->pScreen->GetWindowPixmap)(
|
pSrcPix = (*pSrc->pDrawable->pScreen->GetWindowPixmap)(
|
||||||
|
@ -269,13 +270,19 @@ kaaTryDriverSolidFill(PicturePtr pSrc,
|
||||||
pixel = *(CARD32 *)(pSrcPix->devPrivate.ptr);
|
pixel = *(CARD32 *)(pSrcPix->devPrivate.ptr);
|
||||||
if (!kaaGetRGBAFromPixel(pixel, &red, &green, &blue, &alpha,
|
if (!kaaGetRGBAFromPixel(pixel, &red, &green, &blue, &alpha,
|
||||||
pSrc->format))
|
pSrc->format))
|
||||||
|
{
|
||||||
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
kaaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
|
kaaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
|
||||||
pDst->format);
|
pDst->format);
|
||||||
|
|
||||||
if (!(*pKaaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffff,
|
if (!(*pKaaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffff,
|
||||||
pixel))
|
pixel))
|
||||||
|
{
|
||||||
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
nbox = REGION_NUM_RECTS(®ion);
|
nbox = REGION_NUM_RECTS(®ion);
|
||||||
pbox = REGION_RECTS(®ion);
|
pbox = REGION_RECTS(®ion);
|
||||||
|
@ -291,6 +298,7 @@ kaaTryDriverSolidFill(PicturePtr pSrc,
|
||||||
(*pKaaScr->info->DoneSolid) ();
|
(*pKaaScr->info->DoneSolid) ();
|
||||||
KdMarkSync(pDst->pDrawable->pScreen);
|
KdMarkSync(pDst->pDrawable->pScreen);
|
||||||
|
|
||||||
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,16 +337,19 @@ kaaTryDriverBlend(CARD8 op,
|
||||||
if (pDst->pDrawable->type == DRAWABLE_PIXMAP)
|
if (pDst->pDrawable->type == DRAWABLE_PIXMAP)
|
||||||
kaaPixmapUseScreen ((PixmapPtr) pDst->pDrawable);
|
kaaPixmapUseScreen ((PixmapPtr) pDst->pDrawable);
|
||||||
|
|
||||||
pSrcPix = kaaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x,
|
pSrcPix = kaaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y);
|
||||||
&src_off_y);
|
pDstPix = kaaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y);
|
||||||
pDstPix = kaaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x,
|
if (!pSrcPix || !pDstPix) {
|
||||||
&dst_off_y);
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
if (!pSrcPix || !pDstPix)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(*pKaaScr->info->PrepareBlend) (op, pSrc, pDst, pSrcPix,
|
if (!(*pKaaScr->info->PrepareBlend) (op, pSrc, pDst, pSrcPix,
|
||||||
pDstPix))
|
pDstPix))
|
||||||
|
{
|
||||||
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
nbox = REGION_NUM_RECTS(®ion);
|
nbox = REGION_NUM_RECTS(®ion);
|
||||||
pbox = REGION_RECTS(®ion);
|
pbox = REGION_RECTS(®ion);
|
||||||
|
@ -360,6 +371,7 @@ kaaTryDriverBlend(CARD8 op,
|
||||||
(*pKaaScr->info->DoneBlend) ();
|
(*pKaaScr->info->DoneBlend) ();
|
||||||
KdMarkSync(pDst->pDrawable->pScreen);
|
KdMarkSync(pDst->pDrawable->pScreen);
|
||||||
|
|
||||||
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,22 +420,22 @@ kaaTryDriverComposite(CARD8 op,
|
||||||
if (pDst->pDrawable->type == DRAWABLE_PIXMAP)
|
if (pDst->pDrawable->type == DRAWABLE_PIXMAP)
|
||||||
kaaPixmapUseScreen ((PixmapPtr) pDst->pDrawable);
|
kaaPixmapUseScreen ((PixmapPtr) pDst->pDrawable);
|
||||||
|
|
||||||
pSrcPix = kaaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x,
|
pSrcPix = kaaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y);
|
||||||
&src_off_y);
|
if (pMask)
|
||||||
pDstPix = kaaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x,
|
|
||||||
&dst_off_y);
|
|
||||||
if (!pSrcPix || !pDstPix)
|
|
||||||
return 0;
|
|
||||||
if (pMask) {
|
|
||||||
pMaskPix = kaaGetOffscreenPixmap (pMask->pDrawable, &mask_off_x,
|
pMaskPix = kaaGetOffscreenPixmap (pMask->pDrawable, &mask_off_x,
|
||||||
&mask_off_y);
|
&mask_off_y);
|
||||||
if (!pMaskPix)
|
pDstPix = kaaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y);
|
||||||
return 0;
|
if (!pSrcPix || (pMask && !pMaskPix) || !pDstPix) {
|
||||||
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(*pKaaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix,
|
if (!(*pKaaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix,
|
||||||
pMaskPix, pDstPix))
|
pMaskPix, pDstPix))
|
||||||
|
{
|
||||||
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
nbox = REGION_NUM_RECTS(®ion);
|
nbox = REGION_NUM_RECTS(®ion);
|
||||||
pbox = REGION_RECTS(®ion);
|
pbox = REGION_RECTS(®ion);
|
||||||
|
@ -449,6 +461,8 @@ kaaTryDriverComposite(CARD8 op,
|
||||||
|
|
||||||
(*pKaaScr->info->DoneComposite) ();
|
(*pKaaScr->info->DoneComposite) ();
|
||||||
KdMarkSync(pDst->pDrawable->pScreen);
|
KdMarkSync(pDst->pDrawable->pScreen);
|
||||||
|
|
||||||
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue