diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-11-14 20:30:33 -0800 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-11-14 20:30:33 -0800 |
commit | c20dbff64410ce312112db5eb7e3f2930ed8ba86 (patch) | |
tree | f54642b29cb55ca49474d524c2ae6c2ea0eb95c5 /xorg/server/module/rdpDraw.c | |
parent | f5e9bc3308617eefd7a527d91a97aef4b8c2369b (diff) | |
download | xrdp-proprietary-c20dbff64410ce312112db5eb7e3f2930ed8ba86.tar.gz xrdp-proprietary-c20dbff64410ce312112db5eb7e3f2930ed8ba86.zip |
xorg: work on xrdp xorg driver
Diffstat (limited to 'xorg/server/module/rdpDraw.c')
-rw-r--r-- | xorg/server/module/rdpDraw.c | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/xorg/server/module/rdpDraw.c b/xorg/server/module/rdpDraw.c index 08fe4b85..779eae76 100644 --- a/xorg/server/module/rdpDraw.c +++ b/xorg/server/module/rdpDraw.c @@ -39,11 +39,99 @@ misc draw calls #include "rdp.h" #include "rdpDraw.h" +#include "rdpClientCon.h" +#include "rdpMisc.h" +#include "rdpGlyphs.h" #define LOG_LEVEL 1 #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) +/******************************************************************************/ +int +rdpDrawItemAdd(rdpPtr dev, rdpPixmapRec *priv, struct rdp_draw_item *di) +{ + priv->is_alpha_dirty_not = FALSE; + + if (priv->draw_item_tail == NULL) + { + priv->draw_item_tail = di; + priv->draw_item_head = di; + } + else + { + di->prev = priv->draw_item_tail; + priv->draw_item_tail->next = di; + priv->draw_item_tail = di; + } + + if (priv == &(dev->screenPriv)) + { + rdpClientConScheduleDeferredUpdate(dev); + } + + return 0; +} + +/******************************************************************************/ +int +rdpDrawItemRemove(rdpPtr dev, rdpPixmapRec *priv, struct rdp_draw_item *di) +{ + if (di->prev != NULL) + { + di->prev->next = di->next; + } + + if (di->next != NULL) + { + di->next->prev = di->prev; + } + + if (priv->draw_item_head == di) + { + priv->draw_item_head = di->next; + } + + if (priv->draw_item_tail == di) + { + priv->draw_item_tail = di->prev; + } + + if (di->type == RDI_LINE) + { + if (di->u.line.segs != NULL) + { + g_free(di->u.line.segs); + } + } + + if (di->type == RDI_TEXT) + { + rdpGlyphDeleteRdpText(di->u.text.rtext); + } + + RegionDestroy(di->reg); + g_free(di); + return 0; +} + +/******************************************************************************/ +int +rdpDrawItemRemoveAll(rdpPtr dev, rdpPixmapRec *priv) +{ + struct rdp_draw_item *di; + + di = priv->draw_item_head; + + while (di != NULL) + { + rdpDrawItemRemove(dev, priv, di); + di = priv->draw_item_head; + } + + return 0; +} + /*****************************************************************************/ void rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion) |