2010-07-27 13:02:24 -06:00
|
|
|
/*
|
|
|
|
* This code was stolen from RAC and adapted to control the legacy vga
|
|
|
|
* interface.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (c) 2007 Paulo R. Zanoni, Tiago Vignatti
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person
|
|
|
|
* obtaining a copy of this software and associated documentation
|
|
|
|
* files (the "Software"), to deal in the Software without
|
|
|
|
* restriction, including without limitation the rights to use,
|
|
|
|
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following
|
|
|
|
* conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be
|
|
|
|
* included in all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
|
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
|
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
|
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
|
|
* OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "xorg-config.h"
|
|
|
|
|
|
|
|
#include "xf86VGAarbiter.h"
|
|
|
|
#include "xf86VGAarbiterPriv.h"
|
|
|
|
#include "xf86Bus.h"
|
|
|
|
#include "xf86Priv.h"
|
|
|
|
#include "pciaccess.h"
|
|
|
|
|
|
|
|
static GCFuncs VGAarbiterGCFuncs = {
|
|
|
|
VGAarbiterValidateGC, VGAarbiterChangeGC, VGAarbiterCopyGC,
|
|
|
|
VGAarbiterDestroyGC, VGAarbiterChangeClip, VGAarbiterDestroyClip,
|
|
|
|
VGAarbiterCopyClip
|
|
|
|
};
|
|
|
|
|
|
|
|
static GCOps VGAarbiterGCOps = {
|
|
|
|
VGAarbiterFillSpans, VGAarbiterSetSpans, VGAarbiterPutImage,
|
|
|
|
VGAarbiterCopyArea, VGAarbiterCopyPlane, VGAarbiterPolyPoint,
|
|
|
|
VGAarbiterPolylines, VGAarbiterPolySegment, VGAarbiterPolyRectangle,
|
|
|
|
VGAarbiterPolyArc, VGAarbiterFillPolygon, VGAarbiterPolyFillRect,
|
|
|
|
VGAarbiterPolyFillArc, VGAarbiterPolyText8, VGAarbiterPolyText16,
|
|
|
|
VGAarbiterImageText8, VGAarbiterImageText16, VGAarbiterImageGlyphBlt,
|
|
|
|
VGAarbiterPolyGlyphBlt, VGAarbiterPushPixels,
|
|
|
|
};
|
|
|
|
|
|
|
|
static miPointerSpriteFuncRec VGAarbiterSpriteFuncs = {
|
|
|
|
VGAarbiterSpriteRealizeCursor, VGAarbiterSpriteUnrealizeCursor,
|
|
|
|
VGAarbiterSpriteSetCursor, VGAarbiterSpriteMoveCursor,
|
|
|
|
VGAarbiterDeviceCursorInitialize, VGAarbiterDeviceCursorCleanup
|
|
|
|
};
|
|
|
|
|
2010-12-05 08:36:02 -07:00
|
|
|
static DevPrivateKeyRec VGAarbiterScreenKeyRec;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-12-05 08:36:02 -07:00
|
|
|
#define VGAarbiterScreenKey (&VGAarbiterScreenKeyRec)
|
|
|
|
static DevPrivateKeyRec VGAarbiterGCKeyRec;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-12-05 08:36:02 -07:00
|
|
|
#define VGAarbiterGCKey (&VGAarbiterGCKeyRec)
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
static int vga_no_arb = 0;
|
|
|
|
void
|
|
|
|
xf86VGAarbiterInit(void)
|
|
|
|
{
|
|
|
|
if (pci_device_vgaarb_init() != 0) {
|
2012-06-10 07:21:05 -06:00
|
|
|
vga_no_arb = 1;
|
|
|
|
xf86Msg(X_WARNING,
|
|
|
|
"VGA arbiter: cannot open kernel arbiter, no multi-card support\n");
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
xf86VGAarbiterFini(void)
|
|
|
|
{
|
|
|
|
if (vga_no_arb)
|
2012-06-10 07:21:05 -06:00
|
|
|
return;
|
2010-07-27 13:02:24 -06:00
|
|
|
pci_device_vgaarb_fini();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
xf86VGAarbiterLock(ScrnInfoPtr pScrn)
|
|
|
|
{
|
|
|
|
if (vga_no_arb)
|
2012-06-10 07:21:05 -06:00
|
|
|
return;
|
2010-07-27 13:02:24 -06:00
|
|
|
pci_device_vgaarb_set_target(pScrn->vgaDev);
|
|
|
|
pci_device_vgaarb_lock();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
xf86VGAarbiterUnlock(ScrnInfoPtr pScrn)
|
|
|
|
{
|
|
|
|
if (vga_no_arb)
|
2012-06-10 07:21:05 -06:00
|
|
|
return;
|
2010-07-27 13:02:24 -06:00
|
|
|
pci_device_vgaarb_unlock();
|
|
|
|
}
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
Bool
|
|
|
|
xf86VGAarbiterAllowDRI(ScreenPtr pScreen)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
int vga_count;
|
|
|
|
int rsrc_decodes;
|
2013-06-07 11:28:45 -06:00
|
|
|
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
if (vga_no_arb)
|
2012-06-10 07:21:05 -06:00
|
|
|
return TRUE;
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
pci_device_vgaarb_get_info(pScrn->vgaDev, &vga_count, &rsrc_decodes);
|
|
|
|
if (vga_count > 1) {
|
|
|
|
if (rsrc_decodes) {
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn)
|
|
|
|
{
|
|
|
|
struct pci_device *dev;
|
|
|
|
EntityPtr pEnt;
|
|
|
|
|
|
|
|
if (vga_no_arb)
|
2012-06-10 07:21:05 -06:00
|
|
|
return;
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
pEnt = xf86Entities[pScrn->entityList[0]];
|
|
|
|
if (pEnt->bus.type != BUS_PCI)
|
2012-06-10 07:21:05 -06:00
|
|
|
return;
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
dev = pEnt->bus.id.pci;
|
|
|
|
pScrn->vgaDev = dev;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2011-11-05 07:32:40 -06:00
|
|
|
xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
if (vga_no_arb)
|
2012-06-10 07:21:05 -06:00
|
|
|
return;
|
2011-11-05 07:32:40 -06:00
|
|
|
pci_device_vgaarb_set_target(pScrn->vgaDev);
|
|
|
|
pci_device_vgaarb_decodes(rsrc);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
Bool
|
|
|
|
xf86VGAarbiterWrapFunctions(void)
|
|
|
|
{
|
|
|
|
ScrnInfoPtr pScrn;
|
|
|
|
VGAarbiterScreenPtr pScreenPriv;
|
|
|
|
miPointerScreenPtr PointPriv;
|
2012-06-10 07:21:05 -06:00
|
|
|
PictureScreenPtr ps;
|
2010-07-27 13:02:24 -06:00
|
|
|
ScreenPtr pScreen;
|
|
|
|
int vga_count, i;
|
|
|
|
|
|
|
|
if (vga_no_arb)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* we need to wrap the arbiter if we have more than
|
|
|
|
* one VGA card - hotplug cries.
|
|
|
|
*/
|
|
|
|
pci_device_vgaarb_get_info(NULL, &vga_count, NULL);
|
|
|
|
if (vga_count < 2 || !xf86Screens)
|
|
|
|
return FALSE;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
xf86Msg(X_INFO, "Found %d VGA devices: arbiter wrapping enabled\n",
|
2010-07-27 13:02:24 -06:00
|
|
|
vga_count);
|
|
|
|
|
|
|
|
for (i = 0; i < xf86NumScreens; i++) {
|
|
|
|
pScreen = xf86Screens[i]->pScreen;
|
|
|
|
ps = GetPictureScreenIfSet(pScreen);
|
2013-06-07 11:28:45 -06:00
|
|
|
pScrn = xf86ScreenToScrn(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
if (!dixRegisterPrivateKey
|
|
|
|
(&VGAarbiterGCKeyRec, PRIVATE_GC, sizeof(VGAarbiterGCRec)))
|
2010-07-27 13:02:24 -06:00
|
|
|
return FALSE;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
if (!dixRegisterPrivateKey(&VGAarbiterScreenKeyRec, PRIVATE_SCREEN, 0))
|
|
|
|
return FALSE;
|
2010-12-05 08:36:02 -07:00
|
|
|
|
|
|
|
if (!(pScreenPriv = malloc(sizeof(VGAarbiterScreenRec))))
|
2010-07-27 13:02:24 -06:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv);
|
|
|
|
|
|
|
|
WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen);
|
|
|
|
WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen);
|
|
|
|
WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler);
|
|
|
|
WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler);
|
|
|
|
WRAP_SCREEN(CreateGC, VGAarbiterCreateGC);
|
|
|
|
WRAP_SCREEN(GetImage, VGAarbiterGetImage);
|
|
|
|
WRAP_SCREEN(GetSpans, VGAarbiterGetSpans);
|
|
|
|
WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate);
|
|
|
|
WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow);
|
|
|
|
WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground);
|
|
|
|
WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap);
|
|
|
|
WRAP_SCREEN(StoreColors, VGAarbiterStoreColors);
|
|
|
|
WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor);
|
|
|
|
WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor);
|
|
|
|
WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor);
|
|
|
|
WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor);
|
|
|
|
WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition);
|
2012-06-10 07:21:05 -06:00
|
|
|
WRAP_PICT(Composite, VGAarbiterComposite);
|
|
|
|
WRAP_PICT(Glyphs, VGAarbiterGlyphs);
|
|
|
|
WRAP_PICT(CompositeRects, VGAarbiterCompositeRects);
|
2010-07-27 13:02:24 -06:00
|
|
|
WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame);
|
|
|
|
WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode);
|
|
|
|
WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT);
|
|
|
|
WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT);
|
|
|
|
WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen);
|
|
|
|
WRAP_SPRITE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Screen funcs */
|
|
|
|
static Bool
|
2013-06-07 11:28:45 -06:00
|
|
|
VGAarbiterCloseScreen(ScreenPtr pScreen)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
Bool val;
|
2013-06-07 11:28:45 -06:00
|
|
|
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterScreenPtr pScreenPriv =
|
|
|
|
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
|
|
|
|
VGAarbiterScreenKey);
|
|
|
|
miPointerScreenPtr PointPriv =
|
|
|
|
(miPointerScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
|
|
|
|
miPointerScreenKey);
|
|
|
|
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
UNWRAP_SCREEN(CreateGC);
|
|
|
|
UNWRAP_SCREEN(CloseScreen);
|
|
|
|
UNWRAP_SCREEN(GetImage);
|
|
|
|
UNWRAP_SCREEN(GetSpans);
|
|
|
|
UNWRAP_SCREEN(SourceValidate);
|
|
|
|
UNWRAP_SCREEN(CopyWindow);
|
|
|
|
UNWRAP_SCREEN(ClearToBackground);
|
|
|
|
UNWRAP_SCREEN(SaveScreen);
|
|
|
|
UNWRAP_SCREEN(StoreColors);
|
|
|
|
UNWRAP_SCREEN(DisplayCursor);
|
|
|
|
UNWRAP_SCREEN(RealizeCursor);
|
|
|
|
UNWRAP_SCREEN(UnrealizeCursor);
|
|
|
|
UNWRAP_SCREEN(RecolorCursor);
|
|
|
|
UNWRAP_SCREEN(SetCursorPosition);
|
|
|
|
UNWRAP_PICT(Composite);
|
|
|
|
UNWRAP_PICT(Glyphs);
|
|
|
|
UNWRAP_PICT(CompositeRects);
|
|
|
|
UNWRAP_SCREEN_INFO(AdjustFrame);
|
|
|
|
UNWRAP_SCREEN_INFO(SwitchMode);
|
|
|
|
UNWRAP_SCREEN_INFO(EnterVT);
|
|
|
|
UNWRAP_SCREEN_INFO(LeaveVT);
|
|
|
|
UNWRAP_SCREEN_INFO(FreeScreen);
|
|
|
|
UNWRAP_SPRITE;
|
|
|
|
|
2010-12-05 08:36:02 -07:00
|
|
|
free((pointer) pScreenPriv);
|
2013-06-07 11:28:45 -06:00
|
|
|
xf86VGAarbiterLock(xf86ScreenToScrn(pScreen));
|
|
|
|
val = (*pScreen->CloseScreen) (pScreen);
|
|
|
|
xf86VGAarbiterUnlock(xf86ScreenToScrn(pScreen));
|
2010-07-27 13:02:24 -06:00
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-06-07 11:28:45 -06:00
|
|
|
VGAarbiterBlockHandler(ScreenPtr pScreen,
|
|
|
|
pointer pTimeout, pointer pReadmask)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
SCREEN_PROLOG(BlockHandler);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2013-06-07 11:28:45 -06:00
|
|
|
pScreen->BlockHandler(pScreen, pTimeout, pReadmask);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
|
|
|
SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-06-07 11:28:45 -06:00
|
|
|
VGAarbiterWakeupHandler(ScreenPtr pScreen, unsigned long result,
|
2012-06-10 07:21:05 -06:00
|
|
|
pointer pReadmask)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
SCREEN_PROLOG(WakeupHandler);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2013-06-07 11:28:45 -06:00
|
|
|
pScreen->WakeupHandler(pScreen, result, pReadmask);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
|
|
|
SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterGetImage(DrawablePtr pDrawable,
|
|
|
|
int sx, int sy, int w, int h,
|
|
|
|
unsigned int format, unsigned long planemask, char *pdstLine)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
ScreenPtr pScreen = pDrawable->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
SCREEN_PROLOG(GetImage);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pScreen->GetImage) (pDrawable, sx, sy, w, h, format, planemask, pdstLine);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(GetImage, VGAarbiterGetImage);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterGetSpans(DrawablePtr pDrawable,
|
|
|
|
int wMax,
|
|
|
|
DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart)
|
|
|
|
{
|
|
|
|
ScreenPtr pScreen = pDrawable->pScreen;
|
|
|
|
|
|
|
|
SCREEN_PROLOG(GetSpans);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
(*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
|
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(GetSpans, VGAarbiterGetSpans);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterSourceValidate(DrawablePtr pDrawable,
|
|
|
|
int x, int y, int width, int height,
|
|
|
|
unsigned int subWindowMode)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
ScreenPtr pScreen = pDrawable->pScreen;
|
|
|
|
|
|
|
|
SCREEN_PROLOG(SourceValidate);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
if (pScreen->SourceValidate)
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pScreen->SourceValidate) (pDrawable, x, y, width, height,
|
|
|
|
subWindowMode);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(SourceValidate, VGAarbiterSourceValidate);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_PROLOG(CopyWindow);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
(*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc);
|
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(CopyWindow, VGAarbiterCopyWindow);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterClearToBackground(WindowPtr pWin,
|
|
|
|
int x, int y, int w, int h, Bool generateExposures)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_PROLOG(ClearToBackground);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
(*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures);
|
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(ClearToBackground, VGAarbiterClearToBackground);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static PixmapPtr
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
|
|
|
|
unsigned usage_hint)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
PixmapPtr pPix;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_PROLOG(CreatePixmap);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint);
|
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(CreatePixmap, VGAarbiterCreatePixmap);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
return pPix;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
|
|
|
VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank)
|
|
|
|
{
|
|
|
|
Bool val;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_PROLOG(SaveScreen);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
val = (*pScreen->SaveScreen) (pScreen, unblank);
|
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(SaveScreen, VGAarbiterSaveScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
ScreenPtr pScreen = pmap->pScreen;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_PROLOG(StoreColors);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pScreen->StoreColors) (pmap, ndef, pdefs);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(StoreColors, VGAarbiterStoreColors);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterRecolorCursor(DeviceIntPtr pDev,
|
|
|
|
ScreenPtr pScreen, CursorPtr pCurs, Bool displayed)
|
|
|
|
{
|
|
|
|
SCREEN_PROLOG(RecolorCursor);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
(*pScreen->RecolorCursor) (pDev, pScreen, pCurs, displayed);
|
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(RecolorCursor, VGAarbiterRecolorCursor);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
Bool val;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_PROLOG(RealizeCursor);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
val = (*pScreen->RealizeCursor) (pDev, pScreen, pCursor);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(RealizeCursor, VGAarbiterRealizeCursor);
|
2010-07-27 13:02:24 -06:00
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterUnrealizeCursor(DeviceIntPtr pDev,
|
|
|
|
ScreenPtr pScreen, CursorPtr pCursor)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
Bool val;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_PROLOG(UnrealizeCursor);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
val = (*pScreen->UnrealizeCursor) (pDev, pScreen, pCursor);
|
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(UnrealizeCursor, VGAarbiterUnrealizeCursor);
|
2010-07-27 13:02:24 -06:00
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
Bool val;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_PROLOG(DisplayCursor);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
val = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor);
|
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(DisplayCursor, VGAarbiterDisplayCursor);
|
2010-07-27 13:02:24 -06:00
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterSetCursorPosition(DeviceIntPtr pDev,
|
|
|
|
ScreenPtr pScreen, int x, int y, Bool generateEvent)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
Bool val;
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_PROLOG(SetCursorPosition);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
val = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent);
|
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(SetCursorPosition, VGAarbiterSetCursorPosition);
|
2010-07-27 13:02:24 -06:00
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-06-07 11:28:45 -06:00
|
|
|
VGAarbiterAdjustFrame(ScrnInfoPtr pScrn, int x, int y)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2013-06-07 11:28:45 -06:00
|
|
|
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterScreenPtr pScreenPriv =
|
|
|
|
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
|
|
|
|
VGAarbiterScreenKey);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2013-06-07 11:28:45 -06:00
|
|
|
(*pScreenPriv->AdjustFrame) (pScrn, x, y);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
2013-06-07 11:28:45 -06:00
|
|
|
VGAarbiterSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
Bool val;
|
2013-06-07 11:28:45 -06:00
|
|
|
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterScreenPtr pScreenPriv =
|
|
|
|
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
|
|
|
|
VGAarbiterScreenKey);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2013-06-07 11:28:45 -06:00
|
|
|
val = (*pScreenPriv->SwitchMode) (pScrn, mode);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
2013-06-07 11:28:45 -06:00
|
|
|
VGAarbiterEnterVT(ScrnInfoPtr pScrn)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
Bool val;
|
2013-06-07 11:28:45 -06:00
|
|
|
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterScreenPtr pScreenPriv =
|
|
|
|
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
|
|
|
|
VGAarbiterScreenKey);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-12-05 08:36:02 -07:00
|
|
|
pScrn->EnterVT = pScreenPriv->EnterVT;
|
2013-06-07 11:28:45 -06:00
|
|
|
val = (*pScrn->EnterVT) (pScrn);
|
2010-12-05 08:36:02 -07:00
|
|
|
pScreenPriv->EnterVT = pScrn->EnterVT;
|
|
|
|
pScrn->EnterVT = VGAarbiterEnterVT;
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-06-07 11:28:45 -06:00
|
|
|
VGAarbiterLeaveVT(ScrnInfoPtr pScrn)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2013-06-07 11:28:45 -06:00
|
|
|
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterScreenPtr pScreenPriv =
|
|
|
|
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
|
|
|
|
VGAarbiterScreenKey);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-12-05 08:36:02 -07:00
|
|
|
pScrn->LeaveVT = pScreenPriv->LeaveVT;
|
2013-06-07 11:28:45 -06:00
|
|
|
(*pScreenPriv->LeaveVT) (pScrn);
|
2010-12-05 08:36:02 -07:00
|
|
|
pScreenPriv->LeaveVT = pScrn->LeaveVT;
|
|
|
|
pScrn->LeaveVT = VGAarbiterLeaveVT;
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-06-07 11:28:45 -06:00
|
|
|
VGAarbiterFreeScreen(ScrnInfoPtr pScrn)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2013-06-07 11:28:45 -06:00
|
|
|
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterScreenPtr pScreenPriv =
|
|
|
|
(VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
|
|
|
|
VGAarbiterScreenKey);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2013-06-07 11:28:45 -06:00
|
|
|
(*pScreenPriv->FreeScreen) (pScrn);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
|
|
|
VGAarbiterCreateGC(GCPtr pGC)
|
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
|
|
|
VGAarbiterGCPtr pGCPriv =
|
|
|
|
(VGAarbiterGCPtr) dixLookupPrivate(&pGC->devPrivates, VGAarbiterGCKey);
|
|
|
|
Bool ret;
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
SCREEN_PROLOG(CreateGC);
|
2012-06-10 07:21:05 -06:00
|
|
|
ret = (*pScreen->CreateGC) (pGC);
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
2012-06-10 07:21:05 -06:00
|
|
|
SCREEN_EPILOG(CreateGC, VGAarbiterCreateGC);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* GC funcs */
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
GC_UNWRAP(pGC);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->funcs->ValidateGC) (pGC, changes, pDraw);
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
VGAarbiterDestroyGC(GCPtr pGC)
|
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
GC_UNWRAP(pGC);
|
|
|
|
(*pGC->funcs->DestroyGC) (pGC);
|
|
|
|
GC_WRAP(pGC);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterChangeGC(GCPtr pGC, unsigned long mask)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2010-07-27 13:02:24 -06:00
|
|
|
(*pGC->funcs->ChangeGC) (pGC, mask);
|
2012-06-10 07:21:05 -06:00
|
|
|
GC_WRAP(pGC);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
GC_UNWRAP(pGCDst);
|
2010-07-27 13:02:24 -06:00
|
|
|
(*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst);
|
2012-06-10 07:21:05 -06:00
|
|
|
GC_WRAP(pGCDst);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2010-07-27 13:02:24 -06:00
|
|
|
(*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
|
2012-06-10 07:21:05 -06:00
|
|
|
GC_WRAP(pGC);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
|
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
GC_UNWRAP(pgcDst);
|
|
|
|
(*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc);
|
|
|
|
GC_WRAP(pgcDst);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
VGAarbiterDestroyClip(GCPtr pGC)
|
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
GC_UNWRAP(pGC);
|
|
|
|
(*pGC->funcs->DestroyClip) (pGC);
|
|
|
|
GC_WRAP(pGC);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
/* GC Ops */
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterFillSpans(DrawablePtr pDraw,
|
|
|
|
GC * pGC,
|
|
|
|
int nInit,
|
|
|
|
DDXPointPtr pptInit, int *pwidthInit, int fSorted)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->FillSpans) (pDraw, pGC, nInit, pptInit, pwidthInit, fSorted);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterSetSpans(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC,
|
|
|
|
char *pcharsrc,
|
|
|
|
register DDXPointPtr ppt,
|
|
|
|
int *pwidth, int nspans, int fSorted)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->SetSpans) (pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPutImage(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC,
|
|
|
|
int depth,
|
|
|
|
int x, int y, int w, int h,
|
|
|
|
int leftPad, int format, char *pImage)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->PutImage) (pDraw, pGC, depth, x, y, w, h,
|
|
|
|
leftPad, format, pImage);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static RegionPtr
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterCopyArea(DrawablePtr pSrc,
|
|
|
|
DrawablePtr pDst,
|
|
|
|
GC * pGC,
|
|
|
|
int srcx, int srcy,
|
|
|
|
int width, int height, int dstx, int dsty)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
RegionPtr ret;
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
ret = (*pGC->ops->CopyArea) (pSrc, pDst,
|
|
|
|
pGC, srcx, srcy, width, height, dstx, dsty);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static RegionPtr
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterCopyPlane(DrawablePtr pSrc,
|
|
|
|
DrawablePtr pDst,
|
|
|
|
GCPtr pGC,
|
|
|
|
int srcx, int srcy,
|
|
|
|
int width, int height,
|
|
|
|
int dstx, int dsty, unsigned long bitPlane)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
RegionPtr ret;
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
ret = (*pGC->ops->CopyPlane) (pSrc, pDst, pGC, srcx, srcy,
|
|
|
|
width, height, dstx, dsty, bitPlane);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPolyPoint(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC, int mode, int npt, xPoint * pptInit)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->PolyPoint) (pDraw, pGC, mode, npt, pptInit);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPolylines(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC, int mode, int npt, DDXPointPtr pptInit)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->Polylines) (pDraw, pGC, mode, npt, pptInit);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, xSegment * pSeg)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->PolySegment) (pDraw, pGC, nseg, pSeg);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPolyRectangle(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC, int nRectsInit, xRectangle *pRectsInit)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->PolyRectangle) (pDraw, pGC, nRectsInit, pRectsInit);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->PolyArc) (pDraw, pGC, narcs, parcs);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterFillPolygon(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC,
|
|
|
|
int shape, int mode, int count, DDXPointPtr ptsIn)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->FillPolygon) (pDraw, pGC, shape, mode, count, ptsIn);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPolyFillRect(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC, int nrectFill, xRectangle *prectInit)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->PolyFillRect) (pDraw, pGC, nrectFill, prectInit);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, parcs);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPolyText8(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC, int x, int y, int count, char *chars)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
int ret;
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
ret = (*pGC->ops->PolyText8) (pDraw, pGC, x, y, count, chars);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPolyText16(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC, int x, int y, int count, unsigned short *chars)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
int ret;
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
ret = (*pGC->ops->PolyText16) (pDraw, pGC, x, y, count, chars);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterImageText8(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC, int x, int y, int count, char *chars)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->ImageText8) (pDraw, pGC, x, y, count, chars);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterImageText16(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC, int x, int y, int count, unsigned short *chars)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->ImageText16) (pDraw, pGC, x, y, count, chars);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterImageGlyphBlt(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC,
|
|
|
|
int xInit, int yInit,
|
|
|
|
unsigned int nglyph,
|
|
|
|
CharInfoPtr * ppci, pointer pglyphBase)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->ImageGlyphBlt) (pDraw, pGC, xInit, yInit,
|
|
|
|
nglyph, ppci, pglyphBase);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPolyGlyphBlt(DrawablePtr pDraw,
|
|
|
|
GCPtr pGC,
|
|
|
|
int xInit, int yInit,
|
|
|
|
unsigned int nglyph,
|
|
|
|
CharInfoPtr * ppci, pointer pglyphBase)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->PolyGlyphBlt) (pDraw, pGC, xInit, yInit,
|
|
|
|
nglyph, ppci, pglyphBase);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterPushPixels(GCPtr pGC,
|
|
|
|
PixmapPtr pBitMap,
|
|
|
|
DrawablePtr pDraw, int dx, int dy, int xOrg, int yOrg)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2011-11-05 07:32:40 -06:00
|
|
|
ScreenPtr pScreen = pGC->pScreen;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_UNWRAP(pGC);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*pGC->ops->PushPixels) (pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg);
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAPut();
|
2010-07-27 13:02:24 -06:00
|
|
|
GC_WRAP(pGC);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* miSpriteFuncs */
|
|
|
|
static Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
|
|
CursorPtr pCur)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
Bool val;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
SPRITE_PROLOG;
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
val = PointPriv->spriteFuncs->RealizeCursor(pDev, pScreen, pCur);
|
|
|
|
VGAPut();
|
|
|
|
SPRITE_EPILOG;
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
|
|
|
|
CursorPtr pCur)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
Bool val;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
SPRITE_PROLOG;
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
val = PointPriv->spriteFuncs->UnrealizeCursor(pDev, pScreen, pCur);
|
|
|
|
VGAPut();
|
|
|
|
SPRITE_EPILOG;
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur,
|
|
|
|
int x, int y)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
|
|
|
SPRITE_PROLOG;
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
PointPriv->spriteFuncs->SetCursor(pDev, pScreen, pCur, x, y);
|
|
|
|
VGAPut();
|
|
|
|
SPRITE_EPILOG;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
|
|
|
|
{
|
|
|
|
SPRITE_PROLOG;
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
PointPriv->spriteFuncs->MoveCursor(pDev, pScreen, x, y);
|
|
|
|
VGAPut();
|
|
|
|
SPRITE_EPILOG;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Bool
|
|
|
|
VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
|
|
|
|
{
|
|
|
|
Bool val;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
SPRITE_PROLOG;
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
val = PointPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen);
|
|
|
|
VGAPut();
|
|
|
|
SPRITE_EPILOG;
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
|
|
|
|
{
|
|
|
|
SPRITE_PROLOG;
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
PointPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen);
|
|
|
|
VGAPut();
|
|
|
|
SPRITE_EPILOG;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,
|
2012-06-10 07:21:05 -06:00
|
|
|
PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask,
|
|
|
|
INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width,
|
|
|
|
CARD16 height)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
|
|
|
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
PICTURE_PROLOGUE(Composite);
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
(*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst,
|
2012-06-10 07:21:05 -06:00
|
|
|
yDst, width, height);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
|
|
|
PICTURE_EPILOGUE(Composite, VGAarbiterComposite);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
2012-06-10 07:21:05 -06:00
|
|
|
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist,
|
|
|
|
GlyphListPtr list, GlyphPtr * glyphs)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
|
|
|
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
PICTURE_PROLOGUE(Glyphs);
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
PICTURE_EPILOGUE(Glyphs, VGAarbiterGlyphs);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-06-10 07:21:05 -06:00
|
|
|
VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor * color,
|
|
|
|
int nRect, xRectangle *rects)
|
2010-07-27 13:02:24 -06:00
|
|
|
{
|
2012-06-10 07:21:05 -06:00
|
|
|
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
|
|
|
PictureScreenPtr ps = GetPictureScreen(pScreen);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
PICTURE_PROLOGUE(CompositeRects);
|
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
VGAGet(pScreen);
|
2012-06-10 07:21:05 -06:00
|
|
|
(*ps->CompositeRects) (op, pDst, color, nRect, rects);
|
2010-07-27 13:02:24 -06:00
|
|
|
VGAPut();
|
2012-06-10 07:21:05 -06:00
|
|
|
PICTURE_EPILOGUE(CompositeRects, VGAarbiterCompositeRects);
|
2010-07-27 13:02:24 -06:00
|
|
|
}
|