a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/*
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * Copyright (c) 2009 Tiago Vignatti
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync *
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * Permission is hereby granted, free of charge, to any person
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * obtaining a copy of this software and associated documentation
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * files (the "Software"), to deal in the Software without
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * restriction, including without limitation the rights to use,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * copy, modify, merge, publish, distribute, sublicense, and/or sell
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * copies of the Software, and to permit persons to whom the
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * Software is furnished to do so, subject to the following
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * conditions:
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync *
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * The above copyright notice and this permission notice shall be
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * included in all copies or substantial portions of the Software.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync *
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * OTHER DEALINGS IN THE SOFTWARE.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync *
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#ifdef HAVE_XORG_CONFIG_H
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include <xorg-config.h>
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#endif
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "misc.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "xf86.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "xf86_OSproc.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include <X11/X.h>
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "colormapst.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "scrnintstr.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "screenint.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "gcstruct.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "pixmapstr.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "pixmap.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "windowstr.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "window.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "xf86str.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "mipointer.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "mipointrst.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "picturestr.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define WRAP_SCREEN(x,y) {pScreenPriv->x = pScreen->x; pScreen->x = y;}
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define UNWRAP_SCREEN(x) pScreen->x = pScreenPriv->x
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define SCREEN_PRIV() ((VGAarbiterScreenPtr) dixLookupPrivate(&(pScreen)->devPrivates, VGAarbiterScreenKey))
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define SCREEN_PROLOG(x) (pScreen->x = SCREEN_PRIV()->x)
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define SCREEN_EPILOG(x,y) do { \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync SCREEN_PRIV()->x = pScreen->x; \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync pScreen->x = y; \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync } while (0)
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define WRAP_PICT(x,y) if (ps) {pScreenPriv->x = ps->x;\
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ps->x = y;}
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define UNWRAP_PICT(x) if (ps) {ps->x = pScreenPriv->x;}
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define PICTURE_PROLOGUE(field) ps->field = \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync VGAarbiterScreenKey))->field
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define PICTURE_EPILOGUE(field, wrap) ps->field = wrap
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define WRAP_SCREEN_INFO(x,y) do {pScreenPriv->x = pScrn->x; pScrn->x = y;} while(0)
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define SPRITE_PROLOG miPointerScreenPtr PointPriv = \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync miPointerScreenKey); VGAarbiterScreenPtr pScreenPriv = \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync VGAarbiterScreenKey)); PointPriv->spriteFuncs = pScreenPriv->miSprite;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define WRAP_SPRITE do { pScreenPriv->miSprite = PointPriv->spriteFuncs;\
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync } while (0)
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define UNWRAP_SPRITE PointPriv->spriteFuncs = pScreenPriv->miSprite
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define GC_WRAP(x) pGCPriv->wrapOps = (x)->ops;\
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync pGCPriv->wrapFuncs = (x)->funcs; (x)->ops = &VGAarbiterGCOps;\
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync (x)->funcs = &VGAarbiterGCFuncs;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define GC_UNWRAP(x) VGAarbiterGCPtr pGCPriv = \
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync (VGAarbiterGCPtr)dixLookupPrivate(&(x)->devPrivates, VGAarbiterGCKey);\
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync (x)->ops = pGCPriv->wrapOps; (x)->funcs = pGCPriv->wrapFuncs;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic inline void
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncVGAGet(ScreenPtr pScreen)
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync{
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync pci_device_vgaarb_set_target(xf86ScreenToScrn(pScreen)->vgaDev);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync pci_device_vgaarb_lock();
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync}
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic inline void
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncVGAPut(void)
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync{
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync pci_device_vgaarb_unlock();
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync}
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynctypedef struct _VGAarbiterScreen {
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CreateGCProcPtr CreateGC;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CloseScreenProcPtr CloseScreen;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenBlockHandlerProcPtr BlockHandler;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenWakeupHandlerProcPtr WakeupHandler;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync GetImageProcPtr GetImage;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync GetSpansProcPtr GetSpans;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync SourceValidateProcPtr SourceValidate;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CopyWindowProcPtr CopyWindow;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ClearToBackgroundProcPtr ClearToBackground;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CreatePixmapProcPtr CreatePixmap;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync SaveScreenProcPtr SaveScreen;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync /* Colormap */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync StoreColorsProcPtr StoreColors;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync /* Cursor */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync DisplayCursorProcPtr DisplayCursor;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync RealizeCursorProcPtr RealizeCursor;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync UnrealizeCursorProcPtr UnrealizeCursor;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync RecolorCursorProcPtr RecolorCursor;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync SetCursorPositionProcPtr SetCursorPosition;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync void (*AdjustFrame) (ScrnInfoPtr, int, int);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Bool (*SwitchMode) (ScrnInfoPtr, DisplayModePtr);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Bool (*EnterVT) (ScrnInfoPtr);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync void (*LeaveVT) (ScrnInfoPtr);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync void (*FreeScreen) (ScrnInfoPtr);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync miPointerSpriteFuncPtr miSprite;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CompositeProcPtr Composite;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync GlyphsProcPtr Glyphs;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CompositeRectsProcPtr CompositeRects;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync} VGAarbiterScreenRec, *VGAarbiterScreenPtr;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsynctypedef struct _VGAarbiterGC {
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync const GCOps *wrapOps;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync const GCFuncs *wrapFuncs;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync} VGAarbiterGCRec, *VGAarbiterGCPtr;
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* Screen funcs */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterBlockHandler(ScreenPtr pScreen, void *pTimeout,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync void *pReadmask);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterWakeupHandler(ScreenPtr pScreen,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync unsigned long result, void *pReadmask);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterCloseScreen(ScreenPtr pScreen);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterGetImage(DrawablePtr pDrawable, int sx, int sy, int w,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int h, unsigned int format,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync unsigned long planemask, char *pdstLine);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int *pwidth, int nspans, char *pdstStart);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterSourceValidate(DrawablePtr pDrawable, int x, int y,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int width, int height,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync unsigned int subWindowMode);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync RegionPtr prgnSrc);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterClearToBackground(WindowPtr pWin, int x, int y, int w,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int h, Bool generateExposures);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic PixmapPtr VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int depth, unsigned int usage_hint);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterCreateGC(GCPtr pGC);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterStoreColors(ColormapPtr pmap, int ndef, xColorItem
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * pdefs);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CursorPtr pCurs, Bool displayed);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CursorPtr pCursor);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CursorPtr pCursor);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CursorPtr pCursor);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterSetCursorPosition(DeviceIntPtr pDev, ScreenPtr
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync pScreen, int x, int y,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync Bool generateEvent);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterAdjustFrame(ScrnInfoPtr pScrn, int x, int y);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterEnterVT(ScrnInfoPtr pScrn);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterLeaveVT(ScrnInfoPtr pScrn);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterFreeScreen(ScrnInfoPtr pScrn);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* GC funcs */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync DrawablePtr pDraw);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterChangeGC(GCPtr pGC, unsigned long mask);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterDestroyGC(GCPtr pGC);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterChangeClip(GCPtr pGC, int type, void *pvalue,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int nrects);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterDestroyClip(GCPtr pGC);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* GC ops */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterFillSpans(DrawablePtr pDraw, GC * pGC, int nInit,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync DDXPointPtr pptInit, int *pwidthInit,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int fSorted);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync register DDXPointPtr ppt, int *pwidth,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int nspans, int fSorted);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, int x,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int y, int w, int h, int leftPad, int format,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync char *pImage);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic RegionPtr VGAarbiterCopyArea(DrawablePtr pSrc, DrawablePtr pDst,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync GC * pGC, int srcx, int srcy, int width,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int height, int dstx, int dsty);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic RegionPtr VGAarbiterCopyPlane(DrawablePtr pSrc, DrawablePtr pDst,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync GCPtr pGC, int srcx, int srcy, int width,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int height, int dstx, int dsty,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync unsigned long bitPlane);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode, int npt,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync xPoint * pptInit);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterPolylines(DrawablePtr pDraw, GCPtr pGC, int mode, int npt,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync DDXPointPtr pptInit);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync xSegment * pSeg);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterPolyRectangle(DrawablePtr pDraw, GCPtr pGC,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int nRectsInit, xRectangle *pRectsInit);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync xArc * parcs);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int mode, int count, DDXPointPtr ptsIn);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterPolyFillRect(DrawablePtr pDraw, GCPtr pGC, int nrectFill,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync xRectangle *prectInit);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync xArc * parcs);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic int VGAarbiterPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int count, char *chars);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic int VGAarbiterPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int count, unsigned short *chars);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int count, char *chars);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int count, unsigned short *chars);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int yInit, unsigned int nglyph,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CharInfoPtr * ppci, void *pglyphBase);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int yInit, unsigned int nglyph,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CharInfoPtr * ppci, void *pglyphBase);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync pDraw, int dx, int dy, int xOrg, int yOrg);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* miSpriteFuncs */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync pScreen, CursorPtr pCur);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync pScreen, CursorPtr pCur);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync CursorPtr pCur, int x, int y);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int x, int y);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic Bool VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync ScreenPtr pScreen);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync PicturePtr pDst, INT16 xSrc, INT16 ySrc,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync INT16 xMask, INT16 yMask, INT16 xDst,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync INT16 yDst, CARD16 width, CARD16 height);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync int nlist, GlyphListPtr list, GlyphPtr * glyphs);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncstatic void VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync xRenderColor * color, int nRect,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync xRectangle *rects);