diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2014-01-21 01:45:30 -0800 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2014-01-21 01:45:30 -0800 |
commit | 055c577f5497b55fd7bb597c7303aa1236b39d61 (patch) | |
tree | 666835d385b29c33f17c97dcc74f2f215f1d3afa /xorg/server/module/rdpPutImage.c | |
parent | 147ace738233435408df18415c7d802631f7fecc (diff) | |
download | xrdp-proprietary-055c577f5497b55fd7bb597c7303aa1236b39d61.tar.gz xrdp-proprietary-055c577f5497b55fd7bb597c7303aa1236b39d61.zip |
xorg: work on xorg driver
Diffstat (limited to 'xorg/server/module/rdpPutImage.c')
-rw-r--r-- | xorg/server/module/rdpPutImage.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/xorg/server/module/rdpPutImage.c b/xorg/server/module/rdpPutImage.c index 9a7d49b2..45849c6e 100644 --- a/xorg/server/module/rdpPutImage.c +++ b/xorg/server/module/rdpPutImage.c @@ -32,12 +32,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "rdp.h" #include "rdpDraw.h" +#include "rdpClientCon.h" +#include "rdpReg.h" #define LOG_LEVEL 1 #define LLOGLN(_level, _args) \ do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) /******************************************************************************/ +void +rdpPutImagePre(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDst, GCPtr pGC, int depth, int x, int y, + int w, int h, int leftPad, int format, char *pBits) +{ +} + +/******************************************************************************/ static void rdpPutImageOrg(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pBits) @@ -52,10 +63,72 @@ rdpPutImageOrg(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y, /******************************************************************************/ void +rdpPutImagePost(rdpPtr dev, rdpClientCon *clientCon, + int cd, RegionPtr clip_reg, + DrawablePtr pDst, GCPtr pGC, int depth, int x, int y, + int w, int h, int leftPad, int format, char *pBits) +{ + WindowPtr pDstWnd; + BoxRec box; + RegionRec reg; + + if (cd == 0) + { + return; + } + if (pDst->type != DRAWABLE_WINDOW) + { + return; + } + pDstWnd = (WindowPtr) pDst; + if (pDstWnd->viewable == FALSE) + { + return; + } + box.x1 = x + pDst->x; + box.y1 = y + pDst->y; + box.x2 = box.x1 + w; + box.y2 = box.y1 + h; + rdpRegionInit(®, &box, 0); + if (cd == 2) + { + rdpRegionIntersect(®, clip_reg, ®); + } + rdpClientConAddDirtyScreenReg(dev, clientCon, ®); + RegionUninit(®); +} + +/******************************************************************************/ +void rdpPutImage(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pBits) { + rdpPtr dev; + rdpClientCon *clientCon; + RegionRec clip_reg; + int cd; + LLOGLN(10, ("rdpPutImage:")); + dev = rdpGetDevFromScreen(pGC->pScreen); + rdpRegionInit(&clip_reg, NullBox, 0); + cd = rdpDrawGetClip(dev, &clip_reg, pDst, pGC); + LLOGLN(10, ("rdpPutImage: cd %d", cd)); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPutImagePre(dev, clientCon, cd, &clip_reg, pDst, pGC, depth, x, y, + w, h, leftPad, format, pBits); + clientCon = clientCon->next; + } + /* do original call */ rdpPutImageOrg(pDst, pGC, depth, x, y, w, h, leftPad, format, pBits); + clientCon = dev->clientConHead; + while (clientCon != NULL) + { + rdpPutImagePost(dev, clientCon, cd, &clip_reg, pDst, pGC, depth, x, y, + w, h, leftPad, format, pBits); + clientCon = clientCon->next; + } + RegionUninit(&clip_reg); } |