|
|
@ -451,33 +451,16 @@ xrdpVidPutImage(ScrnInfoPtr pScrn,
|
|
|
|
pointer data, DrawablePtr dst)
|
|
|
|
pointer data, DrawablePtr dst)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
rdpPtr dev;
|
|
|
|
rdpPtr dev;
|
|
|
|
char *dst8;
|
|
|
|
|
|
|
|
int *dst32;
|
|
|
|
|
|
|
|
int *src32;
|
|
|
|
|
|
|
|
int *src32a;
|
|
|
|
|
|
|
|
int *rgborg32;
|
|
|
|
int *rgborg32;
|
|
|
|
int *rgbend32;
|
|
|
|
int *rgbend32;
|
|
|
|
int index;
|
|
|
|
int index;
|
|
|
|
int jndex;
|
|
|
|
|
|
|
|
int num_clips;
|
|
|
|
|
|
|
|
int error;
|
|
|
|
int error;
|
|
|
|
RegionRec dreg;
|
|
|
|
GCPtr tempGC;
|
|
|
|
BoxRec box;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FbBits *dst1;
|
|
|
|
|
|
|
|
FbStride dstStride; /* pixels */
|
|
|
|
|
|
|
|
int dstBpp;
|
|
|
|
|
|
|
|
int dstXoff;
|
|
|
|
|
|
|
|
int dstYoff;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LLOGLN(10, ("xrdpVidPutImage:"));
|
|
|
|
LLOGLN(10, ("xrdpVidPutImage:"));
|
|
|
|
LLOGLN(10, ("xrdpVidPutImage: src_x %d srcy_y %d", src_x, src_y));
|
|
|
|
LLOGLN(10, ("xrdpVidPutImage: src_x %d srcy_y %d", src_x, src_y));
|
|
|
|
dev = XRDPPTR(pScrn);
|
|
|
|
dev = XRDPPTR(pScrn);
|
|
|
|
|
|
|
|
|
|
|
|
fbGetDrawable(dst, dst1, dstStride, dstBpp, dstXoff, dstYoff);
|
|
|
|
|
|
|
|
LLOGLN(10, ("dstStride %d dstXoff %d dstYoff %d dst1 %p dev->pfbMemory %p",
|
|
|
|
|
|
|
|
dstStride, dstXoff, dstYoff, dst1, dev->pfbMemory));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dev->xv_timer_schedualed)
|
|
|
|
if (dev->xv_timer_schedualed)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TimerCancel(dev->xv_timer);
|
|
|
|
TimerCancel(dev->xv_timer);
|
|
|
@ -540,41 +523,16 @@ xrdpVidPutImage(ScrnInfoPtr pScrn,
|
|
|
|
return Success;
|
|
|
|
return Success;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
box.x1 = drw_x;
|
|
|
|
tempGC = GetScratchGC(dst->depth, pScrn->pScreen);
|
|
|
|
box.y1 = drw_y;
|
|
|
|
if (tempGC != NULL)
|
|
|
|
box.x2 = box.x1 + drw_w;
|
|
|
|
|
|
|
|
box.y2 = box.y1 + drw_h;
|
|
|
|
|
|
|
|
LLOGLN(10, ("box 1 %d %d %d %d", box.x1, box.y1, box.x2, box.y2));
|
|
|
|
|
|
|
|
rdpRegionInit(&dreg, &box, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
num_clips = REGION_NUM_RECTS(clipBoxes);
|
|
|
|
|
|
|
|
LLOGLN(10, ("xrdpVidPutImage: num_clips %d", num_clips));
|
|
|
|
|
|
|
|
if (num_clips > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
rdpRegionIntersect(&dreg, &dreg, clipBoxes);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
num_clips = REGION_NUM_RECTS(&dreg);
|
|
|
|
|
|
|
|
for (jndex = 0; jndex < num_clips; jndex++)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
box = REGION_RECTS(&dreg)[jndex];
|
|
|
|
ValidateGC(dst, tempGC);
|
|
|
|
LLOGLN(10, ("box 2 %d %d %d %d", box.x1, box.y1, box.x2, box.y2));
|
|
|
|
(*tempGC->ops->PutImage)(dst, tempGC, 24,
|
|
|
|
dst8 = (char *) (dst1 + ((box.y1 + dstYoff) * dstStride) + dstXoff);
|
|
|
|
drw_x - dst->x, drw_y - dst->y,
|
|
|
|
src32a = rgbend32 + (box.y1 - drw_y) * drw_w;
|
|
|
|
drw_w, drw_h, 0, ZPixmap, (char*)rgbend32);
|
|
|
|
for (index = 0; index < box.y2 - box.y1; index++)
|
|
|
|
FreeScratchGC(tempGC);
|
|
|
|
{
|
|
|
|
|
|
|
|
dst32 = (int *) dst8;
|
|
|
|
|
|
|
|
dst32 += box.x1;
|
|
|
|
|
|
|
|
src32 = src32a + (box.x1 - drw_x);
|
|
|
|
|
|
|
|
g_memcpy(dst32, src32, (box.x2 - box.x1) * 4);
|
|
|
|
|
|
|
|
dst8 += dstStride * 4;
|
|
|
|
|
|
|
|
src32a += drw_w;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
rdpClientConAddAllReg(dev, &dreg, dst);
|
|
|
|
|
|
|
|
rdpRegionUninit(&dreg);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Success;
|
|
|
|
return Success;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|