summaryrefslogtreecommitdiffstats
path: root/xorg/X11R7.6/rdp/rdpSetSpans.c
diff options
context:
space:
mode:
authorLawrenceK <github@lklyne.co.uk>2012-08-20 19:36:29 +0100
committerLawrenceK <github@lklyne.co.uk>2012-08-20 19:36:29 +0100
commit69389e4a63e955151c14110f54bf6c8aa9496f33 (patch)
tree63ef9f6015dd4f773443ed972d09c6691a7e9336 /xorg/X11R7.6/rdp/rdpSetSpans.c
parent2dfc213abeeb433559d37e87ac6ad1fcb6791f0e (diff)
parentc5862f367ca68763dd3070598a36ea82db7f3566 (diff)
downloadxrdp-proprietary-69389e4a63e955151c14110f54bf6c8aa9496f33.tar.gz
xrdp-proprietary-69389e4a63e955151c14110f54bf6c8aa9496f33.zip
Merge branch 'master' of git://github.com/FreeRDP/xrdp
Diffstat (limited to 'xorg/X11R7.6/rdp/rdpSetSpans.c')
-rw-r--r--xorg/X11R7.6/rdp/rdpSetSpans.c50
1 files changed, 43 insertions, 7 deletions
diff --git a/xorg/X11R7.6/rdp/rdpSetSpans.c b/xorg/X11R7.6/rdp/rdpSetSpans.c
index 7b763091..aab36f88 100644
--- a/xorg/X11R7.6/rdp/rdpSetSpans.c
+++ b/xorg/X11R7.6/rdp/rdpSetSpans.c
@@ -37,6 +37,7 @@ extern DevPrivateKeyRec g_rdpPixmapIndex; /* from rdpmain.c */
extern int g_Bpp; /* from rdpmain.c */
extern ScreenPtr g_pScreen; /* from rdpmain.c */
extern Bool g_wrapPixmap; /* from rdpmain.c */
+extern int g_do_dirty_os; /* in rdpmain.c */
extern GCOps g_rdpGCOps; /* from rdpdraw.c */
@@ -63,17 +64,24 @@ rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char* psrc,
RegionRec clip_reg;
int cd;
int got_id;
+ int dirty_type;
+ int post_process;
+ int reset_surface;
struct image_data id;
WindowPtr pDstWnd;
PixmapPtr pDstPixmap;
rdpPixmapRec* pDstPriv;
+ rdpPixmapRec* pDirtyPriv;
-
- LLOGLN(0, ("rdpSetSpans: todo"));
+ LLOGLN(10, ("rdpSetSpans: todo"));
/* do original call */
rdpSetSpansOrg(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
+ dirty_type = 0;
+ pDirtyPriv = 0;
+ post_process = 0;
+ reset_surface = 0;
got_id = 0;
if (pDrawable->type == DRAWABLE_PIXMAP)
{
@@ -81,9 +89,21 @@ rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char* psrc,
pDstPriv = GETPIXPRIV(pDstPixmap);
if (XRDP_IS_OS(pDstPriv))
{
- rdpup_switch_os_surface(pDstPriv->rdpindex);
- rdpup_get_pixmap_image_rect(pDstPixmap, &id);
- got_id = 1;
+ post_process = 1;
+ if (g_do_dirty_os)
+ {
+ LLOGLN(10, ("rdpSetSpans: gettig dirty"));
+ pDstPriv->is_dirty = 1;
+ pDirtyPriv = pDstPriv;
+ dirty_type = RDI_IMGLY;
+ }
+ else
+ {
+ rdpup_switch_os_surface(pDstPriv->rdpindex);
+ reset_surface = 1;
+ rdpup_get_pixmap_image_rect(pDstPixmap, &id);
+ got_id = 1;
+ }
}
}
else
@@ -93,12 +113,13 @@ rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char* psrc,
pDstWnd = (WindowPtr)pDrawable;
if (pDstWnd->viewable)
{
+ post_process = 1;
rdpup_get_screen_image_rect(&id);
got_id = 1;
}
}
}
- if (!got_id)
+ if (!post_process)
{
return;
}
@@ -106,10 +127,25 @@ rdpSetSpans(DrawablePtr pDrawable, GCPtr pGC, char* psrc,
cd = rdp_get_clip(&clip_reg, pDrawable, pGC);
if (cd == 1)
{
+ if (dirty_type != 0)
+ {
+ }
+ else if (got_id)
+ {
+ }
}
else if (cd == 2)
{
+ if (dirty_type != 0)
+ {
+ }
+ else if (got_id)
+ {
+ }
}
RegionUninit(&clip_reg);
- rdpup_switch_os_surface(-1);
+ if (reset_surface)
+ {
+ rdpup_switch_os_surface(-1);
+ }
}