o fixed merge conflicts

ulab-next
Laxmikant Rashinkar 12 years ago
commit 03f47098e4

@ -197,6 +197,7 @@ typedef rdpWindowRec* rdpWindowPtr;
#define RDI_IMGLL 2 /* lossless */ #define RDI_IMGLL 2 /* lossless */
#define RDI_IMGLY 3 /* lossy */ #define RDI_IMGLY 3 /* lossy */
#define RDI_LINE 4 #define RDI_LINE 4
#define RDI_SCRBLT 5
struct urdp_draw_item_fill struct urdp_draw_item_fill
{ {
@ -223,11 +224,22 @@ struct urdp_draw_item_line
int flags; int flags;
}; };
struct urdp_draw_item_scrblt
{
int srcx;
int srcy;
int dstx;
int dsty;
int cx;
int cy;
};
union urdp_draw_item union urdp_draw_item
{ {
struct urdp_draw_item_fill fill; struct urdp_draw_item_fill fill;
struct urdp_draw_item_img img; struct urdp_draw_item_img img;
struct urdp_draw_item_line line; struct urdp_draw_item_line line;
struct urdp_draw_item_scrblt scrblt;
}; };
struct rdp_draw_item struct rdp_draw_item
@ -337,7 +349,10 @@ int
draw_item_add_line_region(rdpPixmapRec* priv, RegionPtr reg, int color, draw_item_add_line_region(rdpPixmapRec* priv, RegionPtr reg, int color,
int opcode, int width, xSegment* segs, int nsegs, int opcode, int width, xSegment* segs, int nsegs,
int is_segment); int is_segment);
int
draw_item_add_srcblt_region(rdpPixmapRec* priv, RegionPtr reg,
int srcx, int srcy, int dstx, int dsty,
int cx, int cy);
PixmapPtr PixmapPtr
rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
@ -502,6 +517,11 @@ void
rdpup_delete_window(WindowPtr pWindow, rdpWindowRec* priv); rdpup_delete_window(WindowPtr pWindow, rdpWindowRec* priv);
int int
rdpup_check_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec* pDirtyPriv); rdpup_check_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec* pDirtyPriv);
int
rdpup_check_dirty_screen(rdpPixmapRec* pDirtyPriv);
void
rdpScheduleDeferredUpdate(void);
#if defined(X_BYTE_ORDER) #if defined(X_BYTE_ORDER)
# if X_BYTE_ORDER == X_LITTLE_ENDIAN # if X_BYTE_ORDER == X_LITTLE_ENDIAN

@ -39,6 +39,8 @@ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_can_do_pix_to_pix; /* from rdpmain.c */ extern int g_can_do_pix_to_pix; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -375,9 +377,29 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
if (pSrc->type == DRAWABLE_WINDOW) if (pSrc->type == DRAWABLE_WINDOW)
{ {
pSrcWnd = (WindowPtr)pSrc; rdpup_check_dirty_screen(&g_screenPriv);
if (pSrcWnd->viewable) if (pDst->type == DRAWABLE_WINDOW)
{
pDstWnd = (WindowPtr)pDst;
if (pDstWnd->viewable)
{
can_do_screen_blt = pGC->alu == GXcopy;
if (can_do_screen_blt)
{
return rdpCopyAreaWndToWnd(pSrcWnd, pDstWnd, pGC,
srcx, srcy, w, h, dstx, dsty);
}
}
}
else if (pDst->type == DRAWABLE_PIXMAP)
{
pDstPixmap = (PixmapPtr)pDst;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv))
{ {
if (pDst->type == DRAWABLE_WINDOW) if (pDst->type == DRAWABLE_WINDOW)
{ {
@ -421,37 +443,12 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
if (XRDP_IS_OS(pSrcPriv)) if (XRDP_IS_OS(pSrcPriv))
{ {
if (pDst->type == DRAWABLE_WINDOW) rdpup_check_dirty_screen(&g_screenPriv);
{
pDstWnd = (WindowPtr)pDst;
if (pDstWnd->viewable)
{
rdpup_check_dirty(pSrcPixmap, pSrcPriv); rdpup_check_dirty(pSrcPixmap, pSrcPriv);
return rdpCopyAreaPixmapToWnd(pSrcPixmap, pSrcPriv, pDstWnd, pGC, return rdpCopyAreaPixmapToWnd(pSrcPixmap, pSrcPriv, pDstWnd, pGC,
srcx, srcy, w, h, dstx, dsty); srcx, srcy, w, h, dstx, dsty);
} }
} }
else if (pDst->type == DRAWABLE_PIXMAP)
{
pDstPixmap = (PixmapPtr)pDst;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv))
{
if (g_can_do_pix_to_pix)
{
rdpup_check_dirty(pSrcPixmap, pSrcPriv);
rdpup_check_dirty(pDstPixmap, pDstPriv);
return rdpCopyAreaPixmapToPixmap(pSrcPixmap, pSrcPriv,
pDstPixmap, pDstPriv,
pGC, srcx, srcy, w, h,
dstx, dsty);
}
}
}
}
}
/* do original call */ /* do original call */
rv = rdpCopyAreaOrg(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); rv = rdpCopyAreaOrg(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
@ -488,6 +485,26 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
} }
} }
else else
{
post_process = 1;
if (g_do_dirty_os)
{
LLOGLN(10, ("rdpCopyArea: gettig dirty"));
pDstPriv->is_dirty = 1;
pDirtyPriv = pDstPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_switch_os_surface(pDstPriv->rdpindex);
reset_surface = 1;
rdpup_get_pixmap_image_rect(pDstPixmap, &id);
got_id = 1;
}
}
}
else
{ {
if (pDst->type == DRAWABLE_WINDOW) if (pDst->type == DRAWABLE_WINDOW)
{ {
@ -496,6 +513,16 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
if (pDstWnd->viewable) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpCopyArea: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id); rdpup_get_screen_image_rect(&id);
got_id = 1; got_id = 1;
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -124,14 +126,22 @@ rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
} }
} }
else else
{
if (pDst->type == DRAWABLE_WINDOW)
{ {
pDstWnd = (WindowPtr)pDst; pDstWnd = (WindowPtr)pDst;
if (pDstWnd->viewable) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpCopyPlane: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id); rdpup_get_screen_image_rect(&id);
got_id = 1; got_id = 1;
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -163,14 +165,22 @@ rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
} }
} }
else else
{
if (pDrawable->type == DRAWABLE_WINDOW)
{ {
pDstWnd = (WindowPtr)pDrawable; pDstWnd = (WindowPtr)pDrawable;
if (pDstWnd->viewable) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpFillPolygon: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id); rdpup_get_screen_image_rect(&id);
got_id = 1; got_id = 1;
} }

@ -68,7 +68,7 @@ rdpFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit,
PixmapPtr pDstPixmap; PixmapPtr pDstPixmap;
rdpPixmapRec *pDstPriv; rdpPixmapRec *pDstPriv;
LLOGLN(10, ("rdpFillSpans: todo")); LLOGLN(0, ("rdpFillSpans: todo"));
/* do original call */ /* do original call */
rdpFillSpansOrg(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted); rdpFillSpansOrg(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted);
@ -81,27 +81,6 @@ rdpFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit,
pDstPriv = GETPIXPRIV(pDstPixmap); pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv)) if (XRDP_IS_OS(pDstPriv))
{
rdpup_switch_os_surface(pDstPriv->rdpindex);
rdpup_get_pixmap_image_rect(pDstPixmap, &id);
got_id = 1;
}
}
else
{
if (pDrawable->type == DRAWABLE_WINDOW)
{
pDstWnd = (WindowPtr)pDrawable;
if (pDstWnd->viewable)
{
rdpup_get_screen_image_rect(&id);
got_id = 1;
}
}
}
if (!got_id)
{ {
return; return;
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -97,25 +99,22 @@ rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
if (pDrawable->type == DRAWABLE_PIXMAP) if (pDrawable->type == DRAWABLE_PIXMAP)
{ {
pDstPixmap = (PixmapPtr)pDrawable; pDstWnd = (WindowPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv)) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_os) if (g_do_dirty_ons)
{ {
LLOGLN(10, ("rdpImageGlyphBlt: gettig dirty")); LLOGLN(0, ("rdpImageGlyphBlt: gettig dirty"));
pDstPriv->is_dirty = 1; g_screenPriv.is_dirty = 1;
pDirtyPriv = pDstPriv; pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL; dirty_type = RDI_IMGLL;
} }
else else
{ {
rdpup_switch_os_surface(pDstPriv->rdpindex); rdpup_get_screen_image_rect(&id);
reset_surface = 1;
rdpup_get_pixmap_image_rect(pDstPixmap, &id);
got_id = 1; got_id = 1;
} }
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -95,25 +97,22 @@ rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
if (pDrawable->type == DRAWABLE_PIXMAP) if (pDrawable->type == DRAWABLE_PIXMAP)
{ {
pDstPixmap = (PixmapPtr)pDrawable; pDstWnd = (WindowPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv)) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_os) if (g_do_dirty_ons)
{ {
LLOGLN(10, ("rdpImageText16: gettig dirty")); LLOGLN(0, ("rdpImageText16: gettig dirty"));
pDstPriv->is_dirty = 1; g_screenPriv.is_dirty = 1;
pDirtyPriv = pDstPriv; pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLY; dirty_type = RDI_IMGLL;
} }
else else
{ {
rdpup_switch_os_surface(pDstPriv->rdpindex); rdpup_get_screen_image_rect(&id);
reset_surface = 1;
rdpup_get_pixmap_image_rect(pDstPixmap, &id);
got_id = 1; got_id = 1;
} }
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -95,25 +97,22 @@ rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
if (pDrawable->type == DRAWABLE_PIXMAP) if (pDrawable->type == DRAWABLE_PIXMAP)
{ {
pDstPixmap = (PixmapPtr)pDrawable; pDstWnd = (WindowPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv)) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_os) if (g_do_dirty_ons)
{ {
LLOGLN(10, ("rdpImageText8: gettig dirty")); LLOGLN(0, ("rdpImageText8: gettig dirty"));
pDstPriv->is_dirty = 1; g_screenPriv.is_dirty = 1;
pDirtyPriv = pDstPriv; pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL; dirty_type = RDI_IMGLL;
} }
else else
{ {
rdpup_switch_os_surface(pDstPriv->rdpindex); rdpup_get_screen_image_rect(&id);
reset_surface = 1;
rdpup_get_pixmap_image_rect(pDstPixmap, &id);
got_id = 1; got_id = 1;
} }
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -154,8 +156,25 @@ rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
if (!post_process) if (!post_process)
{ {
g_free(rects); pDstWnd = (WindowPtr)pDrawable;
return;
if (pDstWnd->viewable)
{
post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpPolyArc: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id);
got_id = 1;
}
}
} }
RegionInit(&clip_reg, NullBox, 0); RegionInit(&clip_reg, NullBox, 0);

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -154,8 +156,25 @@ rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
if (!post_process) if (!post_process)
{ {
g_free(rects); pDstWnd = (WindowPtr)pDrawable;
return;
if (pDstWnd->viewable)
{
post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpPolyFillArc: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id);
got_id = 1;
}
}
} }
RegionInit(&clip_reg, NullBox, 0); RegionInit(&clip_reg, NullBox, 0);

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -93,16 +95,12 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
reset_surface = 0; reset_surface = 0;
if (pDrawable->type == DRAWABLE_PIXMAP) if (pDrawable->type == DRAWABLE_PIXMAP)
{
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv))
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_os) if (g_do_dirty_os)
{ {
LLOGLN(10, ("rdpPolyFillRect: gettig dirty"));
pDstPriv->is_dirty = 1; pDstPriv->is_dirty = 1;
pDirtyPriv = pDstPriv; pDirtyPriv = pDstPriv;
dirty_type = RDI_FILL; dirty_type = RDI_FILL;
@ -115,16 +113,23 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
got_id = 1; got_id = 1;
} }
} }
}
else else
{
if (pDrawable->type == DRAWABLE_WINDOW)
{ {
pDstWnd = (WindowPtr)pDrawable; pDstWnd = (WindowPtr)pDrawable;
if (pDstWnd->viewable) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpPolyFillRect: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id); rdpup_get_screen_image_rect(&id);
got_id = 1; got_id = 1;
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -97,25 +99,22 @@ rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
if (pDrawable->type == DRAWABLE_PIXMAP) if (pDrawable->type == DRAWABLE_PIXMAP)
{ {
pDstPixmap = (PixmapPtr)pDrawable; pDstWnd = (WindowPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv)) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_os) if (g_do_dirty_ons)
{ {
LLOGLN(10, ("rdpPolyGlyphBlt: gettig dirty")); LLOGLN(0, ("rdpPolyGlyphBlt: gettig dirty"));
pDstPriv->is_dirty = 1; g_screenPriv.is_dirty = 1;
pDirtyPriv = pDstPriv; pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLY; dirty_type = RDI_IMGLL;
} }
else else
{ {
rdpup_switch_os_surface(pDstPriv->rdpindex); rdpup_get_screen_image_rect(&id);
reset_surface = 1;
rdpup_get_pixmap_image_rect(pDstPixmap, &id);
got_id = 1; got_id = 1;
} }
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -98,40 +100,25 @@ rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
for (i = 0; i < npt; i++) for (i = 0; i < npt; i++)
{ {
pts[i].x = pDrawable->x + in_pts[i].x; pDstWnd = (WindowPtr)pDrawable;
pts[i].y = pDrawable->y + in_pts[i].y;
if (i == 0)
{
total_box.x1 = pts[0].x;
total_box.y1 = pts[0].y;
total_box.x2 = pts[0].x;
total_box.y2 = pts[0].y;
}
else
{
if (pts[i].x < total_box.x1)
{
total_box.x1 = pts[i].x;
}
if (pts[i].y < total_box.y1) if (pDstWnd->viewable)
{ {
total_box.y1 = pts[i].y; post_process = 1;
}
if (pts[i].x > total_box.x2) if (g_do_dirty_ons)
{ {
total_box.x2 = pts[i].x; LLOGLN(0, ("rdpPolyPoint: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
} }
else
if (pts[i].y > total_box.y2)
{ {
total_box.y2 = pts[i].y; rdpup_get_screen_image_rect(&id);
got_id = 1;
} }
} }
/* todo, use this total_box */
} }
/* do original call */ /* do original call */

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -107,25 +109,22 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
if (pDrawable->type == DRAWABLE_PIXMAP) if (pDrawable->type == DRAWABLE_PIXMAP)
{ {
pDstPixmap = (PixmapPtr)pDrawable; pDstWnd = (WindowPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv)) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_os) if (g_do_dirty_ons)
{ {
LLOGLN(10, ("rdpPolyRectangle: gettig dirty")); LLOGLN(0, ("rdpPolyRectangle: gettig dirty"));
pDstPriv->is_dirty = 1; g_screenPriv.is_dirty = 1;
pDirtyPriv = pDstPriv; pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL; dirty_type = RDI_IMGLL;
} }
else else
{ {
rdpup_switch_os_surface(pDstPriv->rdpindex); rdpup_get_screen_image_rect(&id);
reset_surface = 1;
rdpup_get_pixmap_image_rect(pDstPixmap, &id);
got_id = 1; got_id = 1;
} }
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -144,8 +146,25 @@ rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs)
if (!post_process) if (!post_process)
{ {
g_free(segs); pDstWnd = (WindowPtr)pDrawable;
return;
if (pDstWnd->viewable)
{
post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpPolySegment: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id);
got_id = 1;
}
}
} }
RegionInit(&clip_reg, NullBox, 0); RegionInit(&clip_reg, NullBox, 0);

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -98,25 +100,22 @@ rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
if (pDrawable->type == DRAWABLE_PIXMAP) if (pDrawable->type == DRAWABLE_PIXMAP)
{ {
pDstPixmap = (PixmapPtr)pDrawable; pDstWnd = (WindowPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv)) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_os) if (g_do_dirty_ons)
{ {
LLOGLN(10, ("rdpPolyText16: gettig dirty")); LLOGLN(0, ("rdpPolyText16: gettig dirty"));
pDstPriv->is_dirty = 1; g_screenPriv.is_dirty = 1;
pDirtyPriv = pDstPriv; pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLY; dirty_type = RDI_IMGLL;
} }
else else
{ {
rdpup_switch_os_surface(pDstPriv->rdpindex); rdpup_get_screen_image_rect(&id);
reset_surface = 1;
rdpup_get_pixmap_image_rect(pDstPixmap, &id);
got_id = 1; got_id = 1;
} }
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -98,25 +100,22 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
if (pDrawable->type == DRAWABLE_PIXMAP) if (pDrawable->type == DRAWABLE_PIXMAP)
{ {
pDstPixmap = (PixmapPtr)pDrawable; pDstWnd = (WindowPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv)) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_os) if (g_do_dirty_ons)
{ {
LLOGLN(10, ("rdpPolyText8: gettig dirty")); LLOGLN(0, ("rdpPolyText8: gettig dirty"));
pDstPriv->is_dirty = 1; g_screenPriv.is_dirty = 1;
pDirtyPriv = pDstPriv; pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLY; dirty_type = RDI_IMGLL;
} }
else else
{ {
rdpup_switch_os_surface(pDstPriv->rdpindex); rdpup_get_screen_image_rect(&id);
reset_surface = 1;
rdpup_get_pixmap_image_rect(pDstPixmap, &id);
got_id = 1; got_id = 1;
} }
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -179,14 +181,22 @@ rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode,
} }
} }
else else
{
if (pDrawable->type == DRAWABLE_WINDOW)
{ {
pDstWnd = (WindowPtr)pDrawable; pDstWnd = (WindowPtr)pDrawable;
if (pDstWnd->viewable) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpPolylines: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id); rdpup_get_screen_image_rect(&id);
got_id = 1; got_id = 1;
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -90,17 +92,12 @@ rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
got_id = 0; got_id = 0;
if (pDst->type == DRAWABLE_PIXMAP) if (pDst->type == DRAWABLE_PIXMAP)
{
pDstPixmap = (PixmapPtr)pDst;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv))
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_os) if (g_do_dirty_os)
{ {
LLOGLN(10, ("rdpPutImage: gettig dirty")); LLOGLN(10, ("rdpPushPixels: gettig dirty"));
pDstPriv->is_dirty = 1; pDstPriv->is_dirty = 1;
pDirtyPriv = pDstPriv; pDirtyPriv = pDstPriv;
dirty_type = RDI_IMGLY; dirty_type = RDI_IMGLY;
@ -113,16 +110,23 @@ rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
got_id = 1; got_id = 1;
} }
} }
}
else else
{
if (pDst->type == DRAWABLE_WINDOW)
{ {
pDstWnd = (WindowPtr)pDst; pDstWnd = (WindowPtr)pDst;
if (pDstWnd->viewable) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpPushPixels: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id); rdpup_get_screen_image_rect(&id);
got_id = 1; got_id = 1;
} }

@ -38,6 +38,8 @@ extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */ extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@ -117,14 +119,22 @@ rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
} }
} }
else else
{
if (pDst->type == DRAWABLE_WINDOW)
{ {
pDstWnd = (WindowPtr)pDst; pDstWnd = (WindowPtr)pDst;
if (pDstWnd->viewable) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpPutImage: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id); rdpup_get_screen_image_rect(&id);
got_id = 1; got_id = 1;
} }

@ -73,7 +73,7 @@ rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc,
rdpPixmapRec *pDstPriv; rdpPixmapRec *pDstPriv;
rdpPixmapRec *pDirtyPriv; rdpPixmapRec *pDirtyPriv;
LLOGLN(10, ("rdpSetSpans: todo")); LLOGLN(0, ("rdpSetSpans: todo"));
/* do original call */ /* do original call */
rdpSetSpansOrg(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted); rdpSetSpansOrg(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
@ -89,6 +89,11 @@ rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc,
pDstPixmap = (PixmapPtr)pDrawable; pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap); pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv))
{
pDstPixmap = (PixmapPtr)pDrawable;
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv)) if (XRDP_IS_OS(pDstPriv))
{ {
post_process = 1; post_process = 1;

@ -62,6 +62,8 @@ extern Bool g_wrapPixmap; /* from rdpmain.c */
extern WindowPtr g_invalidate_window; /* in rdpmain.c */ extern WindowPtr g_invalidate_window; /* in rdpmain.c */
extern int g_use_rail; /* in rdpmain.c */ extern int g_use_rail; /* in rdpmain.c */
extern int g_do_dirty_os; /* in rdpmain.c */ extern int g_do_dirty_os; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
ColormapPtr g_rdpInstalledColormap; ColormapPtr g_rdpInstalledColormap;
@ -416,6 +418,11 @@ draw_item_add(rdpPixmapRec *priv, struct rdp_draw_item *di)
priv->draw_item_tail = di; priv->draw_item_tail = di;
} }
if (priv == &g_screenPriv)
{
rdpScheduleDeferredUpdate();
}
return 0; return 0;
} }
@ -637,6 +644,29 @@ draw_item_add_line_region(rdpPixmapRec *priv, RegionPtr reg, int color,
return 0; return 0;
} }
/******************************************************************************/
int
draw_item_add_srcblt_region(rdpPixmapRec *priv, RegionPtr reg,
int srcx, int srcy, int dstx, int dsty,
int cx, int cy)
{
struct rdp_draw_item *di;
LLOGLN(10, ("draw_item_add_srcblt_region:"));
di = (struct rdp_draw_item *)g_malloc(sizeof(struct rdp_draw_item), 1);
di->type = RDI_SCRBLT;
di->u.scrblt.srcx = srcx;
di->u.scrblt.srcy = srcy;
di->u.scrblt.dstx = dstx;
di->u.scrblt.dsty = dsty;
di->u.scrblt.cx = cx;
di->u.scrblt.cy = cy;
di->reg = RegionCreate(NullBox, 0);
RegionCopy(di->reg, reg);
draw_item_add(priv, di);
return 0;
}
/******************************************************************************/ /******************************************************************************/
PixmapPtr PixmapPtr
rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
@ -935,6 +965,14 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
RegionCopy(&clip, &pWin->borderClip); RegionCopy(&clip, &pWin->borderClip);
dx = pWin->drawable.x - ptOldOrg.x; dx = pWin->drawable.x - ptOldOrg.x;
dy = pWin->drawable.y - ptOldOrg.y; dy = pWin->drawable.y - ptOldOrg.y;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpCopyWindow: gettig dirty TODO"));
//draw_item_add_srcblt_region
}
else
{
rdpup_begin_update(); rdpup_begin_update();
num_clip_rects = REGION_NUM_RECTS(&clip); num_clip_rects = REGION_NUM_RECTS(&clip);
num_reg_rects = REGION_NUM_RECTS(&reg); num_reg_rects = REGION_NUM_RECTS(&reg);
@ -975,6 +1013,8 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
rdpup_reset_clip(); rdpup_reset_clip();
rdpup_end_update(); rdpup_end_update();
}
RegionUninit(&reg); RegionUninit(&reg);
RegionUninit(&clip); RegionUninit(&clip);
g_pScreen->CopyWindow = rdpCopyWindow; g_pScreen->CopyWindow = rdpCopyWindow;
@ -1012,6 +1052,13 @@ rdpClearToBackground(WindowPtr pWin, int x, int y, int w, int h,
RegionInit(&reg, &box, 0); RegionInit(&reg, &box, 0);
RegionIntersect(&reg, &reg, &pWin->clipList); RegionIntersect(&reg, &reg, &pWin->clipList);
if (g_do_dirty_ons)
{
draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL);
}
else
{
rdpup_begin_update(); rdpup_begin_update();
for (j = REGION_NUM_RECTS(&reg) - 1; j >= 0; j--) for (j = REGION_NUM_RECTS(&reg) - 1; j >= 0; j--)
@ -1021,6 +1068,8 @@ rdpClearToBackground(WindowPtr pWin, int x, int y, int w, int h,
} }
rdpup_end_update(); rdpup_end_update();
}
RegionUninit(&reg); RegionUninit(&reg);
} }
@ -1036,11 +1085,18 @@ rdpRestoreAreas(WindowPtr pWin, RegionPtr prgnExposed)
int j; int j;
BoxRec box; BoxRec box;
LLOGLN(10, ("in rdpRestoreAreas")); LLOGLN(0, ("in rdpRestoreAreas"));
RegionInit(&reg, NullBox, 0); RegionInit(&reg, NullBox, 0);
RegionCopy(&reg, prgnExposed); RegionCopy(&reg, prgnExposed);
g_pScreen->RestoreAreas = g_rdpScreen.RestoreAreas; g_pScreen->RestoreAreas = g_rdpScreen.RestoreAreas;
rv = g_pScreen->RestoreAreas(pWin, prgnExposed); rv = g_pScreen->RestoreAreas(pWin, prgnExposed);
if (g_do_dirty_ons)
{
draw_item_add_img_region(&g_screenPriv, &reg, GXcopy, RDI_IMGLL);
}
else
{
rdpup_begin_update(); rdpup_begin_update();
for (j = REGION_NUM_RECTS(&reg) - 1; j >= 0; j--) for (j = REGION_NUM_RECTS(&reg) - 1; j >= 0; j--)
@ -1050,6 +1106,8 @@ rdpRestoreAreas(WindowPtr pWin, RegionPtr prgnExposed)
} }
rdpup_end_update(); rdpup_end_update();
}
RegionUninit(&reg); RegionUninit(&reg);
g_pScreen->RestoreAreas = rdpRestoreAreas; g_pScreen->RestoreAreas = rdpRestoreAreas;
return rv; return rv;
@ -1188,14 +1246,22 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
} }
} }
else else
{
if (p->type == DRAWABLE_WINDOW)
{ {
pDstWnd = (WindowPtr)p; pDstWnd = (WindowPtr)p;
if (pDstWnd->viewable) if (pDstWnd->viewable)
{ {
post_process = 1; post_process = 1;
if (g_do_dirty_ons)
{
LLOGLN(0, ("rdpComposite: gettig dirty"));
g_screenPriv.is_dirty = 1;
pDirtyPriv = &g_screenPriv;
dirty_type = RDI_IMGLL;
}
else
{
rdpup_get_screen_image_rect(&id); rdpup_get_screen_image_rect(&id);
got_id = 1; got_id = 1;
LLOGLN(10, ("rdpComposite: screen")); LLOGLN(10, ("rdpComposite: screen"));

@ -44,9 +44,12 @@ DeviceIntPtr g_keyboard = 0;
int g_can_do_pix_to_pix = 1; int g_can_do_pix_to_pix = 1;
int g_do_dirty_os = 1; /* delay remoting off screen bitmaps */ int g_do_dirty_os = 1; /* delay remoting off screen bitmaps */
int g_do_dirty_ons = 0; /* delay remoting screen */
Bool g_wrapWindow = 1; Bool g_wrapWindow = 1;
Bool g_wrapPixmap = 1; Bool g_wrapPixmap = 1;
rdpPixmapRec g_screenPriv;
/* if true, running in RemoteApp / RAIL mode */ /* if true, running in RemoteApp / RAIL mode */
int g_use_rail = 0; int g_use_rail = 0;
@ -227,6 +230,7 @@ rdpScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
rrScrPrivPtr pRRScrPriv; rrScrPrivPtr pRRScrPriv;
g_pScreen = pScreen; g_pScreen = pScreen;
memset(&g_screenPriv, 0, sizeof(g_screenPriv));
/*dpix = 75; /*dpix = 75;
dpiy = 75;*/ dpiy = 75;*/

@ -50,6 +50,7 @@ static int g_scheduled = 0;
static int g_count = 0; static int g_count = 0;
static int g_rdpindex = -1; static int g_rdpindex = -1;
extern DevPrivateKeyRec g_rdpWindowIndex; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */ extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern int g_Bpp; /* from rdpmain.c */ extern int g_Bpp; /* from rdpmain.c */
extern int g_Bpp_mask; /* from rdpmain.c */ extern int g_Bpp_mask; /* from rdpmain.c */
@ -59,6 +60,8 @@ extern int g_use_rail; /* from rdpmain.c */
/* true is to use unix domain socket */ /* true is to use unix domain socket */
extern int g_use_uds; /* in rdpmain.c */ extern int g_use_uds; /* in rdpmain.c */
extern char g_uds_data[]; /* in rdpmain.c */ extern char g_uds_data[]; /* in rdpmain.c */
extern int g_do_dirty_ons; /* in rdpmain.c */
extern rdpPixmapRec g_screenPriv; /* in rdpmain.c */
struct rdpup_os_bitmap struct rdpup_os_bitmap
{ {
@ -75,6 +78,12 @@ static int g_os_bitmap_stamp = 0;
static int g_pixmap_byte_total = 0; static int g_pixmap_byte_total = 0;
static int g_pixmap_num_used = 0; static int g_pixmap_num_used = 0;
struct rdpup_top_window
{
WindowPtr wnd;
struct rdpup_top_window *next;
};
/* /*
0 GXclear, 0 0 GXclear, 0
1 GXnor, DPon 1 GXnor, DPon
@ -351,14 +360,24 @@ rdpup_send_pending(void)
/******************************************************************************/ /******************************************************************************/
static CARD32 static CARD32
rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg) rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
{
LLOGLN(10, ("rdpDeferredUpdateCallback"));
if (g_do_dirty_ons)
{
rdpup_check_dirty_screen(&g_screenPriv);
}
else
{ {
rdpup_send_pending(); rdpup_send_pending();
}
g_scheduled = 0; g_scheduled = 0;
return 0; return 0;
} }
/******************************************************************************/ /******************************************************************************/
static void void
rdpScheduleDeferredUpdate(void) rdpScheduleDeferredUpdate(void)
{ {
if (!g_scheduled) if (!g_scheduled)
@ -581,6 +600,35 @@ process_version_msg(int param1, int param2, int param3, int param4)
return 0; return 0;
} }
/******************************************************************************/
static int
rdpup_send_rail(void)
{
WindowPtr wnd;
rdpWindowRec *priv;
wnd = g_pScreen->root;
if (wnd != 0)
{
wnd = wnd->lastChild;
while (wnd != 0)
{
if (wnd->realized)
{
priv = GETWINPRIV(wnd);
priv->status = 1;
rdpup_create_window(wnd, priv);
}
wnd = wnd->prevSib;
}
}
return 0;
}
/******************************************************************************/ /******************************************************************************/
static int static int
rdpup_process_msg(struct stream *s) rdpup_process_msg(struct stream *s)
@ -710,6 +758,7 @@ rdpup_process_msg(struct stream *s)
if (g_rdpScreen.client_info.rail_support_level > 0) if (g_rdpScreen.client_info.rail_support_level > 0)
{ {
g_use_rail = 1; g_use_rail = 1;
rdpup_send_rail();
} }
} }
else else
@ -901,6 +950,8 @@ rdpup_check(void)
int int
rdpup_begin_update(void) rdpup_begin_update(void)
{ {
LLOGLN(10, ("rdpup_begin_update"));
if (g_connected) if (g_connected)
{ {
if (g_begin) if (g_begin)
@ -924,10 +975,19 @@ rdpup_begin_update(void)
int int
rdpup_end_update(void) rdpup_end_update(void)
{ {
LLOGLN(10, ("rdpup_end_update"));
if (g_connected && g_begin) if (g_connected && g_begin)
{
if (g_do_dirty_ons)
{
rdpup_send_pending();
}
else
{ {
rdpScheduleDeferredUpdate(); rdpScheduleDeferredUpdate();
} }
}
return 0; return 0;
} }
@ -1624,15 +1684,6 @@ rdpup_create_window(WindowPtr pWindow, rdpWindowRec *priv)
LLOGLN(10, ("rdpup_create_window: id 0x%8.8x", pWindow->drawable.id)); LLOGLN(10, ("rdpup_create_window: id 0x%8.8x", pWindow->drawable.id));
if (g_connected) if (g_connected)
{
root_id = pWindow->drawable.pScreen->root->drawable.id;
if (pWindow->overrideRedirect)
{
style = XR_STYLE_TOOLTIP;
ext_style = XR_EXT_STYLE_TOOLTIP;
}
else
{ {
style = XR_STYLE_NORMAL; style = XR_STYLE_NORMAL;
ext_style = XR_EXT_STYLE_NORMAL; ext_style = XR_EXT_STYLE_NORMAL;
@ -1694,8 +1745,8 @@ rdpup_create_window(WindowPtr pWindow, rdpWindowRec *priv)
} }
flags |= WINDOW_ORDER_FIELD_WND_RECTS; flags |= WINDOW_ORDER_FIELD_WND_RECTS;
out_uint32_le(g_out_s, 0); /* visible_offset_x */ out_uint32_le(g_out_s, pWindow->drawable.x); /* visible_offset_x */
out_uint32_le(g_out_s, 0); /* visible_offset_y */ out_uint32_le(g_out_s, pWindow->drawable.y); /* visible_offset_y */
flags |= WINDOW_ORDER_FIELD_VIS_OFFSET; flags |= WINDOW_ORDER_FIELD_VIS_OFFSET;
out_uint16_le(g_out_s, num_visibility_rects); /* num_visibility_rects */ out_uint16_le(g_out_s, num_visibility_rects); /* num_visibility_rects */
@ -1846,12 +1897,143 @@ rdpup_check_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec *pDirtyPriv)
break; break;
} }
di = di->next; rdpup_reset_clip();
rdpup_set_opcode(GXcopy);
break;
case RDI_SCRBLT:
LLOGLN(10, (" RDI_SCRBLT"));
break;
} }
di = di->next;
}
draw_item_remove_all(pDirtyPriv); draw_item_remove_all(pDirtyPriv);
rdpup_end_update(); rdpup_end_update();
pDirtyPriv->is_dirty = 0; pDirtyPriv->is_dirty = 0;
rdpup_switch_os_surface(-1); rdpup_switch_os_surface(-1);
return 0; return 0;
} }
/******************************************************************************/
int
rdpup_check_dirty_screen(rdpPixmapRec *pDirtyPriv)
{
int index;
int clip_index;
int count;
int num_clips;
BoxRec box;
xSegment *seg;
struct image_data id;
struct rdp_draw_item *di;
if (pDirtyPriv == 0)
{
return 0;
}
if (pDirtyPriv->is_dirty == 0)
{
return 0;
}
LLOGLN(10, ("-----------------got dirty"));
rdpup_get_screen_image_rect(&id);
rdpup_begin_update();
draw_item_pack(pDirtyPriv);
di = pDirtyPriv->draw_item_head;
while (di != 0)
{
LLOGLN(10, ("rdpup_check_dirty_screen: type %d", di->type));
switch (di->type)
{
case RDI_FILL:
rdpup_set_fgcolor(di->u.fill.fg_color);
rdpup_set_opcode(di->u.fill.opcode);
count = REGION_NUM_RECTS(di->reg);
for (index = 0; index < count; index++)
{
box = REGION_RECTS(di->reg)[index];
LLOGLN(10, (" RDI_FILL %d %d %d %d", box.x1, box.y1,
box.x2, box.y2));
rdpup_fill_rect(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
}
rdpup_set_opcode(GXcopy);
break;
case RDI_IMGLL:
rdpup_set_hints(1, 1);
rdpup_set_opcode(di->u.img.opcode);
count = REGION_NUM_RECTS(di->reg);
for (index = 0; index < count; index++)
{
box = REGION_RECTS(di->reg)[index];
LLOGLN(10, (" RDI_IMGLL %d %d %d %d", box.x1, box.y1,
box.x2, box.y2));
rdpup_send_area(&id, box.x1, box.y1, box.x2 - box.x1,
box.y2 - box.y1);
}
rdpup_set_opcode(GXcopy);
rdpup_set_hints(0, 1);
break;
case RDI_IMGLY:
rdpup_set_opcode(di->u.img.opcode);
count = REGION_NUM_RECTS(di->reg);
for (index = 0; index < count; index++)
{
box = REGION_RECTS(di->reg)[index];
LLOGLN(10, (" RDI_IMGLY %d %d %d %d", box.x1, box.y1,
box.x2, box.y2));
rdpup_send_area(&id, box.x1, box.y1, box.x2 - box.x1,
box.y2 - box.y1);
}
rdpup_set_opcode(GXcopy);
break;
case RDI_LINE:
LLOGLN(10, (" RDI_LINE"));
num_clips = REGION_NUM_RECTS(di->reg);
if (num_clips > 0)
{
rdpup_set_fgcolor(di->u.line.fg_color);
rdpup_set_opcode(di->u.line.opcode);
rdpup_set_pen(0, di->u.line.width);
for (clip_index = num_clips - 1; clip_index >= 0; clip_index--)
{
box = REGION_RECTS(di->reg)[clip_index];
rdpup_set_clip(box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
for (index = 0; index < di->u.line.nseg; index++)
{
seg = di->u.line.segs + index;
LLOGLN(10, (" RDI_LINE %d %d %d %d", seg->x1, seg->y1,
seg->x2, seg->y2));
rdpup_draw_line(seg->x1, seg->y1, seg->x2, seg->y2);
}
}
}
rdpup_reset_clip();
rdpup_set_opcode(GXcopy);
break;
case RDI_SCRBLT:
LLOGLN(10, (" RDI_SCRBLT"));
break;
}
di = di->next;
}
draw_item_remove_all(pDirtyPriv);
rdpup_end_update();
pDirtyPriv->is_dirty = 0;
return 0;
}

Loading…
Cancel
Save