diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-07-31 00:41:44 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-07-31 00:41:44 -0700 |
commit | 61d51cea601e9c0daf74f404d939aeeaf678c1b1 (patch) | |
tree | 848bdbae66561807da4d57a72a2735f667577df3 /xorg/server/module | |
parent | 2515caa66a37409f32bbfff552bb370b43f9701a (diff) | |
download | xrdp-proprietary-61d51cea601e9c0daf74f404d939aeeaf678c1b1.tar.gz xrdp-proprietary-61d51cea601e9c0daf74f404d939aeeaf678c1b1.zip |
xorg driver, PROLOGUE / EPILOGUE changes
Diffstat (limited to 'xorg/server/module')
27 files changed, 65 insertions, 92 deletions
diff --git a/xorg/server/module/rdpComposite.c b/xorg/server/module/rdpComposite.c index f41a4312..8776335b 100644 --- a/xorg/server/module/rdpComposite.c +++ b/xorg/server/module/rdpComposite.c @@ -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); diff --git a/xorg/server/module/rdpCopyArea.c b/xorg/server/module/rdpCopyArea.c index 145cb511..91df1896 100644 --- a/xorg/server/module/rdpCopyArea.c +++ b/xorg/server/module/rdpCopyArea.c @@ -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); diff --git a/xorg/server/module/rdpCopyPlane.c b/xorg/server/module/rdpCopyPlane.c index 51f67eb3..fb7c22b8 100644 --- a/xorg/server/module/rdpCopyPlane.c +++ b/xorg/server/module/rdpCopyPlane.c @@ -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, diff --git a/xorg/server/module/rdpDraw.c b/xorg/server/module/rdpDraw.c index a5a9e11b..2a87d267 100644 --- a/xorg/server/module/rdpDraw.c +++ b/xorg/server/module/rdpDraw.c @@ -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; +} diff --git a/xorg/server/module/rdpDraw.h b/xorg/server/module/rdpDraw.h index 0b77abde..e2711768 100644 --- a/xorg/server/module/rdpDraw.h +++ b/xorg/server/module/rdpDraw.h @@ -28,14 +28,12 @@ misc draw calls #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 diff --git a/xorg/server/module/rdpFillPolygon.c b/xorg/server/module/rdpFillPolygon.c index c9d48a77..7c5a51b8 100644 --- a/xorg/server/module/rdpFillPolygon.c +++ b/xorg/server/module/rdpFillPolygon.c @@ -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); diff --git a/xorg/server/module/rdpFillSpans.c b/xorg/server/module/rdpFillSpans.c index 69f4f01a..db1929fc 100644 --- a/xorg/server/module/rdpFillSpans.c +++ b/xorg/server/module/rdpFillSpans.c @@ -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); diff --git a/xorg/server/module/rdpGC.c b/xorg/server/module/rdpGC.c index 3a585e2c..5f34c21c 100644 --- a/xorg/server/module/rdpGC.c +++ b/xorg/server/module/rdpGC.c @@ -58,6 +58,7 @@ GC related calls #include "rdpImageGlyphBlt.h" #include "rdpPolyGlyphBlt.h" #include "rdpPushPixels.h" +#include "rdpDraw.h" /******************************************************************************/ #define LOG_LEVEL 1 @@ -65,14 +66,12 @@ GC related calls 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); diff --git a/xorg/server/module/rdpGlyphs.c b/xorg/server/module/rdpGlyphs.c index 3a222e79..fc2d347b 100644 --- a/xorg/server/module/rdpGlyphs.c +++ b/xorg/server/module/rdpGlyphs.c @@ -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); diff --git a/xorg/server/module/rdpImageGlyphBlt.c b/xorg/server/module/rdpImageGlyphBlt.c index 1a9cd6db..f1f03203 100644 --- a/xorg/server/module/rdpImageGlyphBlt.c +++ b/xorg/server/module/rdpImageGlyphBlt.c @@ -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); diff --git a/xorg/server/module/rdpImageText16.c b/xorg/server/module/rdpImageText16.c index 6a3d9588..cb421158 100644 --- a/xorg/server/module/rdpImageText16.c +++ b/xorg/server/module/rdpImageText16.c @@ -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); diff --git a/xorg/server/module/rdpImageText8.c b/xorg/server/module/rdpImageText8.c index f05a6e87..4bb07fe4 100644 --- a/xorg/server/module/rdpImageText8.c +++ b/xorg/server/module/rdpImageText8.c @@ -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); diff --git a/xorg/server/module/rdpPixmap.c b/xorg/server/module/rdpPixmap.c index 191bb9e9..08b76735 100644 --- a/xorg/server/module/rdpPixmap.c +++ b/xorg/server/module/rdpPixmap.c @@ -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); diff --git a/xorg/server/module/rdpPolyArc.c b/xorg/server/module/rdpPolyArc.c index 126bf48f..e4282524 100644 --- a/xorg/server/module/rdpPolyArc.c +++ b/xorg/server/module/rdpPolyArc.c @@ -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); diff --git a/xorg/server/module/rdpPolyFillArc.c b/xorg/server/module/rdpPolyFillArc.c index dc2437d1..825dc20d 100644 --- a/xorg/server/module/rdpPolyFillArc.c +++ b/xorg/server/module/rdpPolyFillArc.c @@ -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); diff --git a/xorg/server/module/rdpPolyFillRect.c b/xorg/server/module/rdpPolyFillRect.c index 58626514..1de9cee1 100644 --- a/xorg/server/module/rdpPolyFillRect.c +++ b/xorg/server/module/rdpPolyFillRect.c @@ -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); diff --git a/xorg/server/module/rdpPolyGlyphBlt.c b/xorg/server/module/rdpPolyGlyphBlt.c index 44e4b188..2ba11996 100644 --- a/xorg/server/module/rdpPolyGlyphBlt.c +++ b/xorg/server/module/rdpPolyGlyphBlt.c @@ -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); diff --git a/xorg/server/module/rdpPolyPoint.c b/xorg/server/module/rdpPolyPoint.c index da0231a7..8379c1c6 100644 --- a/xorg/server/module/rdpPolyPoint.c +++ b/xorg/server/module/rdpPolyPoint.c @@ -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); diff --git a/xorg/server/module/rdpPolyRectangle.c b/xorg/server/module/rdpPolyRectangle.c index c52dfcb4..90b23961 100644 --- a/xorg/server/module/rdpPolyRectangle.c +++ b/xorg/server/module/rdpPolyRectangle.c @@ -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); diff --git a/xorg/server/module/rdpPolySegment.c b/xorg/server/module/rdpPolySegment.c index 31d60121..1ae62d27 100644 --- a/xorg/server/module/rdpPolySegment.c +++ b/xorg/server/module/rdpPolySegment.c @@ -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); diff --git a/xorg/server/module/rdpPolyText16.c b/xorg/server/module/rdpPolyText16.c index 2fd43b1f..4a716e3f 100644 --- a/xorg/server/module/rdpPolyText16.c +++ b/xorg/server/module/rdpPolyText16.c @@ -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); diff --git a/xorg/server/module/rdpPolyText8.c b/xorg/server/module/rdpPolyText8.c index 979a7332..e6671252 100644 --- a/xorg/server/module/rdpPolyText8.c +++ b/xorg/server/module/rdpPolyText8.c @@ -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); diff --git a/xorg/server/module/rdpPolylines.c b/xorg/server/module/rdpPolylines.c index a86e9fc4..7558407e 100644 --- a/xorg/server/module/rdpPolylines.c +++ b/xorg/server/module/rdpPolylines.c @@ -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); diff --git a/xorg/server/module/rdpPushPixels.c b/xorg/server/module/rdpPushPixels.c index b02bc936..bab4b03d 100644 --- a/xorg/server/module/rdpPushPixels.c +++ b/xorg/server/module/rdpPushPixels.c @@ -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); diff --git a/xorg/server/module/rdpPutImage.c b/xorg/server/module/rdpPutImage.c index 5c0e6f5f..f7a33f7c 100644 --- a/xorg/server/module/rdpPutImage.c +++ b/xorg/server/module/rdpPutImage.c @@ -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, diff --git a/xorg/server/module/rdpRandR.c b/xorg/server/module/rdpRandR.c index 2255d33a..ad3808bd 100644 --- a/xorg/server/module/rdpRandR.c +++ b/xorg/server/module/rdpRandR.c @@ -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) { diff --git a/xorg/server/module/rdpSetSpans.c b/xorg/server/module/rdpSetSpans.c index 130306d3..c2ea798e 100644 --- a/xorg/server/module/rdpSetSpans.c +++ b/xorg/server/module/rdpSetSpans.c @@ -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); |