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