Merge branch 'master' of git://github.com/FreeRDP/xrdp
This commit is contained in:
commit
9530caa4ff
@ -5,6 +5,18 @@
|
|||||||
# chkconfig: 2345 11 89
|
# chkconfig: 2345 11 89
|
||||||
# description: starts xrdp
|
# description: starts xrdp
|
||||||
|
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: xrdp
|
||||||
|
# Required-Start:
|
||||||
|
# Required-Stop:
|
||||||
|
# Should-Start:
|
||||||
|
# Should-Stop:
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: Start and stop xrdp
|
||||||
|
# Description: starts xrdp
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
SBINDIR=/usr/local/sbin
|
SBINDIR=/usr/local/sbin
|
||||||
LOG=/dev/null
|
LOG=/dev/null
|
||||||
CFGDIR=/etc/xrdp
|
CFGDIR=/etc/xrdp
|
||||||
|
@ -30,7 +30,8 @@ xrdp_chansrv_SOURCES = \
|
|||||||
clipboard.c \
|
clipboard.c \
|
||||||
devredir.c \
|
devredir.c \
|
||||||
rail.c \
|
rail.c \
|
||||||
xcommon.c
|
xcommon.c \
|
||||||
|
drdynvc.c
|
||||||
|
|
||||||
xrdp_chansrv_LDFLAGS = \
|
xrdp_chansrv_LDFLAGS = \
|
||||||
$(EXTRA_FLAGS)
|
$(EXTRA_FLAGS)
|
||||||
|
17
sesman/chansrv/drdynvc.c
Normal file
17
sesman/chansrv/drdynvc.c
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* xrdp: A Remote Desktop Protocol server.
|
||||||
|
*
|
||||||
|
* Copyright (C) Jay Sorg 2012
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
25
sesman/chansrv/drdynvc.h
Normal file
25
sesman/chansrv/drdynvc.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* xrdp: A Remote Desktop Protocol server.
|
||||||
|
*
|
||||||
|
* Copyright (C) Jay Sorg 2012
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined(DRDYNVC_H)
|
||||||
|
#define DRDYNVC_H
|
||||||
|
|
||||||
|
#include "arch.h"
|
||||||
|
#include "parse.h"
|
||||||
|
|
||||||
|
#endif
|
@ -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 */
|
||||||
|
|
||||||
@ -358,6 +360,7 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
|||||||
pSrcWnd = (WindowPtr)pSrc;
|
pSrcWnd = (WindowPtr)pSrc;
|
||||||
if (pSrcWnd->viewable)
|
if (pSrcWnd->viewable)
|
||||||
{
|
{
|
||||||
|
rdpup_check_dirty_screen(&g_screenPriv);
|
||||||
if (pDst->type == DRAWABLE_WINDOW)
|
if (pDst->type == DRAWABLE_WINDOW)
|
||||||
{
|
{
|
||||||
pDstWnd = (WindowPtr)pDst;
|
pDstWnd = (WindowPtr)pDst;
|
||||||
@ -399,6 +402,7 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
|||||||
pDstWnd = (WindowPtr)pDst;
|
pDstWnd = (WindowPtr)pDst;
|
||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
|
rdpup_check_dirty_screen(&g_screenPriv);
|
||||||
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);
|
||||||
@ -463,8 +467,18 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpCopyArea: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -128,8 +130,18 @@ rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpCopyPlane: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -161,8 +163,18 @@ rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpFillPolygon: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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);
|
||||||
|
@ -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 */
|
||||||
|
|
||||||
@ -125,8 +127,18 @@ rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpImageGlyphBlt: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -123,8 +125,18 @@ rdpImageText16(DrawablePtr pDrawable, GCPtr pGC,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpImageText16: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -123,8 +125,18 @@ rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpImageText8: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -138,8 +140,18 @@ rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc* parcs)
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 */
|
||||||
|
|
||||||
@ -138,8 +140,18 @@ rdpPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc* parcs)
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 */
|
||||||
|
|
||||||
@ -100,6 +102,7 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
|
|||||||
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;
|
||||||
@ -121,8 +124,18 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpPolyFillRect: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -125,8 +127,18 @@ rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpPolyGlyphBlt: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -167,8 +169,18 @@ rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpPolyPoint: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -134,8 +136,18 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpPolyRectangle: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -130,8 +132,18 @@ rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment* pSegs)
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 */
|
||||||
|
|
||||||
@ -126,8 +128,18 @@ rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpPolyText16: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -126,8 +128,18 @@ rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpPolyText8: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -174,8 +176,18 @@ rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpPolylines: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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,7 +99,7 @@ rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
|
|||||||
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;
|
||||||
@ -119,8 +121,18 @@ rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpPushPixels: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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 */
|
||||||
|
|
||||||
@ -121,8 +123,18 @@ rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
|
LLOGLN(0, ("rdpPutImage: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
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);
|
||||||
|
@ -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;
|
||||||
|
|
||||||
@ -397,6 +399,10 @@ draw_item_add(rdpPixmapRec* priv, struct rdp_draw_item* di)
|
|||||||
priv->draw_item_tail->next = di;
|
priv->draw_item_tail->next = di;
|
||||||
priv->draw_item_tail = di;
|
priv->draw_item_tail = di;
|
||||||
}
|
}
|
||||||
|
if (priv == &g_screenPriv)
|
||||||
|
{
|
||||||
|
rdpScheduleDeferredUpdate();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,6 +605,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,
|
||||||
@ -876,42 +905,50 @@ 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;
|
||||||
rdpup_begin_update();
|
if (g_do_dirty_ons)
|
||||||
num_clip_rects = REGION_NUM_RECTS(&clip);
|
|
||||||
num_reg_rects = REGION_NUM_RECTS(®);
|
|
||||||
/* should maybe sort the rects instead of checking dy < 0 */
|
|
||||||
/* If we can depend on the rects going from top to bottom, left
|
|
||||||
to right we are ok */
|
|
||||||
if (dy < 0 || (dy == 0 && dx < 0))
|
|
||||||
{
|
{
|
||||||
for (j = 0; j < num_clip_rects; j++)
|
LLOGLN(0, ("rdpCopyWindow: gettig dirty TODO"));
|
||||||
{
|
//draw_item_add_srcblt_region
|
||||||
box1 = REGION_RECTS(&clip)[j];
|
|
||||||
rdpup_set_clip(box1.x1, box1.y1, box1.x2 - box1.x1, box1.y2 - box1.y1);
|
|
||||||
for (i = 0; i < num_reg_rects; i++)
|
|
||||||
{
|
|
||||||
box2 = REGION_RECTS(®)[i];
|
|
||||||
rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy, box2.x2 - box2.x1,
|
|
||||||
box2.y2 - box2.y1, box2.x1, box2.y1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (j = num_clip_rects - 1; j >= 0; j--)
|
rdpup_begin_update();
|
||||||
|
num_clip_rects = REGION_NUM_RECTS(&clip);
|
||||||
|
num_reg_rects = REGION_NUM_RECTS(®);
|
||||||
|
/* should maybe sort the rects instead of checking dy < 0 */
|
||||||
|
/* If we can depend on the rects going from top to bottom, left
|
||||||
|
to right we are ok */
|
||||||
|
if (dy < 0 || (dy == 0 && dx < 0))
|
||||||
{
|
{
|
||||||
box1 = REGION_RECTS(&clip)[j];
|
for (j = 0; j < num_clip_rects; j++)
|
||||||
rdpup_set_clip(box1.x1, box1.y1, box1.x2 - box1.x1, box1.y2 - box1.y1);
|
|
||||||
for (i = num_reg_rects - 1; i >= 0; i--)
|
|
||||||
{
|
{
|
||||||
box2 = REGION_RECTS(®)[i];
|
box1 = REGION_RECTS(&clip)[j];
|
||||||
rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy, box2.x2 - box2.x1,
|
rdpup_set_clip(box1.x1, box1.y1, box1.x2 - box1.x1, box1.y2 - box1.y1);
|
||||||
box2.y2 - box2.y1, box2.x1, box2.y1);
|
for (i = 0; i < num_reg_rects; i++)
|
||||||
|
{
|
||||||
|
box2 = REGION_RECTS(®)[i];
|
||||||
|
rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy, box2.x2 - box2.x1,
|
||||||
|
box2.y2 - box2.y1, box2.x1, box2.y1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (j = num_clip_rects - 1; j >= 0; j--)
|
||||||
|
{
|
||||||
|
box1 = REGION_RECTS(&clip)[j];
|
||||||
|
rdpup_set_clip(box1.x1, box1.y1, box1.x2 - box1.x1, box1.y2 - box1.y1);
|
||||||
|
for (i = num_reg_rects - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
box2 = REGION_RECTS(®)[i];
|
||||||
|
rdpup_screen_blt(box2.x1 + dx, box2.y1 + dy, box2.x2 - box2.x1,
|
||||||
|
box2.y2 - box2.y1, box2.x1, box2.y1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rdpup_reset_clip();
|
||||||
|
rdpup_end_update();
|
||||||
}
|
}
|
||||||
rdpup_reset_clip();
|
|
||||||
rdpup_end_update();
|
|
||||||
RegionUninit(®);
|
RegionUninit(®);
|
||||||
RegionUninit(&clip);
|
RegionUninit(&clip);
|
||||||
g_pScreen->CopyWindow = rdpCopyWindow;
|
g_pScreen->CopyWindow = rdpCopyWindow;
|
||||||
@ -947,13 +984,20 @@ rdpClearToBackground(WindowPtr pWin, int x, int y, int w, int h,
|
|||||||
}
|
}
|
||||||
RegionInit(®, &box, 0);
|
RegionInit(®, &box, 0);
|
||||||
RegionIntersect(®, ®, &pWin->clipList);
|
RegionIntersect(®, ®, &pWin->clipList);
|
||||||
rdpup_begin_update();
|
if (g_do_dirty_ons)
|
||||||
for (j = REGION_NUM_RECTS(®) - 1; j >= 0; j--)
|
|
||||||
{
|
{
|
||||||
box = REGION_RECTS(®)[j];
|
draw_item_add_img_region(&g_screenPriv, ®, GXcopy, RDI_IMGLL);
|
||||||
rdpup_send_area(0, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_begin_update();
|
||||||
|
for (j = REGION_NUM_RECTS(®) - 1; j >= 0; j--)
|
||||||
|
{
|
||||||
|
box = REGION_RECTS(®)[j];
|
||||||
|
rdpup_send_area(0, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
|
||||||
|
}
|
||||||
|
rdpup_end_update();
|
||||||
}
|
}
|
||||||
rdpup_end_update();
|
|
||||||
RegionUninit(®);
|
RegionUninit(®);
|
||||||
}
|
}
|
||||||
g_pScreen->ClearToBackground = rdpClearToBackground;
|
g_pScreen->ClearToBackground = rdpClearToBackground;
|
||||||
@ -968,18 +1012,25 @@ rdpRestoreAreas(WindowPtr pWin, RegionPtr prgnExposed)
|
|||||||
int j;
|
int j;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
LLOGLN(10, ("in rdpRestoreAreas"));
|
LLOGLN(0, ("in rdpRestoreAreas"));
|
||||||
RegionInit(®, NullBox, 0);
|
RegionInit(®, NullBox, 0);
|
||||||
RegionCopy(®, prgnExposed);
|
RegionCopy(®, 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);
|
||||||
rdpup_begin_update();
|
if (g_do_dirty_ons)
|
||||||
for (j = REGION_NUM_RECTS(®) - 1; j >= 0; j--)
|
|
||||||
{
|
{
|
||||||
box = REGION_RECTS(®)[j];
|
draw_item_add_img_region(&g_screenPriv, ®, GXcopy, RDI_IMGLL);
|
||||||
rdpup_send_area(0, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_begin_update();
|
||||||
|
for (j = REGION_NUM_RECTS(®) - 1; j >= 0; j--)
|
||||||
|
{
|
||||||
|
box = REGION_RECTS(®)[j];
|
||||||
|
rdpup_send_area(0, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1);
|
||||||
|
}
|
||||||
|
rdpup_end_update();
|
||||||
}
|
}
|
||||||
rdpup_end_update();
|
|
||||||
RegionUninit(®);
|
RegionUninit(®);
|
||||||
g_pScreen->RestoreAreas = rdpRestoreAreas;
|
g_pScreen->RestoreAreas = rdpRestoreAreas;
|
||||||
return rv;
|
return rv;
|
||||||
@ -1118,9 +1169,19 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
|
|||||||
if (pDstWnd->viewable)
|
if (pDstWnd->viewable)
|
||||||
{
|
{
|
||||||
post_process = 1;
|
post_process = 1;
|
||||||
rdpup_get_screen_image_rect(&id);
|
if (g_do_dirty_ons)
|
||||||
got_id = 1;
|
{
|
||||||
LLOGLN(10, ("rdpComposite: screen"));
|
LLOGLN(0, ("rdpComposite: gettig dirty"));
|
||||||
|
g_screenPriv.is_dirty = 1;
|
||||||
|
pDirtyPriv = &g_screenPriv;
|
||||||
|
dirty_type = RDI_IMGLL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpup_get_screen_image_rect(&id);
|
||||||
|
got_id = 1;
|
||||||
|
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;
|
||||||
|
|
||||||
@ -225,6 +228,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
|
||||||
@ -327,13 +336,21 @@ rdpup_send_pending(void)
|
|||||||
static CARD32
|
static CARD32
|
||||||
rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
|
rdpDeferredUpdateCallback(OsTimerPtr timer, CARD32 now, pointer arg)
|
||||||
{
|
{
|
||||||
rdpup_send_pending();
|
LLOGLN(10, ("rdpDeferredUpdateCallback"));
|
||||||
|
if (g_do_dirty_ons)
|
||||||
|
{
|
||||||
|
rdpup_check_dirty_screen(&g_screenPriv);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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)
|
||||||
@ -538,6 +555,31 @@ 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)
|
||||||
@ -661,6 +703,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
|
||||||
@ -829,6 +872,7 @@ 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)
|
||||||
@ -850,9 +894,17 @@ 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)
|
||||||
{
|
{
|
||||||
rdpScheduleDeferredUpdate();
|
if (g_do_dirty_ons)
|
||||||
|
{
|
||||||
|
rdpup_send_pending();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rdpScheduleDeferredUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1560,8 +1612,8 @@ rdpup_create_window(WindowPtr pWindow, rdpWindowRec* priv)
|
|||||||
out_uint16_le(g_out_s, pWindow->drawable.height); /* bottom */
|
out_uint16_le(g_out_s, pWindow->drawable.height); /* bottom */
|
||||||
}
|
}
|
||||||
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 */
|
||||||
for (index = 0; index < num_visibility_rects; index++)
|
for (index = 0; index < num_visibility_rects; index++)
|
||||||
@ -1694,6 +1746,9 @@ rdpup_check_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec* pDirtyPriv)
|
|||||||
rdpup_reset_clip();
|
rdpup_reset_clip();
|
||||||
rdpup_set_opcode(GXcopy);
|
rdpup_set_opcode(GXcopy);
|
||||||
break;
|
break;
|
||||||
|
case RDI_SCRBLT:
|
||||||
|
LLOGLN(10, (" RDI_SCRBLT"));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
di = di->next;
|
di = di->next;
|
||||||
}
|
}
|
||||||
@ -1703,3 +1758,112 @@ rdpup_check_dirty(PixmapPtr pDirtyPixmap, rdpPixmapRec* pDirtyPriv)
|
|||||||
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;
|
||||||
|
}
|
||||||
|
@ -192,12 +192,41 @@ int drawFont(int count, char *msg)
|
|||||||
return 0; // nothing to do
|
return 0; // nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
drawoffscreen(void)
|
||||||
|
{
|
||||||
|
int depth;
|
||||||
|
Pixmap pixmap1;
|
||||||
|
Pixmap pixmap2;
|
||||||
|
|
||||||
|
printf("draw off screen, should see green rect\n");
|
||||||
|
depth = DefaultDepth(g_disp, DefaultScreen(g_disp));
|
||||||
|
|
||||||
|
/* blue */
|
||||||
|
pixmap1 = XCreatePixmap(g_disp, g_win, 64, 64, depth);
|
||||||
|
XSetForeground(g_disp, g_gc, 0x000000ff);
|
||||||
|
XFillRectangle(g_disp, pixmap1, g_gc, 0, 0, 64, 64);
|
||||||
|
|
||||||
|
/* green */
|
||||||
|
pixmap2 = XCreatePixmap(g_disp, g_win, 64, 64, depth);
|
||||||
|
XSetForeground(g_disp, g_gc, 0x0000ff00);
|
||||||
|
XFillRectangle(g_disp, pixmap2, g_gc, 0, 0, 64, 64);
|
||||||
|
|
||||||
|
/* copy green to blue */
|
||||||
|
XCopyArea(g_disp, pixmap2, pixmap1, g_gc, 0, 0, 64, 64, 0, 0);
|
||||||
|
|
||||||
|
/* put on screen */
|
||||||
|
XCopyArea(g_disp, pixmap1, g_win, g_gc, 0, 0, 64, 64, 128, 128);
|
||||||
|
|
||||||
|
XFreePixmap(g_disp, pixmap1);
|
||||||
|
XFreePixmap(g_disp, pixmap2);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* display a usage message
|
* display a usage message
|
||||||
*/
|
*/
|
||||||
|
static void
|
||||||
void
|
usage(void)
|
||||||
usage()
|
|
||||||
{
|
{
|
||||||
printf("usage: xdemo [-l] [-r] [-s] [-f <string>] [-i <image file>] [-g <WxH>] [-c <count>] [-o <scroll type>] [-d <delay>] -z\n");
|
printf("usage: xdemo [-l] [-r] [-s] [-f <string>] [-i <image file>] [-g <WxH>] [-c <count>] [-o <scroll type>] [-d <delay>] -z\n");
|
||||||
printf(" -l draw lines\n");
|
printf(" -l draw lines\n");
|
||||||
@ -210,10 +239,12 @@ usage()
|
|||||||
printf(" -d <delay> loop delay in micro seconds, default 1000\n");
|
printf(" -d <delay> loop delay in micro seconds, default 1000\n");
|
||||||
printf(" -o <jump|smooth1|smooth2| define scrolling method\n");
|
printf(" -o <jump|smooth1|smooth2| define scrolling method\n");
|
||||||
printf(" smooth3|smooth4>\n");
|
printf(" smooth3|smooth4>\n");
|
||||||
printf(" -z <proxy_app> zero proxy counters for specified application\n\n");
|
printf(" -z <proxy_app> zero proxy counters for specified application\n");
|
||||||
|
printf(" -j offscreen to offscreen test\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int
|
||||||
|
main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
XEvent evt;
|
XEvent evt;
|
||||||
Colormap colormap;
|
Colormap colormap;
|
||||||
@ -230,6 +261,7 @@ int main(int argc, char **argv)
|
|||||||
int draw_stipples;
|
int draw_stipples;
|
||||||
int draw_fonts;
|
int draw_fonts;
|
||||||
int draw_image;
|
int draw_image;
|
||||||
|
int draw_offscreen;
|
||||||
int zero_counters;
|
int zero_counters;
|
||||||
int scroll_type;
|
int scroll_type;
|
||||||
char image_file[256];
|
char image_file[256];
|
||||||
@ -245,6 +277,7 @@ int main(int argc, char **argv)
|
|||||||
draw_stipples = 1;
|
draw_stipples = 1;
|
||||||
draw_fonts = 1;
|
draw_fonts = 1;
|
||||||
draw_image = 1;
|
draw_image = 1;
|
||||||
|
draw_offscreen = 1;
|
||||||
g_delay_dur = 1000;
|
g_delay_dur = 1000;
|
||||||
scroll_type = SCROLL_SMOOTH1;
|
scroll_type = SCROLL_SMOOTH1;
|
||||||
zero_counters = 0;
|
zero_counters = 0;
|
||||||
@ -253,10 +286,20 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
// process cmd line args
|
// process cmd line args
|
||||||
opterr = 0;
|
opterr = 0;
|
||||||
while ((opt = getopt(argc, argv, "lrsg:c:f:i:d:o:z:")) != -1)
|
while ((opt = getopt(argc, argv, "lrsjg:c:f:i:d:o:z:")) != -1)
|
||||||
{
|
{
|
||||||
switch (opt)
|
switch (opt)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
case 'j':
|
||||||
|
draw_lines = 0;
|
||||||
|
draw_rects = 0;
|
||||||
|
draw_stipples = 0;
|
||||||
|
draw_fonts = 0;
|
||||||
|
draw_image = 0;
|
||||||
|
draw_offscreen = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'g':
|
case 'g':
|
||||||
if (sscanf(optarg, "%dx%d", &g_winWidth, &g_winHeight) != 2) {
|
if (sscanf(optarg, "%dx%d", &g_winWidth, &g_winHeight) != 2) {
|
||||||
fprintf(stderr, "\nerror: invalid geometry specified\n\n");
|
fprintf(stderr, "\nerror: invalid geometry specified\n\n");
|
||||||
@ -279,6 +322,7 @@ int main(int argc, char **argv)
|
|||||||
draw_stipples = 0;
|
draw_stipples = 0;
|
||||||
draw_fonts = 0;
|
draw_fonts = 0;
|
||||||
draw_image = 0;
|
draw_image = 0;
|
||||||
|
draw_offscreen = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'r':
|
case 'r':
|
||||||
@ -287,6 +331,7 @@ int main(int argc, char **argv)
|
|||||||
draw_stipples = 0;
|
draw_stipples = 0;
|
||||||
draw_fonts = 0;
|
draw_fonts = 0;
|
||||||
draw_image = 0;
|
draw_image = 0;
|
||||||
|
draw_offscreen = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
@ -295,6 +340,7 @@ int main(int argc, char **argv)
|
|||||||
draw_rects = 0;
|
draw_rects = 0;
|
||||||
draw_fonts = 0;
|
draw_fonts = 0;
|
||||||
draw_image = 0;
|
draw_image = 0;
|
||||||
|
draw_offscreen = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'f':
|
case 'f':
|
||||||
@ -309,6 +355,7 @@ int main(int argc, char **argv)
|
|||||||
draw_rects = 0;
|
draw_rects = 0;
|
||||||
draw_stipples = 0;
|
draw_stipples = 0;
|
||||||
draw_image = 0;
|
draw_image = 0;
|
||||||
|
draw_offscreen = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'i':
|
case 'i':
|
||||||
@ -323,6 +370,7 @@ int main(int argc, char **argv)
|
|||||||
draw_rects = 0;
|
draw_rects = 0;
|
||||||
draw_stipples = 0;
|
draw_stipples = 0;
|
||||||
draw_fonts = 0;
|
draw_fonts = 0;
|
||||||
|
draw_offscreen= 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
@ -385,7 +433,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
// must have at least one operation
|
// must have at least one operation
|
||||||
if ((!draw_lines) && (!draw_rects) && (!draw_stipples) &&
|
if ((!draw_lines) && (!draw_rects) && (!draw_stipples) &&
|
||||||
(!draw_fonts) && (!draw_image)) {
|
(!draw_fonts) && (!draw_image) && (!draw_offscreen)) {
|
||||||
usage();
|
usage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -491,19 +539,28 @@ int main(int argc, char **argv)
|
|||||||
printf("drew BMP in %d ms\n", time_elapsed_ms(tv));
|
printf("drew BMP in %d ms\n", time_elapsed_ms(tv));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (draw_offscreen) {
|
||||||
|
}
|
||||||
|
|
||||||
if (zero_counters) {
|
if (zero_counters) {
|
||||||
signal_tcp_proxy(proxy_app);
|
signal_tcp_proxy(proxy_app);
|
||||||
}
|
}
|
||||||
|
|
||||||
eventMask = ButtonPressMask|ButtonReleaseMask;
|
eventMask = ButtonPressMask | ButtonReleaseMask | KeyPressMask;
|
||||||
|
|
||||||
XSelectInput(g_disp, g_win, eventMask);
|
XSelectInput(g_disp, g_win, eventMask);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
XNextEvent(g_disp, &evt); // calls XFlush()
|
XNextEvent(g_disp, &evt); // calls XFlush()
|
||||||
|
if (evt.type == KeyPress) {
|
||||||
|
if (draw_offscreen) {
|
||||||
|
drawoffscreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
while(evt.type != ButtonRelease);
|
while (evt.type != ButtonRelease);
|
||||||
|
|
||||||
XDestroyWindow(g_disp, g_win);
|
XDestroyWindow(g_disp, g_win);
|
||||||
XCloseDisplay(g_disp);
|
XCloseDisplay(g_disp);
|
||||||
|
Loading…
Reference in New Issue
Block a user