xorg driver, PROLOGUE / EPILOGUE changes

ulab-next
Jay Sorg 11 years ago
parent 2515caa66a
commit 61d51cea60

@ -36,6 +36,7 @@ composite(alpha blending) calls
#include "rdp.h"
#include "rdpComposite.h"
#include "rdpDraw.h"
/******************************************************************************/
#define LOG_LEVEL 1
@ -63,13 +64,11 @@ rdpComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
{
ScreenPtr pScreen;
rdpPtr dev;
ScrnInfoPtr pScrn;
PictureScreenPtr ps;
LLOGLN(10, ("rdpComposite:"));
pScreen = pSrc->pDrawable->pScreen;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
ps = GetPictureScreen(pScreen);
rdpCompositeOrg(ps, dev, op, pSrc, pMask, pDst, xSrc, ySrc,
xMask, yMask, xDst, yDst, width, height);

@ -42,8 +42,7 @@ static RegionPtr
rdpCopyAreaOrg(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
RegionPtr rv;
GC_OP_PROLOGUE(pGC);

@ -43,9 +43,8 @@ rdpCopyPlaneOrg(DrawablePtr pSrc, DrawablePtr pDst,
GCPtr pGC, int srcx, int srcy, int w, int h,
int dstx, int dsty, unsigned long bitPlane)
{
GC_OP_VARS;
RegionPtr rv;
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_PROLOGUE(pGC);
rv = pGC->ops->CopyPlane(pSrc, pDst, pGC, srcx, srcy,

@ -38,6 +38,7 @@ misc draw calls
#include <mi.h>
#include "rdp.h"
#include "rdpDraw.h"
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
@ -47,13 +48,11 @@ misc draw calls
void
rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
{
ScrnInfoPtr pScrn;
ScreenPtr pScreen;
rdpPtr dev;
pScreen = pWin->drawable.pScreen;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
dev->pScreen->CopyWindow = dev->CopyWindow;
dev->pScreen->CopyWindow(pWin, ptOldOrg, pOldRegion);
dev->pScreen->CopyWindow = rdpCopyWindow;
@ -63,13 +62,11 @@ rdpCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr pOldRegion)
Bool
rdpCloseScreen(int index, ScreenPtr pScreen)
{
ScrnInfoPtr pScrn;
rdpPtr dev;
Bool rv;
LLOGLN(0, ("rdpCloseScreen:"));
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
dev->pScreen->CloseScreen = dev->CloseScreen;
rv = dev->pScreen->CloseScreen(index, pScreen);
dev->pScreen->CloseScreen = rdpCloseScreen;
@ -86,3 +83,15 @@ rdpGetRootWindowPtr(ScreenPtr pScreen)
return pScreen->root;
#endif
}
/******************************************************************************/
rdpPtr
rdpGetDevFromScreen(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn;
rdpPtr dev;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
return dev;
}

@ -27,15 +27,13 @@ misc draw calls
#include <xorg-server.h>
#include <xf86.h>
/******************************************************************************/
#define GC_OP_VARS rdpPtr dev; rdpGCPtr priv; GCFuncs *oldFuncs
/******************************************************************************/
#define GC_OP_PROLOGUE(_pGC) \
do { \
rdpPtr dev; \
ScreenPtr pScreen; \
ScrnInfoPtr pScrn; \
pScreen = (_pGC)->pScreen; \
pScrn = xf86Screens[pScreen->myNum]; \
dev = XRDPPTR(pScrn); \
dev = rdpGetDevFromScreen((_pGC)->pScreen); \
priv = (rdpGCPtr)rdpGetGCPrivate(_pGC, dev->privateKeyRecGC); \
oldFuncs = (_pGC)->funcs; \
(_pGC)->funcs = priv->funcs; \
@ -58,5 +56,7 @@ Bool
rdpCloseScreen(int index, ScreenPtr pScreen);
WindowPtr
rdpGetRootWindowPtr(ScreenPtr pScreen);
rdpPtr
rdpGetDevFromScreen(ScreenPtr pScreen);
#endif

@ -43,8 +43,7 @@ rdpFillPolygonOrg(DrawablePtr pDrawable, GCPtr pGC,
int shape, int mode, int count,
DDXPointPtr pPts)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->FillPolygon(pDrawable, pGC, shape, mode, count, pPts);

@ -42,8 +42,7 @@ static void
rdpFillSpansOrg(DrawablePtr pDrawable, GCPtr pGC, int nInit,
DDXPointPtr pptInit, int *pwidthInit, int fSorted)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->FillSpans(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted);

@ -58,21 +58,20 @@ GC related calls
#include "rdpImageGlyphBlt.h"
#include "rdpPolyGlyphBlt.h"
#include "rdpPushPixels.h"
#include "rdpDraw.h"
/******************************************************************************/
#define LOG_LEVEL 1
#define LLOGLN(_level, _args) \
do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
/******************************************************************************/
#define GC_FUNC_VARS rdpPtr dev; rdpGCPtr priv;
/******************************************************************************/
#define GC_FUNC_PROLOGUE(_pGC) \
do { \
rdpPtr dev; \
ScreenPtr pScreen; \
ScrnInfoPtr pScrn; \
pScreen = _pGC->pScreen; \
pScrn = xf86Screens[pScreen->myNum]; \
dev = XRDPPTR(pScrn); \
dev = rdpGetDevFromScreen((_pGC)->pScreen); \
priv = (rdpGCPtr)rdpGetGCPrivate(_pGC, dev->privateKeyRecGC); \
(_pGC)->funcs = priv->funcs; \
if (priv->ops != 0) \
@ -127,7 +126,7 @@ GCOps g_rdpGCOps =
static void
rdpValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr d)
{
rdpGCRec *priv;
GC_FUNC_VARS;
LLOGLN(10, ("rdpValidateGC:"));
GC_FUNC_PROLOGUE(pGC);
@ -140,7 +139,7 @@ rdpValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr d)
static void
rdpChangeGC(GCPtr pGC, unsigned long mask)
{
rdpGCRec *priv;
GC_FUNC_VARS;
LLOGLN(10, ("rdpChangeGC:"));
GC_FUNC_PROLOGUE(pGC);
@ -152,7 +151,7 @@ rdpChangeGC(GCPtr pGC, unsigned long mask)
static void
rdpCopyGC(GCPtr src, unsigned long mask, GCPtr dst)
{
rdpGCRec *priv;
GC_FUNC_VARS;
LLOGLN(10, ("rdpCopyGC:"));
GC_FUNC_PROLOGUE(dst);
@ -164,7 +163,7 @@ rdpCopyGC(GCPtr src, unsigned long mask, GCPtr dst)
static void
rdpDestroyGC(GCPtr pGC)
{
rdpGCRec *priv;
GC_FUNC_VARS;
LLOGLN(10, ("rdpDestroyGC:"));
GC_FUNC_PROLOGUE(pGC);
@ -176,7 +175,7 @@ rdpDestroyGC(GCPtr pGC)
static void
rdpChangeClip(GCPtr pGC, int type, pointer pValue, int nrects)
{
rdpGCRec *priv;
GC_FUNC_VARS;
LLOGLN(10, ("rdpChangeClip:"));
GC_FUNC_PROLOGUE(pGC);
@ -188,7 +187,7 @@ rdpChangeClip(GCPtr pGC, int type, pointer pValue, int nrects)
static void
rdpDestroyClip(GCPtr pGC)
{
rdpGCRec *priv;
GC_FUNC_VARS;
LLOGLN(10, ("rdpDestroyClip:"));
GC_FUNC_PROLOGUE(pGC);
@ -200,7 +199,7 @@ rdpDestroyClip(GCPtr pGC)
static void
rdpCopyClip(GCPtr dst, GCPtr src)
{
rdpGCRec *priv;
GC_FUNC_VARS;
LLOGLN(10, ("rdpCopyClip:"));
GC_FUNC_PROLOGUE(dst);
@ -215,13 +214,11 @@ rdpCreateGC(GCPtr pGC)
Bool rv;
rdpPtr dev;
ScreenPtr pScreen;
ScrnInfoPtr pScrn;
rdpGCPtr priv;
LLOGLN(10, ("rdpCreateGC:"));
pScreen = pGC->pScreen;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
priv = (rdpGCPtr)rdpGetGCPrivate(pGC, dev->privateKeyRecGC);
pScreen->CreateGC = dev->CreateGC;
rv = pScreen->CreateGC(pGC);

@ -37,6 +37,7 @@ gylph(font) calls
#include "rdp.h"
#include "rdpGlyphs.h"
#include "rdpDraw.h"
/******************************************************************************/
#define LOG_LEVEL 1
@ -66,13 +67,11 @@ rdpGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
{
ScreenPtr pScreen;
rdpPtr dev;
ScrnInfoPtr pScrn;
PictureScreenPtr ps;
LLOGLN(10, ("rdpGlyphs:"));
pScreen = pSrc->pDrawable->pScreen;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
ps = GetPictureScreen(pScreen);
rdpGlyphsOrg(ps, dev, op, pSrc, pDst, maskFormat, xSrc, ySrc,
nlists, lists, glyphs);

@ -43,8 +43,7 @@ rdpImageGlyphBltOrg(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->ImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);

@ -42,8 +42,7 @@ void
rdpImageText16Org(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->ImageText16(pDrawable, pGC, x, y, count, chars);

@ -42,8 +42,7 @@ void
rdpImageText8Org(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->ImageText8(pDrawable, pGC, x, y, count, chars);

@ -33,6 +33,7 @@ pixmap calls
#include <xf86_OSproc.h>
#include "rdp.h"
#include "rdpDraw.h"
/******************************************************************************/
#define LOG_LEVEL 1
@ -44,14 +45,12 @@ PixmapPtr
rdpCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
unsigned usage_hint)
{
ScrnInfoPtr pScrn;
rdpPtr dev;
PixmapPtr rv;
LLOGLN(10, ("rdpCreatePixmap: width %d height %d depth %d",
width, height, depth));
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
pScreen->CreatePixmap = dev->CreatePixmap;
rv = pScreen->CreatePixmap(pScreen, width, height, depth, usage_hint);
pScreen->CreatePixmap = rdpCreatePixmap;
@ -65,12 +64,10 @@ rdpDestroyPixmap(PixmapPtr pPixmap)
Bool rv;
ScreenPtr pScreen;
rdpPtr dev;
ScrnInfoPtr pScrn;
LLOGLN(10, ("rdpDestroyPixmap: refcnt %d", pPixmap->refcnt));
pScreen = pPixmap->drawable.pScreen;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
pScreen->DestroyPixmap = dev->DestroyPixmap;
rv = pScreen->DestroyPixmap(pPixmap);
pScreen->DestroyPixmap = rdpDestroyPixmap;
@ -85,12 +82,10 @@ rdpModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
Bool rv;
ScreenPtr pScreen;
rdpPtr dev;
ScrnInfoPtr pScrn;
LLOGLN(10, ("rdpModifyPixmapHeader:"));
pScreen = pPixmap->drawable.pScreen;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
pScreen->ModifyPixmapHeader = dev->ModifyPixmapHeader;
rv = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel,
devKind, pPixData);

@ -41,8 +41,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
void
rdpPolyArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->PolyArc(pDrawable, pGC, narcs, parcs);

@ -41,8 +41,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
void
rdpPolyFillArcOrg(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc *parcs)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->PolyFillArc(pDrawable, pGC, narcs, parcs);

@ -42,8 +42,7 @@ static void
rdpPolyFillRectOrg(DrawablePtr pDrawable, GCPtr pGC, int nrectFill,
xRectangle *prectInit)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->PolyFillRect(pDrawable, pGC, nrectFill, prectInit);

@ -43,8 +43,7 @@ rdpPolyGlyphBltOrg(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->PolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);

@ -42,8 +42,7 @@ void
rdpPolyPointOrg(DrawablePtr pDrawable, GCPtr pGC, int mode,
int npt, DDXPointPtr in_pts)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->PolyPoint(pDrawable, pGC, mode, npt, in_pts);

@ -42,8 +42,7 @@ static void
rdpPolyRectangleOrg(DrawablePtr pDrawable, GCPtr pGC, int nrects,
xRectangle *rects)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->PolyRectangle(pDrawable, pGC, nrects, rects);

@ -41,8 +41,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
void
rdpPolySegmentOrg(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSegs)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->PolySegment(pDrawable, pGC, nseg, pSegs);

@ -42,9 +42,8 @@ int
rdpPolyText16Org(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, unsigned short *chars)
{
GC_OP_VARS;
int rv;
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_PROLOGUE(pGC);
rv = pGC->ops->PolyText16(pDrawable, pGC, x, y, count, chars);

@ -42,9 +42,8 @@ int
rdpPolyText8Org(DrawablePtr pDrawable, GCPtr pGC,
int x, int y, int count, char *chars)
{
GC_OP_VARS;
int rv;
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_PROLOGUE(pGC);
rv = pGC->ops->PolyText8(pDrawable, pGC, x, y, count, chars);

@ -42,8 +42,7 @@ static void
rdpPolylinesOrg(DrawablePtr pDrawable, GCPtr pGC, int mode,
int npt, DDXPointPtr pptInit)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->Polylines(pDrawable, pGC, mode, npt, pptInit);

@ -42,8 +42,7 @@ void
rdpPushPixelsOrg(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst,
int w, int h, int x, int y)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->PushPixels(pGC, pBitMap, pDst, w, h, x, y);

@ -42,8 +42,7 @@ static void
rdpPutImageOrg(DrawablePtr pDst, GCPtr pGC, int depth, int x, int y,
int w, int h, int leftPad, int format, char *pBits)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->PutImage(pDst, pGC, depth, x, y, w, h, leftPad,

@ -79,12 +79,10 @@ rdpRRGetInfo(ScreenPtr pScreen, Rotation *pRotations)
{
int width;
int height;
ScrnInfoPtr pScrn;
rdpPtr dev;
LLOGLN(0, ("rdpRRGetInfo:"));
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
*pRotations = RR_Rotate_0;
width = dev->width;
height = dev->height;
@ -100,13 +98,11 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
WindowPtr root;
PixmapPtr screenPixmap;
BoxRec box;
ScrnInfoPtr pScrn;
rdpPtr dev;
LLOGLN(0, ("rdpRRScreenSetSize: width %d height %d mmWidth %d mmHeight %d",
width, height, (int)mmWidth, (int)mmHeight));
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
root = rdpGetRootWindowPtr(pScreen);
if ((width < 1) || (height < 1))
{
@ -228,12 +224,10 @@ Bool
rdpRRGetPanning(ScreenPtr pScreen, RRCrtcPtr crtc, BoxPtr totalArea,
BoxPtr trackingArea, INT16 *border)
{
ScrnInfoPtr pScrn;
rdpPtr dev;
LLOGLN(0, ("rdpRRGetPanning: %p", crtc));
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
if (totalArea != 0)
{

@ -44,8 +44,7 @@ void
rdpSetSpansOrg(DrawablePtr pDrawable, GCPtr pGC, char *psrc,
DDXPointPtr ppt, int *pwidth, int nspans, int fSorted)
{
rdpGCPtr priv;
GCFuncs *oldFuncs;
GC_OP_VARS;
GC_OP_PROLOGUE(pGC);
pGC->ops->SetSpans(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);

@ -316,15 +316,13 @@ rdpDeferredRandR(OsTimerPtr timer, CARD32 now, pointer arg)
{
ScreenPtr pScreen;
rrScrPrivPtr pRRScrPriv;
ScrnInfoPtr pScrn;
rdpPtr dev;
char *envvar;
int width;
int height;
pScreen = (ScreenPtr) arg;
pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn);
dev = rdpGetDevFromScreen(pScreen);
LLOGLN(10, ("rdpDeferredRandR:"));
pRRScrPriv = rrGetScrPriv(pScreen);
if (pRRScrPriv == 0)

Loading…
Cancel
Save