summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2012-12-28 10:54:49 -0800
committerJay Sorg <jay.sorg@gmail.com>2012-12-28 10:54:49 -0800
commitf91b33ed13302d66550fe24e35551cc3aaf95a53 (patch)
tree82d1a6857ce9b859668d127206f00b509b9d7557
parentf3cc2a5154e79afcebed79b9dc85205fdd950043 (diff)
downloadxrdp-proprietary-f91b33ed13302d66550fe24e35551cc3aaf95a53.tar.gz
xrdp-proprietary-f91b33ed13302d66550fe24e35551cc3aaf95a53.zip
off screen bitmap creation, don't invalidate whole area
-rw-r--r--xorg/X11R7.6/rdp/rdp.h1
-rw-r--r--xorg/X11R7.6/rdp/rdpdraw.c26
-rw-r--r--xorg/X11R7.6/rdp/rdpmain.c2
-rw-r--r--xorg/X11R7.6/rdp/rdpup.c3
4 files changed, 21 insertions, 11 deletions
diff --git a/xorg/X11R7.6/rdp/rdp.h b/xorg/X11R7.6/rdp/rdp.h
index 57de4432..920fe25d 100644
--- a/xorg/X11R7.6/rdp/rdp.h
+++ b/xorg/X11R7.6/rdp/rdp.h
@@ -259,6 +259,7 @@ struct _rdpPixmapRec
int con_number;
int is_dirty;
int pad0;
+ int kind_width;
struct rdp_draw_item* draw_item_head;
struct rdp_draw_item* draw_item_tail;
};
diff --git a/xorg/X11R7.6/rdp/rdpdraw.c b/xorg/X11R7.6/rdp/rdpdraw.c
index 9734607a..a0cc2f0f 100644
--- a/xorg/X11R7.6/rdp/rdpdraw.c
+++ b/xorg/X11R7.6/rdp/rdpdraw.c
@@ -64,6 +64,7 @@ extern int g_use_rail; /* 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 int g_con_number; /* in rdpmain.c */
ColormapPtr g_rdpInstalledColormap;
@@ -685,6 +686,8 @@ rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
rv = pScreen->CreatePixmap(pScreen, width, height, depth, usage_hint);
priv = GETPIXPRIV(rv);
priv->rdpindex = -1;
+ priv->con_number = g_con_number;
+ priv->kind_width = width;
pScreen->ModifyPixmapHeader(rv, org_width, 0, 0, 0, 0, 0);
pScreen->CreatePixmap = rdpCreatePixmap;
return rv;
@@ -731,30 +734,35 @@ xrdp_is_os(PixmapPtr pix, rdpPixmapPtr priv)
int height;
struct image_data id;
- if (priv->status == 0)
+ if (!XRDP_IS_OS(priv))
{
width = pix->drawable.width;
height = pix->drawable.height;
if ((pix->drawable.depth >= g_rdpScreen.depth) &&
- (width > 1) && (height > 1))
+ (width > 1) && (height > 1) && (priv->kind_width > 0))
{
- width = (width + 3) & ~3;
+ LLOGLN(10, ("%d %d", priv->kind_width, pix->drawable.width));
priv->rdpindex = rdpup_add_os_bitmap(pix, priv);
if (priv->rdpindex >= 0)
{
priv->status = 1;
- rdpup_create_os_surface(priv->rdpindex, width, height);
+ rdpup_create_os_surface(priv->rdpindex,
+ priv->kind_width, height);
box.x1 = 0;
box.y1 = 0;
box.x2 = width;
box.y2 = height;
if (g_do_dirty_os)
{
- draw_item_remove_all(priv);
- RegionInit(&reg1, &box, 0);
- draw_item_add_img_region(priv, &reg1, GXcopy, RDI_IMGLL);
- RegionUninit(&reg1);
- priv->is_dirty = 1;
+ if (priv->con_number != g_con_number)
+ {
+ draw_item_remove_all(priv);
+ RegionInit(&reg1, &box, 0);
+ draw_item_add_img_region(priv, &reg1, GXcopy, RDI_IMGLL);
+ RegionUninit(&reg1);
+ priv->is_dirty = 1;
+ priv->con_number = g_con_number;
+ }
}
else
{
diff --git a/xorg/X11R7.6/rdp/rdpmain.c b/xorg/X11R7.6/rdp/rdpmain.c
index 3f3f406e..b5fc28a5 100644
--- a/xorg/X11R7.6/rdp/rdpmain.c
+++ b/xorg/X11R7.6/rdp/rdpmain.c
@@ -55,6 +55,8 @@ rdpPixmapRec g_screenPriv;
/* if true, running in RemoteApp / RAIL mode */
int g_use_rail = 0;
+int g_con_number = 0; /* increments for each connection */
+
WindowPtr g_invalidate_window = 0;
/* if true, use a unix domain socket instead of a tcp socket */
diff --git a/xorg/X11R7.6/rdp/rdpup.c b/xorg/X11R7.6/rdp/rdpup.c
index c2eafe27..13283b84 100644
--- a/xorg/X11R7.6/rdp/rdpup.c
+++ b/xorg/X11R7.6/rdp/rdpup.c
@@ -28,8 +28,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define LLOGLN(_level, _args) \
do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
-int g_con_number = 0; /* increments for each connection */
-
static int g_listen_sck = 0;
static int g_sck = 0;
static int g_sck_closed = 0;
@@ -63,6 +61,7 @@ extern int g_use_uds; /* 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 */
+extern int g_con_number; /* in rdpmain.c */
struct rdpup_os_bitmap
{