xorg: work on xorg driver

ulab-next
Jay Sorg 11 years ago
parent 448b7a5d4b
commit 320ce8ba47

@ -110,7 +110,6 @@ rdpCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
RegionRec clip_reg; RegionRec clip_reg;
int cd; int cd;
LLOGLN(10, ("rdpCopyArea:")); LLOGLN(10, ("rdpCopyArea:"));
dev = rdpGetDevFromScreen(pGC->pScreen); dev = rdpGetDevFromScreen(pGC->pScreen);
rdpRegionInit(&clip_reg, NullBox, 0); rdpRegionInit(&clip_reg, NullBox, 0);

@ -61,7 +61,7 @@ rdpCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
{ {
RegionPtr rv; RegionPtr rv;
LLOGLN(10, ("rdpCopyPlane:")); LLOGLN(0, ("rdpCopyPlane:"));
/* do original call */ /* do original call */
rv = rdpCopyPlaneOrg(pSrc, pDst, pGC, srcx, srcy, w, h, rv = rdpCopyPlaneOrg(pSrc, pDst, pGC, srcx, srcy, w, h,
dstx, dsty, bitPlane); dstx, dsty, bitPlane);

@ -27,6 +27,7 @@ misc draw calls
/* this should be before all X11 .h files */ /* this should be before all X11 .h files */
#include <xorg-server.h> #include <xorg-server.h>
#include <xorgVersion.h>
/* all driver need this */ /* all driver need this */
#include <xf86.h> #include <xf86.h>
@ -365,7 +366,7 @@ rdpCloseScreen(int index, ScreenPtr pScreen)
WindowPtr WindowPtr
rdpGetRootWindowPtr(ScreenPtr pScreen) rdpGetRootWindowPtr(ScreenPtr pScreen)
{ {
#if XORG_VERSION_CURRENT < (((1) * 10000000) + ((9) * 100000) + ((0) * 1000) + 0) #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 9, 0, 0, 0)
return WindowTable[pScreen->myNum]; /* in globals.c */ return WindowTable[pScreen->myNum]; /* in globals.c */
#else #else
return pScreen->root; return pScreen->root;

@ -27,7 +27,7 @@ misc draw calls
#include <xorg-server.h> #include <xorg-server.h>
#include <xf86.h> #include <xf86.h>
/* true is drawable is window or pixmap is screen */ /* true if drawable is window or pixmap is screen */
#define XRDP_DRAWABLE_IS_VISIBLE(_dev, _drw) \ #define XRDP_DRAWABLE_IS_VISIBLE(_dev, _drw) \
(((_drw)->type == DRAWABLE_WINDOW && ((WindowPtr)(_drw))->viewable) || \ (((_drw)->type == DRAWABLE_WINDOW && ((WindowPtr)(_drw))->viewable) || \
((_drw)->type == DRAWABLE_PIXMAP && \ ((_drw)->type == DRAWABLE_PIXMAP && \

@ -56,7 +56,7 @@ rdpFillPolygon(DrawablePtr pDrawable, GCPtr pGC,
int shape, int mode, int count, int shape, int mode, int count,
DDXPointPtr pPts) DDXPointPtr pPts)
{ {
LLOGLN(10, ("rdpFillPolygon:")); LLOGLN(0, ("rdpFillPolygon:"));
/* do original call */ /* do original call */
rdpFillPolygonOrg(pDrawable, pGC, shape, mode, count, pPts); rdpFillPolygonOrg(pDrawable, pGC, shape, mode, count, pPts);
} }

@ -32,6 +32,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
#define LOG_LEVEL 1 #define LOG_LEVEL 1
#define LLOGLN(_level, _args) \ #define LLOGLN(_level, _args) \
@ -56,7 +58,7 @@ rdpImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph, int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase) CharInfoPtr *ppci, pointer pglyphBase)
{ {
LLOGLN(10, ("rdpImageGlyphBlt:")); LLOGLN(0, ("rdpImageGlyphBlt:"));
/* do original call */ /* do original call */
rdpImageGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); rdpImageGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
} }

@ -39,6 +39,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define LLOGLN(_level, _args) \ #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)
/******************************************************************************/
void
rdpImageText8Pre(rdpPtr dev, rdpClientCon *clientCon,
int cd, RegionPtr clip_reg,
DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars,
BoxPtr box)
{
}
/******************************************************************************/ /******************************************************************************/
void void
rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC, rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC,
@ -51,13 +61,65 @@ rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC,
GC_OP_EPILOGUE(pGC); GC_OP_EPILOGUE(pGC);
} }
/******************************************************************************/
void
rdpImageText8Post(rdpPtr dev, rdpClientCon *clientCon,
int cd, RegionPtr clip_reg,
DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars,
BoxPtr box)
{
RegionRec reg;
if (cd == 0)
{
return;
}
if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
{
return;
}
rdpRegionInit(&reg, box, 0);
if (cd == 2)
{
rdpRegionIntersect(&reg, clip_reg, &reg);
}
rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
RegionUninit(&reg);
}
/******************************************************************************/ /******************************************************************************/
void void
rdpImageText8(DrawablePtr pDrawable, GCPtr pGC, rdpImageText8(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars) int x, int y, int count, char *chars)
{ {
LLOGLN(0, ("rdpImageText8:")); rdpPtr dev;
rdpClientCon *clientCon;
RegionRec clip_reg;
int cd;
BoxRec box;
LLOGLN(10, ("rdpImageText8:"));
dev = rdpGetDevFromScreen(pGC->pScreen);
GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box);
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpImageText8: cd %d", cd));
clientCon = dev->clientConHead;
while (clientCon != NULL)
{
rdpImageText8Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
x, y, count, chars, &box);
clientCon = clientCon->next;
}
/* do original call */ /* do original call */
rdpImageText8Org(pDrawable, pGC, x, y, count, chars); rdpImageText8Org(pDrawable, pGC, x, y, count, chars);
return; clientCon = dev->clientConHead;
while (clientCon != NULL)
{
rdpImageText8Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
x, y, count, chars, &box);
clientCon = clientCon->next;
}
RegionUninit(&clip_reg);
} }

@ -52,7 +52,7 @@ rdpPolyArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
void void
rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs) rdpPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{ {
LLOGLN(10, ("rdpPolyArc:")); LLOGLN(0, ("rdpPolyArc:"));
/* do original call */ /* do original call */
rdpPolyArcOrg(pDrawable, pGC, narcs, parcs); rdpPolyArcOrg(pDrawable, pGC, narcs, parcs);
} }

@ -43,7 +43,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
static void static void
rdpPolyFillRectPre(rdpPtr dev, rdpClientCon *clientCon, rdpPolyFillRectPre(rdpPtr dev, rdpClientCon *clientCon,
int cd, RegionPtr clip_reg, int cd, RegionPtr clip_reg,
DrawablePtr pDrawable, GCPtr pGC, RegionPtr fill_reg) DrawablePtr pDrawable, GCPtr pGC,
int nrectFill, xRectangle *prectInit,
RegionPtr fill_reg)
{ {
} }
@ -63,7 +65,9 @@ rdpPolyFillRectOrg(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
static void static void
rdpPolyFillRectPost(rdpPtr dev, rdpClientCon *clientCon, rdpPolyFillRectPost(rdpPtr dev, rdpClientCon *clientCon,
int cd, RegionPtr clip_reg, int cd, RegionPtr clip_reg,
DrawablePtr pDrawable, GCPtr pGC, RegionPtr fill_reg) DrawablePtr pDrawable, GCPtr pGC,
int nrectFill, xRectangle *prectInit,
RegionPtr fill_reg)
{ {
if (cd == 0) if (cd == 0)
{ {
@ -105,7 +109,7 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
while (clientCon != NULL) while (clientCon != NULL)
{ {
rdpPolyFillRectPre(dev, clientCon, cd, &clip_reg, pDrawable, rdpPolyFillRectPre(dev, clientCon, cd, &clip_reg, pDrawable,
pGC, fill_reg); pGC, nrectFill, prectInit, fill_reg);
clientCon = clientCon->next; clientCon = clientCon->next;
} }
/* do original call */ /* do original call */
@ -114,9 +118,9 @@ rdpPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
while (clientCon != NULL) while (clientCon != NULL)
{ {
rdpPolyFillRectPost(dev, clientCon, cd, &clip_reg, pDrawable, rdpPolyFillRectPost(dev, clientCon, cd, &clip_reg, pDrawable,
pGC, fill_reg); pGC, nrectFill, prectInit, fill_reg);
clientCon = clientCon->next; clientCon = clientCon->next;
} }
RegionUninit(&clip_reg); rdpRegionUninit(&clip_reg);
rdpRegionDestroy(fill_reg); rdpRegionDestroy(fill_reg);
} }

@ -56,7 +56,7 @@ rdpPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph, int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase) CharInfoPtr *ppci, pointer pglyphBase)
{ {
LLOGLN(10, ("rdpPolyGlyphBlt:")); LLOGLN(0, ("rdpPolyGlyphBlt:"));
/* do original call */ /* do original call */
rdpPolyGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); rdpPolyGlyphBltOrg(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
} }

@ -54,7 +54,7 @@ void
rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, rdpPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode,
int npt, DDXPointPtr in_pts) int npt, DDXPointPtr in_pts)
{ {
LLOGLN(10, ("rdpPolyPoint:")); LLOGLN(0, ("rdpPolyPoint:"));
/* do original call */ /* do original call */
rdpPolyPointOrg(pDrawable, pGC, mode, npt, in_pts); rdpPolyPointOrg(pDrawable, pGC, mode, npt, in_pts);
} }

@ -32,11 +32,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
#define LOG_LEVEL 1 #define LOG_LEVEL 1
#define LLOGLN(_level, _args) \ #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)
/******************************************************************************/
void
rdpPolyRectanglePre(rdpPtr dev, rdpClientCon *clientCon,
int cd, RegionPtr clip_reg,
DrawablePtr pDrawable, GCPtr pGC, int nrects,
xRectangle *rects, RegionPtr reg)
{
}
/******************************************************************************/ /******************************************************************************/
static void static void
rdpPolyRectangleOrg(DrawablePtr pDrawable, GCPtr pGC, int nrects, rdpPolyRectangleOrg(DrawablePtr pDrawable, GCPtr pGC, int nrects,
@ -50,12 +61,104 @@ rdpPolyRectangleOrg(DrawablePtr pDrawable, GCPtr pGC, int nrects,
} }
/******************************************************************************/ /******************************************************************************/
/* tested with pGC->lineWidth = 0, 1, 2, 4 and opcodes 3 and 6 */ void
rdpPolyRectanglePost(rdpPtr dev, rdpClientCon *clientCon,
int cd, RegionPtr clip_reg,
DrawablePtr pDrawable, GCPtr pGC, int nrects,
xRectangle *rects, RegionPtr reg)
{
if (cd == 0)
{
return;
}
if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
{
return;
}
if (cd == 2)
{
rdpRegionIntersect(reg, clip_reg, reg);
}
rdpClientConAddDirtyScreenReg(dev, clientCon, reg);
}
/******************************************************************************/
void void
rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects, rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
xRectangle *rects) xRectangle *rects)
{ {
rdpPtr dev;
rdpClientCon *clientCon;
BoxRec box;
int index;
int up;
int down;
int lw;
int cd;
RegionRec clip_reg;
RegionRec reg;
LLOGLN(10, ("rdpPolyRectangle:")); LLOGLN(10, ("rdpPolyRectangle:"));
dev = rdpGetDevFromScreen(pGC->pScreen);
rdpRegionInit(&reg, NullBox, 0);
lw = pGC->lineWidth;
if (lw < 1)
{
lw = 1;
}
up = lw / 2;
down = 1 + (lw - 1) / 2;
index = 0;
while (index < nrects)
{
box.x1 = (rects[index].x + pDrawable->x) - up;
box.y1 = (rects[index].y + pDrawable->y) - up;
box.x2 = box.x1 + rects[index].width + (up + down);
box.y2 = box.y1 + lw;
rdpRegionUnionRect(&reg, &box);
box.x1 = (rects[index].x + pDrawable->x) - up;
box.y1 = (rects[index].y + pDrawable->y) + down;
box.x2 = box.x1 + lw;
box.y2 = box.y1 + rects[index].height - (up + down);
rdpRegionUnionRect(&reg, &box);
box.x1 = ((rects[index].x + rects[index].width) + pDrawable->x) - up;
box.y1 = (rects[index].y + pDrawable->y) + down;
box.x2 = box.x1 + lw;
box.y2 = box.y1 + rects[index].height - (up + down);
rdpRegionUnionRect(&reg, &box);
box.x1 = (rects[index].x + pDrawable->x) - up;
box.y1 = ((rects[index].y + rects[index].height) + pDrawable->y) - up;
box.x2 = box.x1 + rects[index].width + (up + down);
box.y2 = box.y1 + lw;
rdpRegionUnionRect(&reg, &box);
index++;
}
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpPolyRectangle: cd %d", cd));
clientCon = dev->clientConHead;
while (clientCon != NULL)
{
rdpPolyRectanglePre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
nrects, rects, &reg);
clientCon = clientCon->next;
}
/* do original call */ /* do original call */
rdpPolyRectangleOrg(pDrawable, pGC, nrects, rects); rdpPolyRectangleOrg(pDrawable, pGC, nrects, rects);
clientCon = dev->clientConHead;
while (clientCon != NULL)
{
rdpPolyRectanglePost(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
nrects, rects, &reg);
clientCon = clientCon->next;
}
rdpRegionUninit(&reg);
} }

@ -52,7 +52,7 @@ rdpPolySegmentOrg(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs)
void void
rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs) rdpPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs)
{ {
LLOGLN(10, ("rdpPolySegment:")); LLOGLN(0, ("rdpPolySegment:"));
/* do original call */ /* do original call */
rdpPolySegmentOrg(pDrawable, pGC, nseg, pSegs); rdpPolySegmentOrg(pDrawable, pGC, nseg, pSegs);
} }

@ -32,11 +32,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
#define LOG_LEVEL 1 #define LOG_LEVEL 1
#define LLOGLN(_level, _args) \ #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)
/******************************************************************************/
void
rdpPolyText16Pre(rdpPtr dev, rdpClientCon *clientCon,
int cd, RegionPtr clip_reg,
DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars,
BoxPtr box)
{
}
/******************************************************************************/ /******************************************************************************/
int int
rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC, rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC,
@ -51,15 +63,67 @@ rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC,
return rv; return rv;
} }
/******************************************************************************/
void
rdpPolyText16Post(rdpPtr dev, rdpClientCon *clientCon,
int cd, RegionPtr clip_reg,
DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars,
BoxPtr box)
{
RegionRec reg;
if (cd == 0)
{
return;
}
if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
{
return;
}
rdpRegionInit(&reg, box, 0);
if (cd == 2)
{
rdpRegionIntersect(&reg, clip_reg, &reg);
}
rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
RegionUninit(&reg);
}
/******************************************************************************/ /******************************************************************************/
int int
rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC, rdpPolyText16(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars) int x, int y, int count, unsigned short *chars)
{ {
int rv; int rv;
rdpPtr dev;
rdpClientCon *clientCon;
RegionRec clip_reg;
int cd;
BoxRec box;
LLOGLN(0, ("rdpPolyText16:")); LLOGLN(10, ("rdpPolyText16:"));
dev = rdpGetDevFromScreen(pGC->pScreen);
GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box);
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpPolyText16: cd %d", cd));
clientCon = dev->clientConHead;
while (clientCon != NULL)
{
rdpPolyText16Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
x, y, count, chars, &box);
clientCon = clientCon->next;
}
/* do original call */ /* do original call */
rv = rdpPolyText16Org(pDrawable, pGC, x, y, count, chars); rv = rdpPolyText16Org(pDrawable, pGC, x, y, count, chars);
clientCon = dev->clientConHead;
while (clientCon != NULL)
{
rdpPolyText16Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
x, y, count, chars, &box);
clientCon = clientCon->next;
}
RegionUninit(&clip_reg);
return rv; return rv;
} }

@ -32,11 +32,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"
#include "rdpClientCon.h"
#include "rdpReg.h"
#define LOG_LEVEL 1 #define LOG_LEVEL 1
#define LLOGLN(_level, _args) \ #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)
/******************************************************************************/
void
rdpPolyText8Pre(rdpPtr dev, rdpClientCon *clientCon,
int cd, RegionPtr clip_reg,
DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars,
BoxPtr box)
{
}
/******************************************************************************/ /******************************************************************************/
int int
rdpPolyText8Org(DrawablePtr pDrawable, GCPtr pGC, rdpPolyText8Org(DrawablePtr pDrawable, GCPtr pGC,
@ -51,15 +63,67 @@ rdpPolyText8Org(DrawablePtr pDrawable, GCPtr pGC,
return rv; return rv;
} }
/******************************************************************************/
void
rdpPolyText8Post(rdpPtr dev, rdpClientCon *clientCon,
int cd, RegionPtr clip_reg,
DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars,
BoxPtr box)
{
RegionRec reg;
if (cd == 0)
{
return;
}
if (!XRDP_DRAWABLE_IS_VISIBLE(dev, pDrawable))
{
return;
}
rdpRegionInit(&reg, box, 0);
if (cd == 2)
{
rdpRegionIntersect(&reg, clip_reg, &reg);
}
rdpClientConAddDirtyScreenReg(dev, clientCon, &reg);
RegionUninit(&reg);
}
/******************************************************************************/ /******************************************************************************/
int int
rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC, rdpPolyText8(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars) int x, int y, int count, char *chars)
{ {
int rv; int rv;
rdpPtr dev;
rdpClientCon *clientCon;
RegionRec clip_reg;
int cd;
BoxRec box;
LLOGLN(0, ("rdpPolyText8:")); LLOGLN(10, ("rdpPolyText8:"));
dev = rdpGetDevFromScreen(pGC->pScreen);
GetTextBoundingBox(pDrawable, pGC->font, x, y, count, &box);
rdpRegionInit(&clip_reg, NullBox, 0);
cd = rdpDrawGetClip(dev, &clip_reg, pDrawable, pGC);
LLOGLN(10, ("rdpPolyText8: cd %d", cd));
clientCon = dev->clientConHead;
while (clientCon != NULL)
{
rdpPolyText8Pre(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
x, y, count, chars, &box);
clientCon = clientCon->next;
}
/* do original call */ /* do original call */
rv = rdpPolyText8Org(pDrawable, pGC, x, y, count, chars); rv = rdpPolyText8Org(pDrawable, pGC, x, y, count, chars);
clientCon = dev->clientConHead;
while (clientCon != NULL)
{
rdpPolyText8Post(dev, clientCon, cd, &clip_reg, pDrawable, pGC,
x, y, count, chars, &box);
clientCon = clientCon->next;
}
RegionUninit(&clip_reg);
return rv; return rv;
} }

@ -54,7 +54,7 @@ void
rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, rdpPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode,
int npt, DDXPointPtr pptInit) int npt, DDXPointPtr pptInit)
{ {
LLOGLN(10, ("rdpPolylines:")); LLOGLN(0, ("rdpPolylines:"));
/* do original call */ /* do original call */
rdpPolylinesOrg(pDrawable, pGC, mode, npt, pptInit); rdpPolylinesOrg(pDrawable, pGC, mode, npt, pptInit);
} }

@ -1,5 +1,5 @@
/* /*
Copyright 2013 Jay Sorg Copyright 2013-2014 Jay Sorg
Permission to use, copy, modify, distribute, and sell this software and its Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that documentation for any purpose is hereby granted without fee, provided that

@ -54,7 +54,7 @@ void
rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst, rdpPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
int w, int h, int x, int y) int w, int h, int x, int y)
{ {
LLOGLN(10, ("rdpPushPixels:")); LLOGLN(0, ("rdpPushPixels:"));
/* do original call */ /* do original call */
rdpPushPixelsOrg(pGC, pBitMap, pDst, w, h, x, y); rdpPushPixelsOrg(pGC, pBitMap, pDst, w, h, x, y);
} }

@ -233,3 +233,14 @@ rdpRegionBreak(RegionPtr pReg)
return RegionBreak(pReg); return RegionBreak(pReg);
#endif #endif
} }
/*****************************************************************************/
void
rdpRegionUnionRect(RegionPtr pReg, BoxPtr prect)
{
RegionRec reg;
rdpRegionInit(&reg, prect, 0);
rdpRegionUnion(pReg, pReg, &reg);
rdpRegionUninit(&reg);
}

@ -56,5 +56,7 @@ void
rdpRegionReset(RegionPtr pReg, BoxPtr pBox); rdpRegionReset(RegionPtr pReg, BoxPtr pBox);
Bool Bool
rdpRegionBreak(RegionPtr pReg); rdpRegionBreak(RegionPtr pReg);
void
rdpRegionUnionRect(RegionPtr pReg, BoxPtr prect);
#endif #endif

Loading…
Cancel
Save