summaryrefslogtreecommitdiffstats
path: root/xorg/X11R7.6/rdp/rdpPolyText8.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2012-08-09 22:19:10 -0700
committerJay Sorg <jay.sorg@gmail.com>2012-08-09 22:19:10 -0700
commitda9d55f180cb68999d95b44fb3d53909ea9630b6 (patch)
tree2035b5b68b8cd879d07f554fa4ec3007c17e286c /xorg/X11R7.6/rdp/rdpPolyText8.c
parent7539d7271eb6ae2504f8a5e17a837aa453bc8355 (diff)
downloadxrdp-proprietary-da9d55f180cb68999d95b44fb3d53909ea9630b6.tar.gz
xrdp-proprietary-da9d55f180cb68999d95b44fb3d53909ea9630b6.zip
xorg: offscreen bitmaps, don't remote until used
Diffstat (limited to 'xorg/X11R7.6/rdp/rdpPolyText8.c')
-rw-r--r--xorg/X11R7.6/rdp/rdpPolyText8.c67
1 files changed, 54 insertions, 13 deletions
diff --git a/xorg/X11R7.6/rdp/rdpPolyText8.c b/xorg/X11R7.6/rdp/rdpPolyText8.c
index 3cb7b5a0..c7af8f35 100644
--- a/xorg/X11R7.6/rdp/rdpPolyText8.c
+++ b/xorg/X11R7.6/rdp/rdpPolyText8.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 */
@@ -69,11 +70,15 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
int j;
int rv;
int got_id;
+ int dirty_type;
+ int post_process;
+ int reset_surface;
BoxRec box;
struct image_data id;
WindowPtr pDstWnd;
PixmapPtr pDstPixmap;
rdpPixmapRec* pDstPriv;
+ rdpPixmapRec* pDirtyPriv;
LLOGLN(10, ("rdpPolyText8:"));
@@ -85,6 +90,10 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
/* do original call */
rv = rdpPolyText8Org(pDrawable, pGC, x, y, count, chars);
+ dirty_type = 0;
+ pDirtyPriv = 0;
+ post_process = 0;
+ reset_surface = 0;
got_id = 0;
if (pDrawable->type == DRAWABLE_PIXMAP)
{
@@ -92,9 +101,21 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
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, ("rdpPolyText8: 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
@@ -104,12 +125,13 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
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 rv;
}
@@ -125,9 +147,18 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
}
if (cd == 1)
{
- rdpup_begin_update();
- rdpup_send_area(&id, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
- rdpup_end_update();
+ if (dirty_type != 0)
+ {
+ RegionInit(&reg1, &box, 0);
+ draw_item_add_img_region(pDirtyPriv, &reg1, dirty_type);
+ RegionUninit(&reg1);
+ }
+ else if (got_id)
+ {
+ rdpup_begin_update();
+ rdpup_send_area(&id, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
+ rdpup_end_update();
+ }
}
else if (cd == 2)
{
@@ -136,17 +167,27 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
num_clips = REGION_NUM_RECTS(&reg);
if (num_clips > 0)
{
- rdpup_begin_update();
- for (j = num_clips - 1; j >= 0; j--)
+ if (dirty_type != 0)
{
- box = REGION_RECTS(&reg)[j];
- rdpup_send_area(&id, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
+ draw_item_add_img_region(pDirtyPriv, &reg, dirty_type);
+ }
+ else if (got_id)
+ {
+ rdpup_begin_update();
+ for (j = num_clips - 1; j >= 0; j--)
+ {
+ box = REGION_RECTS(&reg)[j];
+ rdpup_send_area(&id, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
+ }
+ rdpup_end_update();
}
- rdpup_end_update();
}
RegionUninit(&reg1);
}
RegionUninit(&reg);
- rdpup_switch_os_surface(-1);
+ if (reset_surface)
+ {
+ rdpup_switch_os_surface(-1);
+ }
return rv;
}