From 1123323fda6d128fb98b0427e0ea5f6a2dc9e632 Mon Sep 17 00:00:00 2001 From: Laxmikant Rashinkar Date: Wed, 19 Sep 2012 20:51:34 -0700 Subject: o moved from GNU General Public License to Apache License, Version 2.0 o applied new coding standards to all .c files o moved some files around --- xorg/X11R7.6/rdp/rdpFillSpans.c | 119 +++++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 56 deletions(-) (limited to 'xorg/X11R7.6/rdp/rdpFillSpans.c') diff --git a/xorg/X11R7.6/rdp/rdpFillSpans.c b/xorg/X11R7.6/rdp/rdpFillSpans.c index 5c3dcc67..b647dabc 100644 --- a/xorg/X11R7.6/rdp/rdpFillSpans.c +++ b/xorg/X11R7.6/rdp/rdpFillSpans.c @@ -26,9 +26,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define LOG_LEVEL 1 #define LLOG(_level, _args) \ - do { if (_level < LOG_LEVEL) { ErrorF _args ; } } while (0) + do { if (_level < LOG_LEVEL) { ErrorF _args ; } } while (0) #define LLOGLN(_level, _args) \ - do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) + do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) extern rdpScreenInfoRec g_rdpScreen; /* from rdpmain.c */ extern DevPrivateKeyRec g_rdpGCIndex; /* from rdpmain.c */ @@ -45,70 +45,77 @@ extern int g_con_number; /* in rdpup.c */ /******************************************************************************/ static void rdpFillSpansOrg(DrawablePtr pDrawable, GCPtr pGC, int nInit, - DDXPointPtr pptInit, int* pwidthInit, int fSorted) + DDXPointPtr pptInit, int *pwidthInit, int fSorted) { - rdpGCPtr priv; - GCFuncs* oldFuncs; + rdpGCPtr priv; + GCFuncs *oldFuncs; - GC_OP_PROLOGUE(pGC); - pGC->ops->FillSpans(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted); - GC_OP_EPILOGUE(pGC); + GC_OP_PROLOGUE(pGC); + pGC->ops->FillSpans(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted); + GC_OP_EPILOGUE(pGC); } /******************************************************************************/ void rdpFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit, - DDXPointPtr pptInit, int* pwidthInit, int fSorted) + DDXPointPtr pptInit, int *pwidthInit, int fSorted) { - RegionRec clip_reg; - int cd; - int got_id; - struct image_data id; - WindowPtr pDstWnd; - PixmapPtr pDstPixmap; - rdpPixmapRec* pDstPriv; - - LLOGLN(10, ("rdpFillSpans: todo")); - - /* do original call */ - rdpFillSpansOrg(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted); - - got_id = 0; - if (pDrawable->type == DRAWABLE_PIXMAP) - { - pDstPixmap = (PixmapPtr)pDrawable; - pDstPriv = GETPIXPRIV(pDstPixmap); - if (XRDP_IS_OS(pDstPriv)) + RegionRec clip_reg; + int cd; + int got_id; + struct image_data id; + WindowPtr pDstWnd; + PixmapPtr pDstPixmap; + rdpPixmapRec *pDstPriv; + + LLOGLN(10, ("rdpFillSpans: todo")); + + /* do original call */ + rdpFillSpansOrg(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted); + + got_id = 0; + + if (pDrawable->type == DRAWABLE_PIXMAP) + { + pDstPixmap = (PixmapPtr)pDrawable; + pDstPriv = GETPIXPRIV(pDstPixmap); + + 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) { - rdpup_switch_os_surface(pDstPriv->rdpindex); - rdpup_get_pixmap_image_rect(pDstPixmap, &id); - got_id = 1; + return; } - } - else - { - if (pDrawable->type == DRAWABLE_WINDOW) + + RegionInit(&clip_reg, NullBox, 0); + cd = rdp_get_clip(&clip_reg, pDrawable, pGC); + + if (cd == 1) { - pDstWnd = (WindowPtr)pDrawable; - if (pDstWnd->viewable) - { - rdpup_get_screen_image_rect(&id); - got_id = 1; - } } - } - if (!got_id) - { - return; - } - RegionInit(&clip_reg, NullBox, 0); - cd = rdp_get_clip(&clip_reg, pDrawable, pGC); - if (cd == 1) - { - } - else if (cd == 2) - { - } - RegionUninit(&clip_reg); - rdpup_switch_os_surface(-1); + else if (cd == 2) + { + } + + RegionUninit(&clip_reg); + rdpup_switch_os_surface(-1); } -- cgit v1.2.1