|
|
@ -41,6 +41,7 @@ This is the main driver file
|
|
|
|
#include "rdpPri.h"
|
|
|
|
#include "rdpPri.h"
|
|
|
|
#include "rdpDraw.h"
|
|
|
|
#include "rdpDraw.h"
|
|
|
|
#include "rdpGC.h"
|
|
|
|
#include "rdpGC.h"
|
|
|
|
|
|
|
|
#include "rdpCursor.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define XRDP_DRIVER_NAME "XRDPDEV"
|
|
|
|
#define XRDP_DRIVER_NAME "XRDPDEV"
|
|
|
|
#define XRDP_NAME "XRDPDEV"
|
|
|
|
#define XRDP_NAME "XRDPDEV"
|
|
|
@ -144,6 +145,8 @@ rdpPreInit(ScrnInfoPtr pScrn, int flags)
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rdpPrivateInit();
|
|
|
|
|
|
|
|
|
|
|
|
rdpAllocRec(pScrn);
|
|
|
|
rdpAllocRec(pScrn);
|
|
|
|
dev = XRDPPTR(pScrn);
|
|
|
|
dev = XRDPPTR(pScrn);
|
|
|
|
|
|
|
|
|
|
|
@ -254,24 +257,22 @@ rdpPreInit(ScrnInfoPtr pScrn, int flags)
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
|
|
|
static miPointerSpriteFuncRec g_rdpSpritePointerFuncs =
|
|
|
|
static miPointerSpriteFuncRec g_rdpSpritePointerFuncs =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* these are in viv_cur.c */
|
|
|
|
/* these are in rdpCursor.c */
|
|
|
|
rdpSpriteRealizeCursor,
|
|
|
|
rdpSpriteRealizeCursor,
|
|
|
|
rdpSpriteUnrealizeCursor,
|
|
|
|
rdpSpriteUnrealizeCursor,
|
|
|
|
rdpSpriteSetCursor,
|
|
|
|
rdpSpriteSetCursor,
|
|
|
|
rdpSpriteMoveCursor,
|
|
|
|
rdpSpriteMoveCursor,
|
|
|
|
rdpDeviceCursorInitialize,
|
|
|
|
rdpSpriteDeviceCursorInitialize,
|
|
|
|
rdpDeviceCursorCleanup
|
|
|
|
rdpSpriteDeviceCursorCleanup
|
|
|
|
};
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
|
static Bool
|
|
|
|
static Bool
|
|
|
|
rdpSaveScreen(ScreenPtr pScreen, int on)
|
|
|
|
rdpSaveScreen(ScreenPtr pScreen, int on)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(10, ("rdpSaveScreen:"));
|
|
|
|
LLOGLN(0, ("rdpSaveScreen:"));
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -284,18 +285,18 @@ rdpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|
|
|
VisualPtr vis;
|
|
|
|
VisualPtr vis;
|
|
|
|
int vis_found;
|
|
|
|
int vis_found;
|
|
|
|
|
|
|
|
|
|
|
|
rdpPrivateInit();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pScrn = xf86Screens[scrnIndex];
|
|
|
|
pScrn = xf86Screens[scrnIndex];
|
|
|
|
dev = XRDPPTR(pScrn);
|
|
|
|
dev = XRDPPTR(pScrn);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dev->pScreen = pScreen;
|
|
|
|
|
|
|
|
|
|
|
|
miClearVisualTypes();
|
|
|
|
miClearVisualTypes();
|
|
|
|
miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth),
|
|
|
|
miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth),
|
|
|
|
pScrn->rgbBits, TrueColor);
|
|
|
|
pScrn->rgbBits, TrueColor);
|
|
|
|
miSetPixmapDepths();
|
|
|
|
miSetPixmapDepths();
|
|
|
|
LLOGLN(0, ("rdpScreenInit: virtualX %d virtualY %d",
|
|
|
|
LLOGLN(0, ("rdpScreenInit: virtualX %d virtualY %d",
|
|
|
|
pScrn->virtualX, pScrn->virtualY));
|
|
|
|
pScrn->virtualX, pScrn->virtualY));
|
|
|
|
dev->ptr = malloc(1024 * 768 * 4);
|
|
|
|
dev->ptr = malloc(dev->width * dev->height * 4);
|
|
|
|
if (!fbScreenInit(pScreen, dev->ptr, pScrn->virtualX, pScrn->virtualY,
|
|
|
|
if (!fbScreenInit(pScreen, dev->ptr, pScrn->virtualX, pScrn->virtualY,
|
|
|
|
pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth,
|
|
|
|
pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth,
|
|
|
|
pScrn->bitsPerPixel))
|
|
|
|
pScrn->bitsPerPixel))
|
|
|
@ -331,10 +332,16 @@ rdpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|
|
|
xf86SetBlackWhitePixels(pScreen);
|
|
|
|
xf86SetBlackWhitePixels(pScreen);
|
|
|
|
xf86SetBackingStore(pScreen);
|
|
|
|
xf86SetBackingStore(pScreen);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
/* hardware cursor */
|
|
|
|
/* hardware cursor */
|
|
|
|
//dev->pCursorFuncs = xf86GetPointerScreenFuncs();
|
|
|
|
dev->pCursorFuncs = xf86GetPointerScreenFuncs();
|
|
|
|
//miPointerInitialize(pScreen, &g_rdpSpritePointerFuncs,
|
|
|
|
miPointerInitialize(pScreen, &g_rdpSpritePointerFuncs,
|
|
|
|
// dev->pCursorFuncs, 0);
|
|
|
|
dev->pCursorFuncs, 0);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
/* software cursor */
|
|
|
|
|
|
|
|
dev->pCursorFuncs = xf86GetPointerScreenFuncs();
|
|
|
|
|
|
|
|
miDCInitialize(pScreen, dev->pCursorFuncs);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
fbCreateDefColormap(pScreen);
|
|
|
|
fbCreateDefColormap(pScreen);
|
|
|
|
|
|
|
|
|
|
|
@ -358,7 +365,7 @@ rdpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dev->privateKeyRecGC = rdpAllocateGCPrivate(pScreen, sizeof(rdpGCRec));
|
|
|
|
dev->privateKeyRecGC = rdpAllocateGCPrivate(pScreen, sizeof(rdpGCRec));
|
|
|
|
dev->privateKeyRecPixmap =rdpAllocatePixmapPrivate(pScreen, sizeof(rdpPixmapRec));
|
|
|
|
dev->privateKeyRecPixmap = rdpAllocatePixmapPrivate(pScreen, sizeof(rdpPixmapRec));
|
|
|
|
|
|
|
|
|
|
|
|
dev->CopyWindow = pScreen->CopyWindow;
|
|
|
|
dev->CopyWindow = pScreen->CopyWindow;
|
|
|
|
pScreen->CopyWindow = rdpCopyWindow;
|
|
|
|
pScreen->CopyWindow = rdpCopyWindow;
|
|
|
@ -488,8 +495,18 @@ rdpAvailableOptions(int chipid, int busid)
|
|
|
|
static Bool
|
|
|
|
static Bool
|
|
|
|
rdpDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer ptr)
|
|
|
|
rdpDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer ptr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
LLOGLN(0, ("rdpDriverFunc:"));
|
|
|
|
xorgHWFlags *flags;
|
|
|
|
return 0;
|
|
|
|
int rv;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rv = 0;
|
|
|
|
|
|
|
|
LLOGLN(0, ("rdpDriverFunc: op %d", (int)op));
|
|
|
|
|
|
|
|
if (op == GET_REQUIRED_HW_INTERFACES)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
flags = (xorgHWFlags *) ptr;
|
|
|
|
|
|
|
|
*flags = HW_SKIP_CONSOLE;
|
|
|
|
|
|
|
|
rv = 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|