Merge branch 'master' into mpx
Conflicts: dix/devices.c hw/xfree86/common/xf86Xinput.c hw/xfree86/loader/xf86sym.c mi/mieq.c
This commit is contained in:
commit
1f97a76476
|
@ -1019,6 +1019,7 @@ __glXCreateARGBConfig(__GLXscreen *screen)
|
||||||
VisualPtr visual;
|
VisualPtr visual;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* search for a 32-bit visual */
|
||||||
visual = NULL;
|
visual = NULL;
|
||||||
for (i = 0; i < screen->pScreen->numVisuals; i++)
|
for (i = 0; i < screen->pScreen->numVisuals; i++)
|
||||||
if (screen->pScreen->visuals[i].nplanes == 32) {
|
if (screen->pScreen->visuals[i].nplanes == 32) {
|
||||||
|
@ -1037,8 +1038,22 @@ __glXCreateARGBConfig(__GLXscreen *screen)
|
||||||
if (modes == NULL)
|
if (modes == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
modes->next = screen->modes;
|
/* Insert this new mode at the TAIL of the linked list.
|
||||||
screen->modes = modes;
|
* Previously, the mode was incorrectly inserted at the head of the
|
||||||
|
* list, causing find_mesa_visual() to be off by one. This would
|
||||||
|
* GLX clients to blow up if they attempted to use the last mode
|
||||||
|
* in the list!
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
__GLcontextModes *prev = NULL, *m;
|
||||||
|
for (m = screen->modes; m; m = m->next)
|
||||||
|
prev = m;
|
||||||
|
if (prev)
|
||||||
|
prev->next = modes;
|
||||||
|
else
|
||||||
|
screen->modes = modes;
|
||||||
|
}
|
||||||
|
|
||||||
screen->numUsableVisuals++;
|
screen->numUsableVisuals++;
|
||||||
screen->numVisuals++;
|
screen->numVisuals++;
|
||||||
|
|
||||||
|
@ -1104,6 +1119,9 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap)
|
||||||
}
|
}
|
||||||
pGlxScreen = __glXActiveScreens[screen];
|
pGlxScreen = __glXActiveScreens[screen];
|
||||||
|
|
||||||
|
/* Create the "extra" 32bpp ARGB visual, if not already added.
|
||||||
|
* XXX This is questionable place to do so! Re-examine this someday.
|
||||||
|
*/
|
||||||
__glXCreateARGBConfig(pGlxScreen);
|
__glXCreateARGBConfig(pGlxScreen);
|
||||||
|
|
||||||
reply.numFBConfigs = pGlxScreen->numUsableVisuals;
|
reply.numFBConfigs = pGlxScreen->numUsableVisuals;
|
||||||
|
@ -1661,6 +1679,7 @@ DoGetDrawableAttributes(__GLXclientState *cl, XID drawId)
|
||||||
xGLXGetDrawableAttributesReply reply;
|
xGLXGetDrawableAttributesReply reply;
|
||||||
CARD32 attributes[4];
|
CARD32 attributes[4];
|
||||||
int numAttribs;
|
int numAttribs;
|
||||||
|
PixmapPtr pixmap;
|
||||||
|
|
||||||
glxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes);
|
glxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes);
|
||||||
if (!glxPixmap) {
|
if (!glxPixmap) {
|
||||||
|
@ -1675,10 +1694,19 @@ DoGetDrawableAttributes(__GLXclientState *cl, XID drawId)
|
||||||
reply.numAttribs = numAttribs;
|
reply.numAttribs = numAttribs;
|
||||||
|
|
||||||
attributes[0] = GLX_TEXTURE_TARGET_EXT;
|
attributes[0] = GLX_TEXTURE_TARGET_EXT;
|
||||||
attributes[1] = GLX_TEXTURE_RECTANGLE_EXT;
|
|
||||||
attributes[2] = GLX_Y_INVERTED_EXT;
|
attributes[2] = GLX_Y_INVERTED_EXT;
|
||||||
attributes[3] = GL_FALSE;
|
attributes[3] = GL_FALSE;
|
||||||
|
|
||||||
|
/* XXX this is merely less wrong, see fdo bug #8991 */
|
||||||
|
pixmap = (PixmapPtr) glxPixmap->pDraw;
|
||||||
|
if ((pixmap->drawable.width & (pixmap->drawable.width - 1)) ||
|
||||||
|
(pixmap->drawable.height & (pixmap->drawable.height - 1))
|
||||||
|
/* || strstr(CALL_GetString(GL_EXTENSIONS,
|
||||||
|
"GL_ARB_texture_non_power_of_two")) */)
|
||||||
|
attributes[1] = GLX_TEXTURE_RECTANGLE_EXT;
|
||||||
|
else
|
||||||
|
attributes[1] = GLX_TEXTURE_2D_EXT;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
__glXSwapGetDrawableAttributesReply(client, &reply, attributes);
|
__glXSwapGetDrawableAttributesReply(client, &reply, attributes);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -42,6 +42,10 @@
|
||||||
|
|
||||||
#include <damage.h>
|
#include <damage.h>
|
||||||
|
|
||||||
|
#ifdef XF86DRI
|
||||||
|
#include <GL/internal/dri_interface.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
|
@ -50,7 +54,12 @@ typedef struct {
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
Bool idExists;
|
Bool idExists;
|
||||||
int refcnt;
|
int refcnt;
|
||||||
|
#ifdef XF86DRI
|
||||||
DamagePtr pDamage;
|
DamagePtr pDamage;
|
||||||
|
__DRIcontext *pDRICtx;
|
||||||
|
GLint texname;
|
||||||
|
unsigned long offset;
|
||||||
|
#endif
|
||||||
} __GLXpixmap;
|
} __GLXpixmap;
|
||||||
|
|
||||||
struct __GLXdrawable {
|
struct __GLXdrawable {
|
||||||
|
|
292
GL/glx/glxdri.c
292
GL/glx/glxdri.c
|
@ -76,6 +76,11 @@ struct __GLXDRIscreen {
|
||||||
xf86EnterVTProc *enterVT;
|
xf86EnterVTProc *enterVT;
|
||||||
xf86LeaveVTProc *leaveVT;
|
xf86LeaveVTProc *leaveVT;
|
||||||
|
|
||||||
|
DRITexOffsetStartProcPtr texOffsetStart;
|
||||||
|
DRITexOffsetFinishProcPtr texOffsetFinish;
|
||||||
|
__GLXpixmap* texOffsetOverride[16];
|
||||||
|
GLuint lastTexOffsetOverride;
|
||||||
|
|
||||||
unsigned char glx_enable_bits[__GLX_EXT_BYTES];
|
unsigned char glx_enable_bits[__GLX_EXT_BYTES];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,30 +130,75 @@ struct __GLXDRIdrawable {
|
||||||
static const char CREATE_NEW_SCREEN_FUNC[] =
|
static const char CREATE_NEW_SCREEN_FUNC[] =
|
||||||
"__driCreateNewScreen_" STRINGIFY (INTERNAL_VERSION);
|
"__driCreateNewScreen_" STRINGIFY (INTERNAL_VERSION);
|
||||||
|
|
||||||
/* The DRI driver entry point version wasn't bumped when the
|
|
||||||
* copySubBuffer functionality was added to the DRI drivers, but the
|
|
||||||
* functionality is still conditional on the value of the
|
|
||||||
* internal_api_version passed to __driCreateNewScreen. However, the
|
|
||||||
* screen constructor doesn't fail for a DRI driver that's older than
|
|
||||||
* the passed in version number, so there's no way we can know for
|
|
||||||
* sure that we can actually use the copySubBuffer functionality. But
|
|
||||||
* since the earliest (and at this point only) released mesa version
|
|
||||||
* (6.5) that uses the 20050727 entry point does have copySubBuffer,
|
|
||||||
* we'll just settle for that. We still have to pass in a higher to
|
|
||||||
* the screen constructor to enable the functionality.
|
|
||||||
*/
|
|
||||||
#define COPY_SUB_BUFFER_INTERNAL_VERSION 20060314
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
__glXDRIleaveServer(void)
|
__glXDRIleaveServer(GLboolean rendering)
|
||||||
{
|
{
|
||||||
DRIBlockHandler(NULL, NULL, NULL);
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; rendering && i < screenInfo.numScreens; i++) {
|
||||||
|
__GLXDRIscreen * const screen =
|
||||||
|
(__GLXDRIscreen *) __glXgetActiveScreen(i);
|
||||||
|
GLuint lastOverride = screen->lastTexOffsetOverride;
|
||||||
|
|
||||||
|
if (lastOverride) {
|
||||||
|
__GLXpixmap **texOffsetOverride = screen->texOffsetOverride;
|
||||||
|
int j;
|
||||||
|
|
||||||
|
for (j = 0; j < lastOverride; j++) {
|
||||||
|
__GLXpixmap *pGlxPix = texOffsetOverride[j];
|
||||||
|
|
||||||
|
if (pGlxPix && pGlxPix->texname) {
|
||||||
|
pGlxPix->offset =
|
||||||
|
screen->texOffsetStart((PixmapPtr)pGlxPix->pDraw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DRIBlockHandler(NULL, NULL, NULL);
|
||||||
|
|
||||||
|
for (i = 0; rendering && i < screenInfo.numScreens; i++) {
|
||||||
|
__GLXDRIscreen * const screen =
|
||||||
|
(__GLXDRIscreen *) __glXgetActiveScreen(i);
|
||||||
|
GLuint lastOverride = screen->lastTexOffsetOverride;
|
||||||
|
|
||||||
|
if (lastOverride) {
|
||||||
|
__GLXpixmap **texOffsetOverride = screen->texOffsetOverride;
|
||||||
|
int j;
|
||||||
|
|
||||||
|
for (j = 0; j < lastOverride; j++) {
|
||||||
|
__GLXpixmap *pGlxPix = texOffsetOverride[j];
|
||||||
|
|
||||||
|
if (pGlxPix && pGlxPix->texname) {
|
||||||
|
screen->driScreen.setTexOffset(pGlxPix->pDRICtx,
|
||||||
|
pGlxPix->texname,
|
||||||
|
pGlxPix->offset,
|
||||||
|
pGlxPix->pDraw->depth,
|
||||||
|
((PixmapPtr)pGlxPix->pDraw)->
|
||||||
|
devKind);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
__glXDRIenterServer(void)
|
__glXDRIenterServer(GLboolean rendering)
|
||||||
{
|
{
|
||||||
DRIWakeupHandler(NULL, 0, NULL);
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; rendering && i < screenInfo.numScreens; i++) {
|
||||||
|
__GLXDRIscreen * const screen =
|
||||||
|
(__GLXDRIscreen *) __glXgetActiveScreen(i);
|
||||||
|
|
||||||
|
if (screen->lastTexOffsetOverride) {
|
||||||
|
CALL_Flush(GET_DISPATCH(), ());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DRIWakeupHandler(NULL, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -289,19 +339,6 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext)
|
||||||
&context->driContext);
|
&context->driContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
glxCountBits(int word)
|
|
||||||
{
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
while (word) {
|
|
||||||
ret += (word & 1);
|
|
||||||
word >>= 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glxFillAlphaChannel (PixmapPtr pixmap, int x, int y, int width, int height)
|
glxFillAlphaChannel (PixmapPtr pixmap, int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
|
@ -335,19 +372,75 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
|
||||||
int buffer,
|
int buffer,
|
||||||
__GLXpixmap *glxPixmap)
|
__GLXpixmap *glxPixmap)
|
||||||
{
|
{
|
||||||
RegionPtr pRegion;
|
RegionPtr pRegion = NULL;
|
||||||
PixmapPtr pixmap;
|
PixmapPtr pixmap;
|
||||||
int bpp;
|
int w, h, bpp, override = 0;
|
||||||
GLenum target, format, type;
|
GLenum target, format, type;
|
||||||
|
ScreenPtr pScreen = glxPixmap->pScreen;
|
||||||
|
__GLXDRIscreen * const screen =
|
||||||
|
(__GLXDRIscreen *) __glXgetActiveScreen(pScreen->myNum);
|
||||||
|
|
||||||
pixmap = (PixmapPtr) glxPixmap->pDraw;
|
pixmap = (PixmapPtr) glxPixmap->pDraw;
|
||||||
if (!glxPixmap->pDamage) {
|
w = pixmap->drawable.width;
|
||||||
glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone,
|
h = pixmap->drawable.height;
|
||||||
TRUE, glxPixmap->pScreen, NULL);
|
|
||||||
if (!glxPixmap->pDamage)
|
if (h & (h - 1) || w & (w - 1))
|
||||||
return BadAlloc;
|
target = GL_TEXTURE_RECTANGLE_ARB;
|
||||||
|
else
|
||||||
|
target = GL_TEXTURE_2D;
|
||||||
|
|
||||||
|
if (screen->texOffsetStart && screen->driScreen.setTexOffset) {
|
||||||
|
__GLXpixmap **texOffsetOverride = screen->texOffsetOverride;
|
||||||
|
int i, firstEmpty = 16, texname;
|
||||||
|
|
||||||
|
for (i = 0; i < 16; i++) {
|
||||||
|
if (texOffsetOverride[i] == glxPixmap)
|
||||||
|
goto alreadyin;
|
||||||
|
|
||||||
|
if (firstEmpty == 16 && !texOffsetOverride[i])
|
||||||
|
firstEmpty = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (firstEmpty == 16) {
|
||||||
|
ErrorF("%s: Failed to register texture offset override\n", __func__);
|
||||||
|
goto nooverride;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (firstEmpty >= screen->lastTexOffsetOverride)
|
||||||
|
screen->lastTexOffsetOverride = firstEmpty + 1;
|
||||||
|
|
||||||
|
texOffsetOverride[firstEmpty] = glxPixmap;
|
||||||
|
|
||||||
|
alreadyin:
|
||||||
|
override = 1;
|
||||||
|
|
||||||
|
glxPixmap->pDRICtx = &((__GLXDRIcontext*)baseContext)->driContext;
|
||||||
|
|
||||||
|
CALL_GetIntegerv(GET_DISPATCH(), (target == GL_TEXTURE_2D ?
|
||||||
|
GL_TEXTURE_BINDING_2D :
|
||||||
|
GL_TEXTURE_BINDING_RECTANGLE_NV,
|
||||||
|
&texname));
|
||||||
|
|
||||||
|
if (texname == glxPixmap->texname)
|
||||||
|
return Success;
|
||||||
|
|
||||||
|
glxPixmap->texname = texname;
|
||||||
|
|
||||||
|
screen->driScreen.setTexOffset(glxPixmap->pDRICtx, texname, 0,
|
||||||
|
pixmap->drawable.depth, pixmap->devKind);
|
||||||
|
}
|
||||||
|
nooverride:
|
||||||
|
|
||||||
|
if (!glxPixmap->pDamage) {
|
||||||
|
if (!override) {
|
||||||
|
glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone,
|
||||||
|
TRUE, pScreen, NULL);
|
||||||
|
if (!glxPixmap->pDamage)
|
||||||
|
return BadAlloc;
|
||||||
|
|
||||||
|
DamageRegister ((DrawablePtr) pixmap, glxPixmap->pDamage);
|
||||||
|
}
|
||||||
|
|
||||||
DamageRegister ((DrawablePtr) pixmap, glxPixmap->pDamage);
|
|
||||||
pRegion = NULL;
|
pRegion = NULL;
|
||||||
} else {
|
} else {
|
||||||
pRegion = DamageRegion(glxPixmap->pDamage);
|
pRegion = DamageRegion(glxPixmap->pDamage);
|
||||||
|
@ -360,30 +453,22 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
|
||||||
bpp = 4;
|
bpp = 4;
|
||||||
format = GL_BGRA;
|
format = GL_BGRA;
|
||||||
type =
|
type =
|
||||||
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
|
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
||||||
GL_UNSIGNED_BYTE;
|
!override ? GL_UNSIGNED_INT_8_8_8_8_REV :
|
||||||
#else
|
|
||||||
GL_UNSIGNED_INT_8_8_8_8_REV;
|
|
||||||
#endif
|
#endif
|
||||||
|
GL_UNSIGNED_BYTE;
|
||||||
} else {
|
} else {
|
||||||
bpp = 2;
|
bpp = 2;
|
||||||
format = GL_RGB;
|
format = GL_RGB;
|
||||||
type = GL_UNSIGNED_SHORT_5_6_5;
|
type = GL_UNSIGNED_SHORT_5_6_5;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(glxCountBits(pixmap->drawable.width) == 1 &&
|
|
||||||
glxCountBits(pixmap->drawable.height) == 1)
|
|
||||||
/* || strstr(CALL_GetString(GL_EXTENSIONS,
|
|
||||||
"GL_ARB_texture_non_power_of_two")) */)
|
|
||||||
target = GL_TEXTURE_RECTANGLE_ARB;
|
|
||||||
else
|
|
||||||
target = GL_TEXTURE_2D;
|
|
||||||
|
|
||||||
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,
|
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,
|
||||||
pixmap->devKind / bpp) );
|
pixmap->devKind / bpp) );
|
||||||
|
|
||||||
if (pRegion == NULL)
|
if (pRegion == NULL)
|
||||||
{
|
{
|
||||||
if (pixmap->drawable.depth == 24)
|
if (!override && pixmap->drawable.depth == 24)
|
||||||
glxFillAlphaChannel(pixmap,
|
glxFillAlphaChannel(pixmap,
|
||||||
pixmap->drawable.x,
|
pixmap->drawable.x,
|
||||||
pixmap->drawable.y,
|
pixmap->drawable.y,
|
||||||
|
@ -404,8 +489,8 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
|
||||||
0,
|
0,
|
||||||
format,
|
format,
|
||||||
type,
|
type,
|
||||||
pixmap->devPrivate.ptr) );
|
override ? NULL : pixmap->devPrivate.ptr) );
|
||||||
} else {
|
} else if (!override) {
|
||||||
int i, numRects;
|
int i, numRects;
|
||||||
BoxPtr p;
|
BoxPtr p;
|
||||||
|
|
||||||
|
@ -436,7 +521,8 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DamageEmpty(glxPixmap->pDamage);
|
if (!override)
|
||||||
|
DamageEmpty(glxPixmap->pDamage);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
@ -446,6 +532,40 @@ __glXDRIreleaseTexImage(__GLXcontext *baseContext,
|
||||||
int buffer,
|
int buffer,
|
||||||
__GLXpixmap *pixmap)
|
__GLXpixmap *pixmap)
|
||||||
{
|
{
|
||||||
|
ScreenPtr pScreen = pixmap->pScreen;
|
||||||
|
__GLXDRIscreen * const screen =
|
||||||
|
(__GLXDRIscreen *) __glXgetActiveScreen(pScreen->myNum);
|
||||||
|
GLuint lastOverride = screen->lastTexOffsetOverride;
|
||||||
|
|
||||||
|
if (lastOverride) {
|
||||||
|
__GLXpixmap **texOffsetOverride = screen->texOffsetOverride;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < lastOverride; i++) {
|
||||||
|
if (texOffsetOverride[i] == pixmap) {
|
||||||
|
if (screen->texOffsetFinish)
|
||||||
|
screen->texOffsetFinish((PixmapPtr)pixmap->pDraw);
|
||||||
|
|
||||||
|
texOffsetOverride[i] = NULL;
|
||||||
|
|
||||||
|
if (i + 1 == lastOverride) {
|
||||||
|
lastOverride = 0;
|
||||||
|
|
||||||
|
while (i--) {
|
||||||
|
if (texOffsetOverride[i]) {
|
||||||
|
lastOverride = i + 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
screen->lastTexOffsetOverride = lastOverride;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -666,9 +786,9 @@ static GLboolean createContext(__DRInativeDisplay *dpy, int screen,
|
||||||
fakeID = FakeClientID(0);
|
fakeID = FakeClientID(0);
|
||||||
*(XID *) contextID = fakeID;
|
*(XID *) contextID = fakeID;
|
||||||
|
|
||||||
__glXDRIenterServer();
|
__glXDRIenterServer(GL_FALSE);
|
||||||
retval = DRICreateContext(pScreen, visual, fakeID, hw_context);
|
retval = DRICreateContext(pScreen, visual, fakeID, hw_context);
|
||||||
__glXDRIleaveServer();
|
__glXDRIleaveServer(GL_FALSE);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -677,9 +797,9 @@ static GLboolean destroyContext(__DRInativeDisplay *dpy, int screen,
|
||||||
{
|
{
|
||||||
GLboolean retval;
|
GLboolean retval;
|
||||||
|
|
||||||
__glXDRIenterServer();
|
__glXDRIenterServer(GL_FALSE);
|
||||||
retval = DRIDestroyContext(screenInfo.screens[screen], context);
|
retval = DRIDestroyContext(screenInfo.screens[screen], context);
|
||||||
__glXDRIleaveServer();
|
__glXDRIleaveServer(GL_FALSE);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,12 +814,12 @@ createDrawable(__DRInativeDisplay *dpy, int screen,
|
||||||
if (!pDrawable)
|
if (!pDrawable)
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
__glXDRIenterServer();
|
__glXDRIenterServer(GL_FALSE);
|
||||||
retval = DRICreateDrawable(screenInfo.screens[screen],
|
retval = DRICreateDrawable(screenInfo.screens[screen],
|
||||||
drawable,
|
drawable,
|
||||||
pDrawable,
|
pDrawable,
|
||||||
hHWDrawable);
|
hHWDrawable);
|
||||||
__glXDRIleaveServer();
|
__glXDRIleaveServer(GL_FALSE);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -713,11 +833,11 @@ destroyDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable)
|
||||||
if (!pDrawable)
|
if (!pDrawable)
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
__glXDRIenterServer();
|
__glXDRIenterServer(GL_FALSE);
|
||||||
retval = DRIDestroyDrawable(screenInfo.screens[screen],
|
retval = DRIDestroyDrawable(screenInfo.screens[screen],
|
||||||
drawable,
|
drawable,
|
||||||
pDrawable);
|
pDrawable);
|
||||||
__glXDRIleaveServer();
|
__glXDRIleaveServer(GL_FALSE);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -754,20 +874,44 @@ getDrawableInfo(__DRInativeDisplay *dpy, int screen,
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
__glXDRIenterServer();
|
__glXDRIenterServer(GL_FALSE);
|
||||||
retval = DRIGetDrawableInfo(screenInfo.screens[screen],
|
retval = DRIGetDrawableInfo(screenInfo.screens[screen],
|
||||||
pDrawable, index, stamp,
|
pDrawable, index, stamp,
|
||||||
x, y, width, height,
|
x, y, width, height,
|
||||||
numClipRects, &pClipRects,
|
numClipRects, &pClipRects,
|
||||||
backX, backY,
|
backX, backY,
|
||||||
numBackClipRects, &pBackClipRects);
|
numBackClipRects, &pBackClipRects);
|
||||||
__glXDRIleaveServer();
|
__glXDRIleaveServer(GL_FALSE);
|
||||||
|
|
||||||
if (*numClipRects > 0) {
|
if (*numClipRects > 0) {
|
||||||
size = sizeof (drm_clip_rect_t) * *numClipRects;
|
size = sizeof (drm_clip_rect_t) * *numClipRects;
|
||||||
*ppClipRects = xalloc (size);
|
*ppClipRects = xalloc (size);
|
||||||
if (*ppClipRects != NULL)
|
|
||||||
memcpy (*ppClipRects, pClipRects, size);
|
/* Clip cliprects to screen dimensions (redirected windows) */
|
||||||
|
if (*ppClipRects != NULL) {
|
||||||
|
ScreenPtr pScreen = screenInfo.screens[screen];
|
||||||
|
int i, j;
|
||||||
|
|
||||||
|
for (i = 0, j = 0; i < *numClipRects; i++) {
|
||||||
|
(*ppClipRects)[j].x1 = max(pClipRects[i].x1, 0);
|
||||||
|
(*ppClipRects)[j].y1 = max(pClipRects[i].y1, 0);
|
||||||
|
(*ppClipRects)[j].x2 = min(pClipRects[i].x2, pScreen->width);
|
||||||
|
(*ppClipRects)[j].y2 = min(pClipRects[i].y2, pScreen->height);
|
||||||
|
|
||||||
|
if ((*ppClipRects)[j].x1 < (*ppClipRects)[j].x2 &&
|
||||||
|
(*ppClipRects)[j].y1 < (*ppClipRects)[j].y2) {
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*numClipRects != j) {
|
||||||
|
*numClipRects = j;
|
||||||
|
*ppClipRects = xrealloc (*ppClipRects,
|
||||||
|
sizeof (drm_clip_rect_t) *
|
||||||
|
*numClipRects);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
*numClipRects = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*ppClipRects = NULL;
|
*ppClipRects = NULL;
|
||||||
|
@ -866,7 +1010,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
||||||
__DRIframebuffer framebuffer;
|
__DRIframebuffer framebuffer;
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
int status;
|
int status;
|
||||||
int api_ver = COPY_SUB_BUFFER_INTERNAL_VERSION;
|
int api_ver = 20070121;
|
||||||
drm_magic_t magic;
|
drm_magic_t magic;
|
||||||
drmVersionPtr version;
|
drmVersionPtr version;
|
||||||
int newlyopened;
|
int newlyopened;
|
||||||
|
@ -881,13 +1025,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
||||||
size_t buffer_size;
|
size_t buffer_size;
|
||||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||||
|
|
||||||
if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable")) {
|
if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable") ||
|
||||||
LogMessage(X_ERROR, "AIGLX: DRI module not loaded\n");
|
!DRIQueryDirectRenderingCapable(pScreen, &isCapable) ||
|
||||||
return NULL;
|
!isCapable) {
|
||||||
}
|
LogMessage(X_INFO,
|
||||||
|
|
||||||
if (!DRIQueryDirectRenderingCapable(pScreen, &isCapable) || !isCapable) {
|
|
||||||
LogMessage(X_ERROR,
|
|
||||||
"AIGLX: Screen %d is not DRI capable\n", pScreen->myNum);
|
"AIGLX: Screen %d is not DRI capable\n", pScreen->myNum);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1048,6 +1189,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
||||||
goto handle_error;
|
goto handle_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DRIGetTexOffsetFuncs(pScreen, &screen->texOffsetStart,
|
||||||
|
&screen->texOffsetFinish);
|
||||||
|
|
||||||
__glXScreenInit(&screen->base, pScreen);
|
__glXScreenInit(&screen->base, pScreen);
|
||||||
|
|
||||||
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
|
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
|
||||||
|
|
|
@ -238,9 +238,9 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
|
||||||
* the latter case we need to lift the DRI lock manually. */
|
* the latter case we need to lift the DRI lock manually. */
|
||||||
|
|
||||||
if (!glxBlockClients) {
|
if (!glxBlockClients) {
|
||||||
__glXleaveServer();
|
__glXleaveServer(GL_FALSE);
|
||||||
cx->destroy(cx);
|
cx->destroy(cx);
|
||||||
__glXenterServer();
|
__glXenterServer(GL_FALSE);
|
||||||
} else {
|
} else {
|
||||||
cx->next = glxPendingDestroyContexts;
|
cx->next = glxPendingDestroyContexts;
|
||||||
glxPendingDestroyContexts = cx;
|
glxPendingDestroyContexts = cx;
|
||||||
|
@ -439,49 +439,49 @@ void glxResumeClients(void)
|
||||||
AttendClient(__glXClients[i]->client);
|
AttendClient(__glXClients[i]->client);
|
||||||
}
|
}
|
||||||
|
|
||||||
__glXleaveServer();
|
__glXleaveServer(GL_FALSE);
|
||||||
for (cx = glxPendingDestroyContexts; cx != NULL; cx = next) {
|
for (cx = glxPendingDestroyContexts; cx != NULL; cx = next) {
|
||||||
next = cx->next;
|
next = cx->next;
|
||||||
|
|
||||||
cx->destroy(cx);
|
cx->destroy(cx);
|
||||||
}
|
}
|
||||||
glxPendingDestroyContexts = NULL;
|
glxPendingDestroyContexts = NULL;
|
||||||
__glXenterServer();
|
__glXenterServer(GL_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
__glXnopEnterServer(void)
|
__glXnopEnterServer(GLboolean rendering)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
__glXnopLeaveServer(void)
|
__glXnopLeaveServer(GLboolean rendering)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void (*__glXenterServerFunc)(void) = __glXnopEnterServer;
|
static void (*__glXenterServerFunc)(GLboolean) = __glXnopEnterServer;
|
||||||
static void (*__glXleaveServerFunc)(void) = __glXnopLeaveServer;
|
static void (*__glXleaveServerFunc)(GLboolean) = __glXnopLeaveServer;
|
||||||
|
|
||||||
void __glXsetEnterLeaveServerFuncs(void (*enter)(void),
|
void __glXsetEnterLeaveServerFuncs(void (*enter)(GLboolean),
|
||||||
void (*leave)(void))
|
void (*leave)(GLboolean))
|
||||||
{
|
{
|
||||||
__glXenterServerFunc = enter;
|
__glXenterServerFunc = enter;
|
||||||
__glXleaveServerFunc = leave;
|
__glXleaveServerFunc = leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void __glXenterServer(void)
|
void __glXenterServer(GLboolean rendering)
|
||||||
{
|
{
|
||||||
glxServerLeaveCount--;
|
glxServerLeaveCount--;
|
||||||
|
|
||||||
if (glxServerLeaveCount == 0)
|
if (glxServerLeaveCount == 0)
|
||||||
(*__glXenterServerFunc)();
|
(*__glXenterServerFunc)(rendering);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __glXleaveServer(void)
|
void __glXleaveServer(GLboolean rendering)
|
||||||
{
|
{
|
||||||
if (glxServerLeaveCount == 0)
|
if (glxServerLeaveCount == 0)
|
||||||
(*__glXleaveServerFunc)();
|
(*__glXleaveServerFunc)(rendering);
|
||||||
|
|
||||||
glxServerLeaveCount++;
|
glxServerLeaveCount++;
|
||||||
}
|
}
|
||||||
|
@ -546,11 +546,12 @@ static int __glXDispatch(ClientPtr client)
|
||||||
opcode,
|
opcode,
|
||||||
client->swapped);
|
client->swapped);
|
||||||
if (proc != NULL) {
|
if (proc != NULL) {
|
||||||
__glXleaveServer();
|
GLboolean rendering = opcode <= X_GLXRenderLarge;
|
||||||
|
__glXleaveServer(rendering);
|
||||||
|
|
||||||
retval = (*proc)(cl, (GLbyte *) stuff);
|
retval = (*proc)(cl, (GLbyte *) stuff);
|
||||||
|
|
||||||
__glXenterServer();
|
__glXenterServer(rendering);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
retval = BadRequest;
|
retval = BadRequest;
|
||||||
|
|
|
@ -106,11 +106,11 @@ __glXMesaDrawableSwapBuffers(__GLXdrawable *base)
|
||||||
* why we need to re-take the lock and swap in the server context
|
* why we need to re-take the lock and swap in the server context
|
||||||
* before calling XMesaSwapBuffers() here. /me shakes head. */
|
* before calling XMesaSwapBuffers() here. /me shakes head. */
|
||||||
|
|
||||||
__glXenterServer();
|
__glXenterServer(GL_FALSE);
|
||||||
|
|
||||||
XMesaSwapBuffers(glxPriv->xm_buf);
|
XMesaSwapBuffers(glxPriv->xm_buf);
|
||||||
|
|
||||||
__glXleaveServer();
|
__glXleaveServer(GL_FALSE);
|
||||||
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,10 +131,10 @@ struct __GLXprovider {
|
||||||
|
|
||||||
void GlxPushProvider(__GLXprovider *provider);
|
void GlxPushProvider(__GLXprovider *provider);
|
||||||
|
|
||||||
void __glXsetEnterLeaveServerFuncs(void (*enter)(void),
|
void __glXsetEnterLeaveServerFuncs(void (*enter)(GLboolean),
|
||||||
void (*leave)(void));
|
void (*leave)(GLboolean));
|
||||||
void __glXenterServer(void);
|
void __glXenterServer(GLboolean rendering);
|
||||||
void __glXleaveServer(void);
|
void __glXleaveServer(GLboolean rendering);
|
||||||
|
|
||||||
void glxSuspendClients(void);
|
void glxSuspendClients(void);
|
||||||
void glxResumeClients(void);
|
void glxResumeClients(void);
|
||||||
|
|
|
@ -211,8 +211,6 @@ extern HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc);
|
|
||||||
extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc);
|
|
||||||
extern HIDDEN void __glXDisp_TexParameterf(GLbyte * pc);
|
extern HIDDEN void __glXDisp_TexParameterf(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_TexParameteri(GLbyte * pc);
|
extern HIDDEN void __glXDisp_TexParameteri(GLbyte * pc);
|
||||||
|
@ -519,6 +517,8 @@ extern HIDDEN void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc);
|
||||||
|
extern HIDDEN int __glXDisp_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc);
|
extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc);
|
extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc);
|
||||||
|
@ -849,10 +849,8 @@ extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *
|
||||||
extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc);
|
||||||
extern HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
|
||||||
extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc);
|
extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc);
|
||||||
|
@ -877,6 +875,10 @@ extern HIDDEN void __glXDisp_Map2f(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_Map2f(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_Map2f(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc);
|
extern HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc);
|
||||||
extern HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc);
|
extern HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc);
|
||||||
|
extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
extern HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *);
|
||||||
extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
|
extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
|
||||||
|
|
|
@ -1231,8 +1231,8 @@ const struct __glXDispatchInfo Render_dispatch_info = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
/* tree depth = 13 */
|
/* tree depth = 12 */
|
||||||
static const int_fast16_t VendorPriv_dispatch_tree[155] = {
|
static const int_fast16_t VendorPriv_dispatch_tree[152] = {
|
||||||
/* [0] -> opcode range [0, 131072], node depth 1 */
|
/* [0] -> opcode range [0, 131072], node depth 1 */
|
||||||
2,
|
2,
|
||||||
5,
|
5,
|
||||||
|
@ -1474,17 +1474,12 @@ static const int_fast16_t VendorPriv_dispatch_tree[155] = {
|
||||||
|
|
||||||
/* [149] -> opcode range [65536, 65568], node depth 12 */
|
/* [149] -> opcode range [65536, 65568], node depth 12 */
|
||||||
1,
|
1,
|
||||||
152,
|
|
||||||
EMPTY_LEAF,
|
|
||||||
|
|
||||||
/* [152] -> opcode range [65536, 65552], node depth 13 */
|
|
||||||
1,
|
|
||||||
LEAF(88),
|
LEAF(88),
|
||||||
EMPTY_LEAF,
|
EMPTY_LEAF,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const void *VendorPriv_function_table[96][2] = {
|
static const void *VendorPriv_function_table[104][2] = {
|
||||||
/* [ 0] = 0 */ {NULL, NULL},
|
/* [ 0] = 0 */ {NULL, NULL},
|
||||||
/* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT},
|
/* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT},
|
||||||
/* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT},
|
/* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT},
|
||||||
|
@ -1581,6 +1576,14 @@ static const void *VendorPriv_function_table[96][2] = {
|
||||||
/* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX},
|
/* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX},
|
||||||
/* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX},
|
/* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX},
|
||||||
/* [ 95] = 65543 */ {NULL, NULL},
|
/* [ 95] = 65543 */ {NULL, NULL},
|
||||||
|
/* [ 96] = 65544 */ {NULL, NULL},
|
||||||
|
/* [ 97] = 65545 */ {NULL, NULL},
|
||||||
|
/* [ 98] = 65546 */ {__glXDisp_GetDrawableAttributesSGIX, __glXDispSwap_GetDrawableAttributesSGIX},
|
||||||
|
/* [ 99] = 65547 */ {NULL, NULL},
|
||||||
|
/* [ 100] = 65548 */ {NULL, NULL},
|
||||||
|
/* [ 101] = 65549 */ {NULL, NULL},
|
||||||
|
/* [ 102] = 65550 */ {NULL, NULL},
|
||||||
|
/* [ 103] = 65551 */ {NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct __glXDispatchInfo VendorPriv_dispatch_info = {
|
const struct __glXDispatchInfo VendorPriv_dispatch_info = {
|
||||||
|
|
|
@ -35,7 +35,6 @@ MODULE_SRCS = \
|
||||||
xcmisc.c
|
xcmisc.c
|
||||||
|
|
||||||
# Extra configuration files ship with some extensions
|
# Extra configuration files ship with some extensions
|
||||||
SERVERCONFIGdir = $(libdir)/xserver
|
|
||||||
SERVERCONFIG_DATA =
|
SERVERCONFIG_DATA =
|
||||||
|
|
||||||
# Optional sources included if extension enabled by configure.ac rules
|
# Optional sources included if extension enabled by configure.ac rules
|
||||||
|
|
119
Xext/sync.c
119
Xext/sync.c
|
@ -243,6 +243,11 @@ SyncInitServerTime(
|
||||||
void
|
void
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static void
|
||||||
|
SyncInitIdleTime(
|
||||||
|
void
|
||||||
|
);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SyncResetProc(
|
SyncResetProc(
|
||||||
ExtensionEntry * /* extEntry */
|
ExtensionEntry * /* extEntry */
|
||||||
|
@ -2400,6 +2405,7 @@ SyncExtensionInit(INITARGS)
|
||||||
* because there is always a servertime counter.
|
* because there is always a servertime counter.
|
||||||
*/
|
*/
|
||||||
SyncInitServerTime();
|
SyncInitServerTime();
|
||||||
|
SyncInitIdleTime();
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "Sync Extension %d.%d\n",
|
fprintf(stderr, "Sync Extension %d.%d\n",
|
||||||
|
@ -2520,3 +2526,116 @@ SyncInitServerTime(void)
|
||||||
ServertimeQueryValue, ServertimeBracketValues);
|
ServertimeQueryValue, ServertimeBracketValues);
|
||||||
pnext_time = NULL;
|
pnext_time = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IDLETIME implementation
|
||||||
|
*/
|
||||||
|
|
||||||
|
static pointer IdleTimeCounter;
|
||||||
|
static XSyncValue *pIdleTimeValueLess;
|
||||||
|
static XSyncValue *pIdleTimeValueGreater;
|
||||||
|
|
||||||
|
static void
|
||||||
|
IdleTimeQueryValue (pointer pCounter, CARD64 *pValue_return)
|
||||||
|
{
|
||||||
|
CARD32 idle = GetTimeInMillis() - lastDeviceEventTime.milliseconds;
|
||||||
|
XSyncIntsToValue (pValue_return, idle, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
IdleTimeBlockHandler (pointer env,
|
||||||
|
struct timeval **wt,
|
||||||
|
pointer LastSelectMask)
|
||||||
|
{
|
||||||
|
XSyncValue idle;
|
||||||
|
|
||||||
|
if (!pIdleTimeValueLess && !pIdleTimeValueGreater)
|
||||||
|
return;
|
||||||
|
|
||||||
|
IdleTimeQueryValue (NULL, &idle);
|
||||||
|
|
||||||
|
if (pIdleTimeValueLess &&
|
||||||
|
XSyncValueLessOrEqual (idle, *pIdleTimeValueLess))
|
||||||
|
{
|
||||||
|
AdjustWaitForDelay (wt, 0);
|
||||||
|
}
|
||||||
|
else if (pIdleTimeValueGreater)
|
||||||
|
{
|
||||||
|
unsigned long timeout = 0;
|
||||||
|
|
||||||
|
if (XSyncValueLessThan (idle, *pIdleTimeValueGreater))
|
||||||
|
{
|
||||||
|
XSyncValue value;
|
||||||
|
Bool overflow;
|
||||||
|
|
||||||
|
XSyncValueSubtract (&value, *pIdleTimeValueGreater,
|
||||||
|
idle, &overflow);
|
||||||
|
timeout = XSyncValueLow32 (value);
|
||||||
|
}
|
||||||
|
|
||||||
|
AdjustWaitForDelay (wt, timeout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
IdleTimeWakeupHandler (pointer env,
|
||||||
|
int rc,
|
||||||
|
pointer LastSelectMask)
|
||||||
|
{
|
||||||
|
XSyncValue idle;
|
||||||
|
|
||||||
|
if (!pIdleTimeValueLess && !pIdleTimeValueGreater)
|
||||||
|
return;
|
||||||
|
|
||||||
|
IdleTimeQueryValue (NULL, &idle);
|
||||||
|
|
||||||
|
if ((pIdleTimeValueGreater &&
|
||||||
|
XSyncValueGreaterThan (idle, *pIdleTimeValueGreater)) ||
|
||||||
|
(pIdleTimeValueLess && XSyncValueLessThan (idle, *pIdleTimeValueLess)))
|
||||||
|
{
|
||||||
|
SyncChangeCounter (IdleTimeCounter, idle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
IdleTimeBracketValues (pointer pCounter,
|
||||||
|
CARD64 *pbracket_less,
|
||||||
|
CARD64 *pbracket_greater)
|
||||||
|
{
|
||||||
|
Bool registered = (pIdleTimeValueLess || pIdleTimeValueGreater);
|
||||||
|
|
||||||
|
if (registered && !pbracket_less && !pbracket_greater)
|
||||||
|
{
|
||||||
|
RemoveBlockAndWakeupHandlers(IdleTimeBlockHandler,
|
||||||
|
IdleTimeWakeupHandler,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
else if (!registered && (pbracket_less || pbracket_greater))
|
||||||
|
{
|
||||||
|
RegisterBlockAndWakeupHandlers(IdleTimeBlockHandler,
|
||||||
|
IdleTimeWakeupHandler,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
pIdleTimeValueGreater = pbracket_greater;
|
||||||
|
pIdleTimeValueLess = pbracket_less;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
SyncInitIdleTime (void)
|
||||||
|
{
|
||||||
|
CARD64 resolution;
|
||||||
|
XSyncValue idle;
|
||||||
|
|
||||||
|
IdleTimeQueryValue (NULL, &idle);
|
||||||
|
XSyncIntToValue (&resolution, 4);
|
||||||
|
|
||||||
|
IdleTimeCounter = SyncCreateSystemCounter ("IDLETIME", idle, resolution,
|
||||||
|
XSyncCounterUnrestricted,
|
||||||
|
IdleTimeQueryValue,
|
||||||
|
IdleTimeBracketValues);
|
||||||
|
|
||||||
|
pIdleTimeValueLess = pIdleTimeValueGreater = NULL;
|
||||||
|
}
|
||||||
|
|
|
@ -696,11 +696,13 @@ CompositeExtensionInit (void)
|
||||||
if (GetPictureScreenIfSet(pScreen) == NULL)
|
if (GetPictureScreenIfSet(pScreen) == NULL)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifdef PANORAMIX
|
||||||
/* Xinerama's rewriting of window drawing before Composite gets to it
|
/* Xinerama's rewriting of window drawing before Composite gets to it
|
||||||
* breaks Composite.
|
* breaks Composite.
|
||||||
*/
|
*/
|
||||||
if (!noPanoramiXExtension)
|
if (!noPanoramiXExtension)
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow);
|
CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow);
|
||||||
if (!CompositeClientWindowType)
|
if (!CompositeClientWindowType)
|
||||||
|
|
62
configure.ac
62
configure.ac
|
@ -123,19 +123,19 @@ b = __swap16(a);
|
||||||
], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no'])
|
], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no'])
|
||||||
AC_MSG_RESULT([$SYS_ENDIAN__SWAP])
|
AC_MSG_RESULT([$SYS_ENDIAN__SWAP])
|
||||||
|
|
||||||
AC_MSG_CHECKING([for bswap_16 variant of <sys/endian.h> byteswapping macros])
|
AC_MSG_CHECKING([for bswap16 variant of <sys/endian.h> byteswapping macros])
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
], [
|
], [
|
||||||
int a = 1, b;
|
int a = 1, b;
|
||||||
b = bswap_16(a);
|
b = bswap16(a);
|
||||||
])
|
])
|
||||||
], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no'])
|
], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no'])
|
||||||
AC_MSG_RESULT([$SYS_ENDIAN_BSWAP])
|
AC_MSG_RESULT([$SYS_ENDIAN_BSWAP])
|
||||||
|
|
||||||
if test "$SYS_ENDIAN_BSWAP" = "yes" ; then
|
if test "$SYS_ENDIAN_BSWAP" = "yes" ; then
|
||||||
USE_SYS_ENDIAN_H=yes
|
USE_SYS_ENDIAN_H=yes
|
||||||
BSWAP=bswap_
|
BSWAP=bswap
|
||||||
else
|
else
|
||||||
if test "$SYS_ENDIAN__SWAP" = "yes" ; then
|
if test "$SYS_ENDIAN__SWAP" = "yes" ; then
|
||||||
USE_SYS_ENDIAN_H=yes
|
USE_SYS_ENDIAN_H=yes
|
||||||
|
@ -165,23 +165,24 @@ AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
dnl Old HAS_* names used in os/*.c.
|
dnl Old HAS_* names used in os/*.c.
|
||||||
AC_CHECK_FUNC([getdtablesize],
|
AC_CHECK_FUNC([getdtablesize],
|
||||||
AC_DEFINE(HAS_GETDTABLESIZE, 1, [Have the `getdtablesize' function.]))
|
AC_DEFINE(HAS_GETDTABLESIZE, 1, [Have the 'getdtablesize' function.]))
|
||||||
AC_CHECK_FUNC([getifaddrs],
|
AC_CHECK_FUNC([getifaddrs],
|
||||||
AC_DEFINE(HAS_GETIFADDRS, 1, [Have the `getifaddrs' function.]))
|
AC_DEFINE(HAS_GETIFADDRS, 1, [Have the 'getifaddrs' function.]))
|
||||||
AC_CHECK_FUNC([getpeereid],
|
AC_CHECK_FUNC([getpeereid],
|
||||||
AC_DEFINE(HAS_GETPEEREID, 1, [Have the `getpeereid' function.]))
|
AC_DEFINE(HAS_GETPEEREID, 1, [Have the 'getpeereid' function.]))
|
||||||
AC_CHECK_FUNC([getpeerucred],
|
AC_CHECK_FUNC([getpeerucred],
|
||||||
AC_DEFINE(HAS_GETPEERUCRED, 1, [Have the `getpeerucred' function.]))
|
AC_DEFINE(HAS_GETPEERUCRED, 1, [Have the 'getpeerucred' function.]))
|
||||||
AC_CHECK_FUNC([strlcat], HAVE_STRLCAT=yes, HAVE_STRLCAT=no)
|
AC_CHECK_FUNC([strlcat], HAVE_STRLCAT=yes, HAVE_STRLCAT=no)
|
||||||
AM_CONDITIONAL(NEED_STRLCAT, [test x$HAVE_STRLCAT = xno])
|
AM_CONDITIONAL(NEED_STRLCAT, [test x$HAVE_STRLCAT = xno])
|
||||||
|
|
||||||
AM_CONDITIONAL(NEED_VSNPRINTF, [test x$HAVE_VSNPRINTF = xno])
|
AM_CONDITIONAL(NEED_VSNPRINTF, [test x$HAVE_VSNPRINTF = xno])
|
||||||
|
|
||||||
dnl Check for mmap support for Xvfb
|
dnl Check for mmap support for Xvfb
|
||||||
AC_CHECK_FUNC([mmap], AC_DEFINE(HAS_MMAP, 1, [Have the `mmap' function.]))
|
AC_CHECK_FUNC([mmap], AC_DEFINE(HAS_MMAP, 1, [Have the 'mmap' function.]))
|
||||||
|
|
||||||
dnl Find the math libary
|
dnl Find the math libary
|
||||||
AC_CHECK_LIB(m, sqrt)
|
AC_CHECK_LIB(m, sqrt)
|
||||||
|
AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT, 1, [Have the 'cbrt' function]))
|
||||||
|
|
||||||
AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
|
AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
|
||||||
|
|
||||||
|
@ -361,24 +362,6 @@ case $host_os in
|
||||||
esac
|
esac
|
||||||
AM_CONDITIONAL(KDRIVE_HW, test "x$KDRIVE_HW" = xyes)
|
AM_CONDITIONAL(KDRIVE_HW, test "x$KDRIVE_HW" = xyes)
|
||||||
|
|
||||||
AC_MSG_CHECKING(for MMX capable platform)
|
|
||||||
if test "x$use_x86_asm" = xyes && test "x$GCC" = xyes ; then
|
|
||||||
AC_PREPROC_IFELSE([
|
|
||||||
#if (!defined (__GNUC__) || __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
|
|
||||||
#error Not supported
|
|
||||||
#endif
|
|
||||||
], mmx_capable=yes, mmx_capable=no)
|
|
||||||
else
|
|
||||||
mmx_capable=no
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT([$mmx_capable])
|
|
||||||
AM_CONDITIONAL(MMX_CAPABLE, [test "x$mmx_capable" = xyes])
|
|
||||||
|
|
||||||
|
|
||||||
OSNAME=`uname -srm`
|
|
||||||
AC_DEFINE_UNQUOTED(OSNAME, "$OSNAME",
|
|
||||||
[Define to OS Name string to display for build OS in Xorg log])
|
|
||||||
|
|
||||||
DEFAULT_VENDOR_NAME="The X.Org Foundation"
|
DEFAULT_VENDOR_NAME="The X.Org Foundation"
|
||||||
DEFAULT_VENDOR_NAME_SHORT="X.Org"
|
DEFAULT_VENDOR_NAME_SHORT="X.Org"
|
||||||
DEFAULT_VERSION_MAJOR=7
|
DEFAULT_VERSION_MAJOR=7
|
||||||
|
@ -444,9 +427,9 @@ AC_ARG_WITH(builder-addr, AS_HELP_STRING([--with-builder-addr=ADDRESS],
|
||||||
[Builder address (default: xorg@lists.freedesktop.org)]),
|
[Builder address (default: xorg@lists.freedesktop.org)]),
|
||||||
[ BUILDERADDR="$withval" ],
|
[ BUILDERADDR="$withval" ],
|
||||||
[ BUILDERADDR="xorg@lists.freedesktop.org" ])
|
[ BUILDERADDR="xorg@lists.freedesktop.org" ])
|
||||||
AC_ARG_WITH(os-name, AS_HELP_STRING([--with-os-name=OSNAME], [Name of OS (default: UNKNOWN)]),
|
AC_ARG_WITH(os-name, AS_HELP_STRING([--with-os-name=OSNAME], [Name of OS (default: output of "uname -srm")]),
|
||||||
[ OSNAME="$withval" ],
|
[ OSNAME="$withval" ],
|
||||||
[ OSNAME="UNKNOWN" ])
|
[ OSNAME=`uname -srm` ])
|
||||||
AC_ARG_WITH(os-vendor, AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name of OS vendor]),
|
AC_ARG_WITH(os-vendor, AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name of OS vendor]),
|
||||||
[ OSVENDOR="$withval" ],
|
[ OSVENDOR="$withval" ],
|
||||||
[ OSVENDOR="" ])
|
[ OSVENDOR="" ])
|
||||||
|
@ -469,6 +452,9 @@ AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to
|
||||||
AC_ARG_WITH(rgb-path, AS_HELP_STRING([--with-rgb-path=PATH], [Path to RGB database (default: ${datadir}/X11/rgb)]),
|
AC_ARG_WITH(rgb-path, AS_HELP_STRING([--with-rgb-path=PATH], [Path to RGB database (default: ${datadir}/X11/rgb)]),
|
||||||
[ RGBPATH="$withval" ],
|
[ RGBPATH="$withval" ],
|
||||||
[ RGBPATH="${datadir}/X11/rgb" ])
|
[ RGBPATH="${datadir}/X11/rgb" ])
|
||||||
|
AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], [Path to server config (default: ${libdir}/xserver)]),
|
||||||
|
[ SERVERCONFIG="$withval" ],
|
||||||
|
[ SERVERCONFIG="${libdir}/xserver" ])
|
||||||
APPLE_APPLICATIONS_DIR="${bindir}/Applications"
|
APPLE_APPLICATIONS_DIR="${bindir}/Applications"
|
||||||
AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir=PATH], [Path to the Applications directory (default: ${bindir}/Applications)]),
|
AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir=PATH], [Path to the Applications directory (default: ${bindir}/Applications)]),
|
||||||
[ APPLE_APPLICATIONS_DIR="${withval}" ].
|
[ APPLE_APPLICATIONS_DIR="${withval}" ].
|
||||||
|
@ -627,9 +613,11 @@ XEXT_INC='-I$(top_srcdir)/Xext'
|
||||||
XEXT_LIB='$(top_builddir)/Xext/libXext.la'
|
XEXT_LIB='$(top_builddir)/Xext/libXext.la'
|
||||||
XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
|
XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
|
||||||
|
|
||||||
|
PIXMAN="[pixman >= 0.9.2]"
|
||||||
|
|
||||||
dnl Core modules for most extensions, et al.
|
dnl Core modules for most extensions, et al.
|
||||||
REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto xproto xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.4.2] [kbproto >= 1.0.3]"
|
REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto [xproto >= 7.0.9] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.4.2] [kbproto >= 1.0.3]"
|
||||||
REQUIRED_LIBS="xfont xau fontenc"
|
REQUIRED_LIBS="xfont xau fontenc $PIXMAN"
|
||||||
|
|
||||||
if test "x$DBUS" = xauto; then
|
if test "x$DBUS" = xauto; then
|
||||||
PKG_CHECK_MODULES(DBUS, dbus-1, [DBUS=yes], [DBUS=no])
|
PKG_CHECK_MODULES(DBUS, dbus-1, [DBUS=yes], [DBUS=no])
|
||||||
|
@ -877,7 +865,7 @@ XKB_LIB='$(top_builddir)/xkb/libxkb.la'
|
||||||
XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
|
XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la'
|
||||||
|
|
||||||
AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
|
AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
|
||||||
[Do not have `strcasecmp'.]))
|
[Do not have 'strcasecmp'.]))
|
||||||
|
|
||||||
if test "x$NULL_ROOT_CURSOR" = xyes; then
|
if test "x$NULL_ROOT_CURSOR" = xyes; then
|
||||||
AC_DEFINE(NULL_ROOT_CURSOR, 1, [Use an empty root cursor])
|
AC_DEFINE(NULL_ROOT_CURSOR, 1, [Use an empty root cursor])
|
||||||
|
@ -940,6 +928,7 @@ VENDOR_MAN_VERSION="Version ${VENDOR_VERSION_STRING}"
|
||||||
|
|
||||||
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
|
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
|
||||||
AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path])
|
AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path])
|
||||||
|
AC_DEFINE_DIR(SERVERCONFIGdir, SERVERCONFIG, [Server config path])
|
||||||
AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path])
|
AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path])
|
||||||
AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path])
|
AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path])
|
||||||
AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_STRING"], [Vendor name])
|
AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_STRING"], [Vendor name])
|
||||||
|
@ -948,6 +937,11 @@ AC_DEFINE_UNQUOTED(XORG_RELEASE, ["$VENDOR_RELEASE_STRING"], [Vendor release])
|
||||||
AC_DEFINE_UNQUOTED(XORG_DATE, ["$RELEASE_DATE"], [Vendor release])
|
AC_DEFINE_UNQUOTED(XORG_DATE, ["$RELEASE_DATE"], [Vendor release])
|
||||||
AC_DEFINE_UNQUOTED(XORG_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version])
|
AC_DEFINE_UNQUOTED(XORG_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version])
|
||||||
AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address])
|
AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address])
|
||||||
|
|
||||||
|
if test -z "$OSNAME"; then
|
||||||
|
OSNAME="UNKNOWN"
|
||||||
|
fi
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name])
|
AC_DEFINE_UNQUOTED(OSNAME, ["$OSNAME"], [Operating System Name])
|
||||||
AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor])
|
AC_DEFINE_UNQUOTED(OSVENDOR, ["$OSVENDOR"], [Operating System Vendor])
|
||||||
AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string])
|
AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string])
|
||||||
|
@ -1102,7 +1096,7 @@ dnl ---------------------------------------------------------------------------
|
||||||
dnl DMX DDX
|
dnl DMX DDX
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to build Xdmx DDX])
|
AC_MSG_CHECKING([whether to build Xdmx DDX])
|
||||||
PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no])
|
PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES $PIXMAN], [have_dmx=yes], [have_dmx=no])
|
||||||
if test "x$DMX" = xauto; then
|
if test "x$DMX" = xauto; then
|
||||||
DMX="$have_dmx"
|
DMX="$have_dmx"
|
||||||
fi
|
fi
|
||||||
|
@ -1593,7 +1587,7 @@ AC_MSG_CHECKING([whether to build Xprint DDX])
|
||||||
AC_MSG_RESULT([$XPRINT])
|
AC_MSG_RESULT([$XPRINT])
|
||||||
|
|
||||||
if test "x$XPRINT" = xyes; then
|
if test "x$XPRINT" = xyes; then
|
||||||
PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau])
|
PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau $PIXMAN])
|
||||||
XPRINT_EXTENSIONS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS"
|
XPRINT_EXTENSIONS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS"
|
||||||
XPRINT_LIBS="$DIX_LIB $CONFIG_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS $XPRINT_LIBS"
|
XPRINT_LIBS="$DIX_LIB $CONFIG_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS $XPRINT_LIBS"
|
||||||
AC_SUBST([XPRINT_CFLAGS])
|
AC_SUBST([XPRINT_CFLAGS])
|
||||||
|
@ -1941,6 +1935,8 @@ AM_CONDITIONAL(SUN_KBD_MODE, [test x$KBD_MODE_TYPE = xsun])
|
||||||
|
|
||||||
BUILD_DATE="$(date +'%Y%m%d')"
|
BUILD_DATE="$(date +'%Y%m%d')"
|
||||||
AC_SUBST([BUILD_DATE])
|
AC_SUBST([BUILD_DATE])
|
||||||
|
BUILD_TIME="$(date +'1%H%M%S')"
|
||||||
|
AC_SUBST([BUILD_TIME])
|
||||||
|
|
||||||
DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
|
DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
|
||||||
|
|
||||||
|
|
|
@ -1042,6 +1042,7 @@ InitAbsoluteClassDeviceStruct(DeviceIntPtr dev)
|
||||||
abs->width = -1;
|
abs->width = -1;
|
||||||
abs->height = -1;
|
abs->height = -1;
|
||||||
abs->following = 0;
|
abs->following = 0;
|
||||||
|
abs->screen = 0;
|
||||||
|
|
||||||
dev->absolute = abs;
|
dev->absolute = abs;
|
||||||
|
|
||||||
|
|
|
@ -996,10 +996,6 @@ ProcGetAtomName(ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef K5AUTH
|
|
||||||
extern int k5_bad();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcSetSelectionOwner(ClientPtr client)
|
ProcSetSelectionOwner(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
@ -3541,12 +3537,6 @@ InitProcVectors(void)
|
||||||
ProcVector[i] = SwappedProcVector[i] = ProcBadRequest;
|
ProcVector[i] = SwappedProcVector[i] = ProcBadRequest;
|
||||||
ReplySwapVector[i] = ReplyNotSwappd;
|
ReplySwapVector[i] = ReplyNotSwappd;
|
||||||
}
|
}
|
||||||
#ifdef K5AUTH
|
|
||||||
if (!k5_Vector[i])
|
|
||||||
{
|
|
||||||
k5_Vector[i] = k5_bad;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
for(i = LASTEvent; i < 128; i++)
|
for(i = LASTEvent; i < 128; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -265,7 +265,7 @@ _X_EXPORT int
|
||||||
dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
|
dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
|
||||||
{
|
{
|
||||||
pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY,
|
pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY,
|
||||||
DixReadAccess);
|
access);
|
||||||
int clientIndex = CLIENT_ID(rid);
|
int clientIndex = CLIENT_ID(rid);
|
||||||
client->errorValue = rid;
|
client->errorValue = rid;
|
||||||
|
|
||||||
|
|
|
@ -745,6 +745,13 @@ XineramaChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define SyntheticMotion(x, y) \
|
||||||
|
PostSyntheticMotion(x, y, \
|
||||||
|
0, \
|
||||||
|
syncEvents.playingEvents ? \
|
||||||
|
syncEvents.time.milliseconds : \
|
||||||
|
currentTime.milliseconds);
|
||||||
|
|
||||||
#endif /* PANORAMIX */
|
#endif /* PANORAMIX */
|
||||||
|
|
||||||
|
|
|
@ -253,6 +253,7 @@ main(int argc, char *argv[], char *envp[])
|
||||||
display = "0";
|
display = "0";
|
||||||
|
|
||||||
InitGlobals();
|
InitGlobals();
|
||||||
|
InitRegions();
|
||||||
#ifdef XPRINT
|
#ifdef XPRINT
|
||||||
PrinterInitGlobals();
|
PrinterInitGlobals();
|
||||||
#endif
|
#endif
|
||||||
|
|
15
dix/tables.c
15
dix/tables.c
|
@ -61,11 +61,6 @@ SOFTWARE.
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include "swapreq.h"
|
#include "swapreq.h"
|
||||||
|
|
||||||
#ifdef K5AUTH
|
|
||||||
extern int
|
|
||||||
k5_stage1(), k5_stage2(), k5_stage3(), k5_bad();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int (* InitialVector[3]) (
|
int (* InitialVector[3]) (
|
||||||
ClientPtr /* client */
|
ClientPtr /* client */
|
||||||
) =
|
) =
|
||||||
|
@ -515,13 +510,3 @@ _X_EXPORT ReplySwapPtr ReplySwapVector[256] =
|
||||||
ReplyNotSwappd, /* NoOperation */
|
ReplyNotSwappd, /* NoOperation */
|
||||||
ReplyNotSwappd
|
ReplyNotSwappd
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef K5AUTH
|
|
||||||
int (*k5_Vector[256])() =
|
|
||||||
{
|
|
||||||
k5_bad,
|
|
||||||
k5_stage1,
|
|
||||||
k5_bad,
|
|
||||||
k5_stage3
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
25
exa/exa.c
25
exa/exa.c
|
@ -126,7 +126,7 @@ exaGetDrawablePixmap(DrawablePtr pDrawable)
|
||||||
* the backing drawable. These coordinates are nonzero only for redirected
|
* the backing drawable. These coordinates are nonzero only for redirected
|
||||||
* windows.
|
* windows.
|
||||||
*/
|
*/
|
||||||
static void
|
void
|
||||||
exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
|
exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
|
||||||
int *xp, int *yp)
|
int *xp, int *yp)
|
||||||
{
|
{
|
||||||
|
@ -172,29 +172,6 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
|
||||||
REGION_UNINIT(pScreen, ®ion);
|
REGION_UNINIT(pScreen, ®ion);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* exaDrawableDirty() marks a pixmap backing a drawable as dirty, allowing for
|
|
||||||
* optimizations in pixmap migration when no changes have occurred.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
exaDrawableDirty (DrawablePtr pDrawable, int x1, int y1, int x2, int y2)
|
|
||||||
{
|
|
||||||
PixmapPtr pPix = exaGetDrawablePixmap(pDrawable);
|
|
||||||
int xoff, yoff;
|
|
||||||
|
|
||||||
x1 = max(x1, pDrawable->x);
|
|
||||||
y1 = max(y1, pDrawable->y);
|
|
||||||
x2 = min(x2, pDrawable->x + pDrawable->width);
|
|
||||||
y2 = min(y2, pDrawable->y + pDrawable->height);
|
|
||||||
|
|
||||||
if (x1 >= x2 || y1 >= y2)
|
|
||||||
return;
|
|
||||||
|
|
||||||
exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff);
|
|
||||||
|
|
||||||
exaPixmapDirty(pPix, x1 + xoff, y1 + yoff, x2 + xoff, y2 + yoff);
|
|
||||||
}
|
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
exaDestroyPixmap (PixmapPtr pPixmap)
|
exaDestroyPixmap (PixmapPtr pPixmap)
|
||||||
{
|
{
|
||||||
|
|
|
@ -229,7 +229,7 @@ typedef struct _ExaDriver {
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* PrepareCopy() sets up the driver for doing a copy within offscreen
|
* PrepareCopy() sets up the driver for doing a copy within video
|
||||||
* memory.
|
* memory.
|
||||||
*
|
*
|
||||||
* @param pSrcPixmap source pixmap
|
* @param pSrcPixmap source pixmap
|
||||||
|
@ -721,6 +721,9 @@ exaOffscreenAlloc(ScreenPtr pScreen, int size, int align,
|
||||||
ExaOffscreenArea *
|
ExaOffscreenArea *
|
||||||
exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea *area);
|
exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea *area);
|
||||||
|
|
||||||
|
void
|
||||||
|
ExaOffscreenMarkUsed (PixmapPtr pPixmap);
|
||||||
|
|
||||||
unsigned long
|
unsigned long
|
||||||
exaGetPixmapOffset(PixmapPtr pPix);
|
exaGetPixmapOffset(PixmapPtr pPix);
|
||||||
|
|
||||||
|
|
469
exa/exa_accel.c
469
exa/exa_accel.c
|
@ -74,6 +74,7 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
pGC->planemask,
|
pGC->planemask,
|
||||||
pGC->fgPixel))
|
pGC->fgPixel))
|
||||||
{
|
{
|
||||||
|
exaDoMigration (pixmaps, 1, FALSE);
|
||||||
ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted);
|
ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -109,8 +110,6 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
(*pExaScr->info->Solid) (pPixmap,
|
(*pExaScr->info->Solid) (pPixmap,
|
||||||
fullX1 + off_x, fullY1 + off_y,
|
fullX1 + off_x, fullY1 + off_y,
|
||||||
fullX2 + off_x, fullY1 + 1 + off_y);
|
fullX2 + off_x, fullY1 + 1 + off_y);
|
||||||
exaPixmapDirty (pPixmap, fullX1 + off_x, fullY1 + off_y,
|
|
||||||
fullX2 + off_x, fullY1 + 1 + off_y);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -129,8 +128,6 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
(*pExaScr->info->Solid) (pPixmap,
|
(*pExaScr->info->Solid) (pPixmap,
|
||||||
partX1 + off_x, fullY1 + off_y,
|
partX1 + off_x, fullY1 + off_y,
|
||||||
partX2 + off_x, fullY1 + 1 + off_y);
|
partX2 + off_x, fullY1 + 1 + off_y);
|
||||||
exaPixmapDirty (pPixmap, partX1 + off_x, fullY1 + off_y,
|
|
||||||
partX2 + off_x, fullY1 + 1 + off_y);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pbox++;
|
pbox++;
|
||||||
|
@ -154,8 +151,9 @@ exaPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
int src_stride, bpp = pDrawable->bitsPerPixel;
|
int src_stride, bpp = pDrawable->bitsPerPixel;
|
||||||
|
|
||||||
if (pExaScr->swappedOut || pExaScr->info->UploadToScreen == NULL)
|
pixmaps[0].as_dst = TRUE;
|
||||||
goto migrate_and_fallback;
|
pixmaps[0].as_src = FALSE;
|
||||||
|
pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
|
||||||
|
|
||||||
/* Don't bother with under 8bpp, XYPixmaps. */
|
/* Don't bother with under 8bpp, XYPixmaps. */
|
||||||
if (format != ZPixmap || bpp < 8)
|
if (format != ZPixmap || bpp < 8)
|
||||||
|
@ -165,10 +163,14 @@ exaPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||||
if (!EXA_PM_IS_SOLID(pDrawable, pGC->planemask) || pGC->alu != GXcopy)
|
if (!EXA_PM_IS_SOLID(pDrawable, pGC->planemask) || pGC->alu != GXcopy)
|
||||||
goto migrate_and_fallback;
|
goto migrate_and_fallback;
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
if (pExaScr->swappedOut)
|
||||||
pixmaps[0].as_src = FALSE;
|
goto fallback;
|
||||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
|
|
||||||
exaDoMigration (pixmaps, 1, TRUE);
|
exaDoMigration (pixmaps, 1, TRUE);
|
||||||
|
|
||||||
|
if (pExaScr->info->UploadToScreen == NULL)
|
||||||
|
goto fallback;
|
||||||
|
|
||||||
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
||||||
|
|
||||||
if (pPix == NULL)
|
if (pPix == NULL)
|
||||||
|
@ -221,25 +223,23 @@ exaPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||||
|
|
||||||
fbBltStip((FbStip *)bits + (y1 - y) * (src_stride / sizeof(FbStip)),
|
fbBltStip((FbStip *)bits + (y1 - y) * (src_stride / sizeof(FbStip)),
|
||||||
src_stride / sizeof(FbStip),
|
src_stride / sizeof(FbStip),
|
||||||
(x1 - x) * bpp,
|
(x1 - x) * dstBpp,
|
||||||
dst + (y1 + yoff) * dst_stride,
|
dst + (y1 + dstYoff) * dst_stride,
|
||||||
dst_stride,
|
dst_stride,
|
||||||
(x1 + xoff) * bpp,
|
(x1 + dstXoff) * dstBpp,
|
||||||
(x2 - x1) * bpp,
|
(x2 - x1) * dstBpp,
|
||||||
y2 - y1,
|
y2 - y1,
|
||||||
GXcopy, FB_ALLONES, bpp);
|
GXcopy, FB_ALLONES, dstBpp);
|
||||||
|
|
||||||
exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
|
exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
exaPixmapDirty(pPix, x1 + xoff, y1 + yoff, x2 + xoff, y2 + yoff);
|
exaPixmapDirty(pPix, x1 + xoff, y1 + yoff, x2 + xoff, y2 + yoff);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
migrate_and_fallback:
|
migrate_and_fallback:
|
||||||
pixmaps[0].as_dst = TRUE;
|
|
||||||
pixmaps[0].as_src = FALSE;
|
|
||||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
|
|
||||||
exaDoMigration (pixmaps, 1, FALSE);
|
exaDoMigration (pixmaps, 1, FALSE);
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
|
@ -387,6 +387,7 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
int src_off_x, src_off_y;
|
int src_off_x, src_off_y;
|
||||||
int dst_off_x, dst_off_y;
|
int dst_off_x, dst_off_y;
|
||||||
ExaMigrationRec pixmaps[2];
|
ExaMigrationRec pixmaps[2];
|
||||||
|
Bool fallback = FALSE;
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = FALSE;
|
pixmaps[0].as_src = FALSE;
|
||||||
|
@ -404,62 +405,64 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
pDstPixmap->drawable.width > pExaScr->info->maxX ||
|
pDstPixmap->drawable.width > pExaScr->info->maxX ||
|
||||||
pDstPixmap->drawable.height > pExaScr->info->maxY)
|
pDstPixmap->drawable.height > pExaScr->info->maxY)
|
||||||
{
|
{
|
||||||
exaDoMigration (pixmaps, 2, FALSE);
|
fallback = TRUE;
|
||||||
goto fallback;
|
|
||||||
} else {
|
} else {
|
||||||
exaDoMigration (pixmaps, 2, TRUE);
|
exaDoMigration (pixmaps, 2, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mixed directions must be handled specially if the card is lame */
|
/* Mixed directions must be handled specially if the card is lame */
|
||||||
if (pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS &&
|
if (!fallback && (pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) &&
|
||||||
reverse != upsidedown) {
|
reverse != upsidedown) {
|
||||||
if (!exaCopyNtoNTwoDir(pSrcDrawable, pDstDrawable, pGC, pbox, nbox,
|
if (exaCopyNtoNTwoDir(pSrcDrawable, pDstDrawable, pGC, pbox, nbox,
|
||||||
dx, dy))
|
dx, dy))
|
||||||
goto fallback;
|
return;
|
||||||
return;
|
fallback = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pSrcPixmap = exaGetOffscreenPixmap (pSrcDrawable, &src_off_x, &src_off_y)) &&
|
pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable);
|
||||||
(pDstPixmap = exaGetOffscreenPixmap (pDstDrawable, &dst_off_x, &dst_off_y)) &&
|
pDstPixmap = exaGetDrawablePixmap (pDstDrawable);
|
||||||
(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap,
|
|
||||||
reverse ? -1 : 1, upsidedown ? -1 : 1,
|
exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y);
|
||||||
pGC ? pGC->alu : GXcopy,
|
exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y);
|
||||||
pGC ? pGC->planemask : FB_ALLONES))
|
|
||||||
|
if (fallback || !exaPixmapIsOffscreen(pSrcPixmap) ||
|
||||||
|
!exaPixmapIsOffscreen(pDstPixmap) ||
|
||||||
|
!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1,
|
||||||
|
upsidedown ? -1 : 1,
|
||||||
|
pGC ? pGC->alu : GXcopy,
|
||||||
|
pGC ? pGC->planemask : FB_ALLONES)) {
|
||||||
|
fallback = TRUE;
|
||||||
|
EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable,
|
||||||
|
exaDrawableLocation(pSrcDrawable),
|
||||||
|
exaDrawableLocation(pDstDrawable)));
|
||||||
|
exaDoMigration (pixmaps, 2, FALSE);
|
||||||
|
exaPrepareAccess (pDstDrawable, EXA_PREPARE_DEST);
|
||||||
|
exaPrepareAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
||||||
|
fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC,
|
||||||
|
pbox, nbox, dx, dy, reverse, upsidedown,
|
||||||
|
bitplane, closure);
|
||||||
|
exaFinishAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
||||||
|
exaFinishAccess (pDstDrawable, EXA_PREPARE_DEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
while (nbox--)
|
||||||
{
|
{
|
||||||
while (nbox--)
|
if (!fallback)
|
||||||
{
|
|
||||||
(*pExaScr->info->Copy) (pDstPixmap,
|
(*pExaScr->info->Copy) (pDstPixmap,
|
||||||
pbox->x1 + dx + src_off_x,
|
pbox->x1 + dx + src_off_x,
|
||||||
pbox->y1 + dy + src_off_y,
|
pbox->y1 + dy + src_off_y,
|
||||||
pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
||||||
pbox->x2 - pbox->x1,
|
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1);
|
||||||
pbox->y2 - pbox->y1);
|
exaPixmapDirty (pDstPixmap, pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
||||||
exaPixmapDirty (pDstPixmap,
|
pbox->x2 + dst_off_x, pbox->y2 + dst_off_y);
|
||||||
pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
|
||||||
pbox->x2 + dst_off_x, pbox->y2 + dst_off_y);
|
|
||||||
pbox++;
|
|
||||||
}
|
|
||||||
(*pExaScr->info->DoneCopy) (pDstPixmap);
|
|
||||||
exaMarkSync(pDstDrawable->pScreen);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
fallback:
|
|
||||||
EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable,
|
|
||||||
exaDrawableLocation(pSrcDrawable),
|
|
||||||
exaDrawableLocation(pDstDrawable)));
|
|
||||||
exaPrepareAccess (pDstDrawable, EXA_PREPARE_DEST);
|
|
||||||
exaPrepareAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
|
||||||
fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC,
|
|
||||||
pbox, nbox, dx, dy, reverse, upsidedown,
|
|
||||||
bitplane, closure);
|
|
||||||
exaFinishAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
|
||||||
exaFinishAccess (pDstDrawable, EXA_PREPARE_DEST);
|
|
||||||
while (nbox--)
|
|
||||||
{
|
|
||||||
exaDrawableDirty (pDstDrawable, pbox->x1, pbox->y1, pbox->x2, pbox->y2);
|
|
||||||
pbox++;
|
pbox++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fallback)
|
||||||
|
return;
|
||||||
|
|
||||||
|
(*pExaScr->info->DoneCopy) (pDstPixmap);
|
||||||
|
exaMarkSync (pDstDrawable->pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionPtr
|
RegionPtr
|
||||||
|
@ -618,6 +621,9 @@ exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg,
|
||||||
DEALLOCATE_LOCAL(prect);
|
DEALLOCATE_LOCAL(prect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Bool exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion,
|
||||||
|
Pixel pixel, CARD32 planemask, CARD32 alu);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
exaPolyFillRect(DrawablePtr pDrawable,
|
exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
GCPtr pGC,
|
GCPtr pGC,
|
||||||
|
@ -626,7 +632,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
RegionPtr pClip = fbGetCompositeClip(pGC);
|
RegionPtr pClip = fbGetCompositeClip(pGC);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
|
||||||
register BoxPtr pbox;
|
register BoxPtr pbox;
|
||||||
BoxPtr pextent;
|
BoxPtr pextent;
|
||||||
int extentX1, extentX2, extentY1, extentY2;
|
int extentX1, extentX2, extentY1, extentY2;
|
||||||
|
@ -635,39 +641,80 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
int xorg, yorg;
|
int xorg, yorg;
|
||||||
int n;
|
int n;
|
||||||
ExaMigrationRec pixmaps[1];
|
ExaMigrationRec pixmaps[2];
|
||||||
|
RegionPtr pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED);
|
||||||
|
RegionPtr pDamageReg = DamageRegion(ExaGetPixmapPriv(pPixmap)->pDamage);
|
||||||
|
|
||||||
|
/* Compute intersection of rects and clip region */
|
||||||
|
REGION_TRANSLATE(pScreen, pReg, pDrawable->x, pDrawable->y);
|
||||||
|
REGION_INTERSECT(pScreen, pReg, pClip, pReg);
|
||||||
|
|
||||||
|
if (!REGION_NUM_RECTS(pReg)) {
|
||||||
|
REGION_DESTROY(pScreen, pReg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = FALSE;
|
pixmaps[0].as_src = FALSE;
|
||||||
pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
|
pixmaps[0].pPix = pPixmap;
|
||||||
|
|
||||||
|
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||||
|
|
||||||
if (pExaScr->swappedOut ||
|
if (pExaScr->swappedOut ||
|
||||||
pGC->fillStyle != FillSolid ||
|
|
||||||
pPixmap->drawable.width > pExaScr->info->maxX ||
|
pPixmap->drawable.width > pExaScr->info->maxX ||
|
||||||
pPixmap->drawable.height > pExaScr->info->maxY)
|
pPixmap->drawable.height > pExaScr->info->maxY)
|
||||||
{
|
{
|
||||||
exaDoMigration (pixmaps, 1, FALSE);
|
goto fallback;
|
||||||
ExaCheckPolyFillRect (pDrawable, pGC, nrect, prect);
|
|
||||||
while (nrect-- >= 0) {
|
|
||||||
exaDrawableDirty(pDrawable,
|
|
||||||
pDrawable->x + prect->x,
|
|
||||||
pDrawable->y + prect->y,
|
|
||||||
pDrawable->x + prect->x + prect->width,
|
|
||||||
pDrawable->y + prect->y + prect->height);
|
|
||||||
prect++;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
exaDoMigration (pixmaps, 1, TRUE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
/* For ROPs where overlaps don't matter, convert rectangles to region and
|
||||||
|
* call exaFillRegion{Solid,Tiled}.
|
||||||
|
*/
|
||||||
|
if ((pGC->fillStyle == FillSolid || pGC->fillStyle == FillTiled) &&
|
||||||
|
(pGC->alu == GXcopy || pGC->alu == GXclear || pGC->alu == GXnoop ||
|
||||||
|
pGC->alu == GXcopyInverted || pGC->alu == GXset)) {
|
||||||
|
if (((pGC->fillStyle == FillSolid || pGC->tileIsPixel) &&
|
||||||
|
exaFillRegionSolid(pDrawable, pReg, pGC->fillStyle == FillSolid ?
|
||||||
|
pGC->fgPixel : pGC->tile.pixel, pGC->planemask,
|
||||||
|
pGC->alu)) ||
|
||||||
|
(pGC->fillStyle == FillTiled && !pGC->tileIsPixel &&
|
||||||
|
exaFillRegionTiled(pDrawable, pReg, pGC->tile.pixmap, &pGC->patOrg,
|
||||||
|
pGC->planemask, pGC->alu))) {
|
||||||
|
goto damage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pGC->fillStyle != FillSolid &&
|
||||||
|
!(pGC->tileIsPixel && pGC->fillStyle == FillTiled))
|
||||||
|
{
|
||||||
|
goto fallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
exaDoMigration (pixmaps, 1, TRUE);
|
||||||
|
|
||||||
|
if (!exaPixmapIsOffscreen (pPixmap) ||
|
||||||
!(*pExaScr->info->PrepareSolid) (pPixmap,
|
!(*pExaScr->info->PrepareSolid) (pPixmap,
|
||||||
pGC->alu,
|
pGC->alu,
|
||||||
pGC->planemask,
|
pGC->planemask,
|
||||||
pGC->fgPixel))
|
pGC->fgPixel))
|
||||||
{
|
{
|
||||||
|
fallback:
|
||||||
|
if (pGC->fillStyle == FillTiled && !pGC->tileIsPixel) {
|
||||||
|
pixmaps[1].as_dst = FALSE;
|
||||||
|
pixmaps[1].as_src = TRUE;
|
||||||
|
pixmaps[1].pPix = pGC->tile.pixmap;
|
||||||
|
exaDoMigration (pixmaps, 2, FALSE);
|
||||||
|
} else {
|
||||||
|
exaDoMigration (pixmaps, 1, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
ExaCheckPolyFillRect (pDrawable, pGC, nrect, prect);
|
ExaCheckPolyFillRect (pDrawable, pGC, nrect, prect);
|
||||||
|
|
||||||
|
damage:
|
||||||
|
REGION_TRANSLATE(pScreen, pReg, xoff, yoff);
|
||||||
|
REGION_UNION(pScreen, pDamageReg, pReg, pDamageReg);
|
||||||
|
REGION_DESTROY(pScreen, pReg);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -715,7 +762,8 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
pbox = REGION_RECTS(pClip);
|
pbox = REGION_RECTS(pClip);
|
||||||
/*
|
/*
|
||||||
* clip the rectangle to each box in the clip region
|
* clip the rectangle to each box in the clip region
|
||||||
* this is logically equivalent to calling Intersect()
|
* this is logically equivalent to calling Intersect(),
|
||||||
|
* but rectangles may overlap each other here.
|
||||||
*/
|
*/
|
||||||
while(n--)
|
while(n--)
|
||||||
{
|
{
|
||||||
|
@ -775,20 +823,19 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
pPixmap->drawable.width > pExaScr->info->maxX ||
|
pPixmap->drawable.width > pExaScr->info->maxX ||
|
||||||
pPixmap->drawable.height > pExaScr->info->maxY)
|
pPixmap->drawable.height > pExaScr->info->maxY)
|
||||||
{
|
{
|
||||||
exaDoMigration (pixmaps, 1, FALSE);
|
fallback = TRUE;
|
||||||
goto fallback;
|
|
||||||
} else {
|
} else {
|
||||||
exaDoMigration (pixmaps, 1, TRUE);
|
exaDoMigration (pixmaps, 1, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
exaGetDrawableDeltas (pDrawable, pPixmap, &xoff, &yoff);
|
||||||
|
|
||||||
if (!pPixmap ||
|
if (fallback || !exaPixmapIsOffscreen(pPixmap) ||
|
||||||
!(*pExaScr->info->PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
!(*pExaScr->info->PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
||||||
{
|
{
|
||||||
fallback:
|
|
||||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable,
|
EXA_FALLBACK(("to %p (%c)\n", pDrawable,
|
||||||
exaDrawableLocation(pDrawable)));
|
exaDrawableLocation(pDrawable)));
|
||||||
|
exaDoMigration (pixmaps, 1, FALSE);
|
||||||
fallback = TRUE;
|
fallback = TRUE;
|
||||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
fg = fbReplicatePixel (fg, pDrawable->bitsPerPixel);
|
fg = fbReplicatePixel (fg, pDrawable->bitsPerPixel);
|
||||||
|
@ -827,10 +874,10 @@ fallback:
|
||||||
(*pExaScr->info->Solid) (pPixmap,
|
(*pExaScr->info->Solid) (pPixmap,
|
||||||
partX1 + xoff, partY1 + yoff,
|
partX1 + xoff, partY1 + yoff,
|
||||||
partX2 + xoff, partY2 + yoff);
|
partX2 + xoff, partY2 + yoff);
|
||||||
exaPixmapDirty (pPixmap, partX1 + xoff, partY1 + yoff,
|
}
|
||||||
partX2 + xoff, partY2 + yoff);
|
|
||||||
} else
|
exaPixmapDirty (pPixmap, partX1 + xoff, partY1 + yoff, partX2 + xoff,
|
||||||
exaDrawableDirty (pDrawable, partX1, partY1, partX2, partY2);
|
partY2 + yoff);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fallback)
|
if (fallback)
|
||||||
|
@ -870,12 +917,36 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
||||||
int dstBpp;
|
int dstBpp;
|
||||||
int dstXoff, dstYoff;
|
int dstXoff, dstYoff;
|
||||||
FbBits depthMask;
|
FbBits depthMask;
|
||||||
|
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
|
||||||
|
ExaMigrationRec pixmaps[1];
|
||||||
|
int xBack, widthBack, yBack, heightBack;
|
||||||
|
|
||||||
|
for (ppci = ppciInit, n = nglyph, widthBack = 0; n; n--)
|
||||||
|
widthBack += (*ppci++)->metrics.characterWidth;
|
||||||
|
|
||||||
|
xBack = x;
|
||||||
|
if (widthBack < 0)
|
||||||
|
{
|
||||||
|
xBack += widthBack;
|
||||||
|
widthBack = -widthBack;
|
||||||
|
}
|
||||||
|
yBack = y - FONTASCENT(pGC->font);
|
||||||
|
heightBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font);
|
||||||
|
|
||||||
|
if (xBack >= pDrawable->width || yBack >= pDrawable->height ||
|
||||||
|
(xBack + widthBack) <= 0 || (yBack + heightBack) <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pixmaps[0].as_dst = TRUE;
|
||||||
|
pixmaps[0].as_src = TRUE;
|
||||||
|
pixmaps[0].pPix = pPixmap;
|
||||||
|
|
||||||
depthMask = FbFullMask(pDrawable->depth);
|
depthMask = FbFullMask(pDrawable->depth);
|
||||||
if ((pGC->planemask & depthMask) != depthMask)
|
if ((pGC->planemask & depthMask) != depthMask)
|
||||||
{
|
{
|
||||||
|
exaDoMigration(pixmaps, 1, FALSE);
|
||||||
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
|
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
|
||||||
return;
|
goto damage;
|
||||||
}
|
}
|
||||||
glyph = NULL;
|
glyph = NULL;
|
||||||
switch (pDrawable->bitsPerPixel) {
|
switch (pDrawable->bitsPerPixel) {
|
||||||
|
@ -887,6 +958,8 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
||||||
|
|
||||||
x += pDrawable->x;
|
x += pDrawable->x;
|
||||||
y += pDrawable->y;
|
y += pDrawable->y;
|
||||||
|
xBack += pDrawable->x;
|
||||||
|
yBack += pDrawable->y;
|
||||||
|
|
||||||
if (TERMINALFONT (pGC->font) && !glyph)
|
if (TERMINALFONT (pGC->font) && !glyph)
|
||||||
{
|
{
|
||||||
|
@ -894,23 +967,6 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int xBack, widthBack;
|
|
||||||
int yBack, heightBack;
|
|
||||||
|
|
||||||
ppci = ppciInit;
|
|
||||||
n = nglyph;
|
|
||||||
widthBack = 0;
|
|
||||||
while (n--)
|
|
||||||
widthBack += (*ppci++)->metrics.characterWidth;
|
|
||||||
|
|
||||||
xBack = x;
|
|
||||||
if (widthBack < 0)
|
|
||||||
{
|
|
||||||
xBack += widthBack;
|
|
||||||
widthBack = -widthBack;
|
|
||||||
}
|
|
||||||
yBack = y - FONTASCENT(pGC->font);
|
|
||||||
heightBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font);
|
|
||||||
exaSolidBoxClipped (pDrawable,
|
exaSolidBoxClipped (pDrawable,
|
||||||
fbGetCompositeClip(pGC),
|
fbGetCompositeClip(pGC),
|
||||||
pGC->planemask,
|
pGC->planemask,
|
||||||
|
@ -923,74 +979,50 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
||||||
}
|
}
|
||||||
|
|
||||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
||||||
|
exaDoMigration(pixmaps, 1, FALSE);
|
||||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
exaPrepareAccessGC (pGC);
|
exaPrepareAccessGC (pGC);
|
||||||
|
|
||||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||||
|
|
||||||
ppci = ppciInit;
|
for (ppci = ppciInit; nglyph; nglyph--, x += pci->metrics.characterWidth)
|
||||||
while (nglyph--)
|
|
||||||
{
|
{
|
||||||
pci = *ppci++;
|
pci = *ppci++;
|
||||||
pglyph = FONTGLYPHBITS(pglyphBase, pci);
|
|
||||||
gWidth = GLYPHWIDTHPIXELS(pci);
|
gWidth = GLYPHWIDTHPIXELS(pci);
|
||||||
gHeight = GLYPHHEIGHTPIXELS(pci);
|
gHeight = GLYPHHEIGHTPIXELS(pci);
|
||||||
if (gWidth && gHeight)
|
gx = x + pci->metrics.leftSideBearing;
|
||||||
|
gy = y - pci->metrics.ascent;
|
||||||
|
|
||||||
|
if (!gWidth || !gHeight || (gx + gWidth) <= xBack ||
|
||||||
|
(gy + gHeight) <= yBack || gx >= (xBack + widthBack) ||
|
||||||
|
gy >= (yBack + heightBack))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
pglyph = FONTGLYPHBITS(pglyphBase, pci);
|
||||||
|
|
||||||
|
if (glyph && gWidth <= sizeof (FbStip) * 8 &&
|
||||||
|
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
|
||||||
{
|
{
|
||||||
gx = x + pci->metrics.leftSideBearing;
|
(*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp,
|
||||||
gy = y - pci->metrics.ascent;
|
(FbStip *) pglyph, pPriv->fg, gx + dstXoff, gHeight);
|
||||||
if (glyph && gWidth <= sizeof (FbStip) * 8 &&
|
}
|
||||||
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
|
else
|
||||||
{
|
{
|
||||||
(*glyph) (dst + (gy + dstYoff) * dstStride,
|
RegionPtr pClip = fbGetCompositeClip(pGC);
|
||||||
dstStride,
|
|
||||||
dstBpp,
|
gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip);
|
||||||
(FbStip *) pglyph,
|
fbPutXYImage (pDrawable, pClip, pPriv->fg, pPriv->bg, pPriv->pm,
|
||||||
pPriv->fg,
|
GXcopy, opaque, gx, gy, gWidth, gHeight,
|
||||||
gx + dstXoff,
|
(FbStip *) pglyph, gStride, 0);
|
||||||
gHeight);
|
|
||||||
exaDrawableDirty (pDrawable, gx, gy, gx + gWidth, gy + gHeight);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
RegionPtr pClip = fbGetCompositeClip(pGC);
|
|
||||||
int nbox;
|
|
||||||
BoxPtr pbox;
|
|
||||||
|
|
||||||
gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof (FbStip);
|
|
||||||
fbPutXYImage (pDrawable,
|
|
||||||
pClip,
|
|
||||||
pPriv->fg,
|
|
||||||
pPriv->bg,
|
|
||||||
pPriv->pm,
|
|
||||||
GXcopy,
|
|
||||||
opaque,
|
|
||||||
|
|
||||||
gx,
|
|
||||||
gy,
|
|
||||||
gWidth, gHeight,
|
|
||||||
|
|
||||||
(FbStip *) pglyph,
|
|
||||||
gStride,
|
|
||||||
0);
|
|
||||||
|
|
||||||
for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip);
|
|
||||||
nbox--; pbox++) {
|
|
||||||
int x1 = max(gx, pbox->x1), x2 = min(gx + gWidth, pbox->x2);
|
|
||||||
int y1 = max(gy, pbox->y1), y2 = min(gy + gHeight, pbox->y2);
|
|
||||||
|
|
||||||
if (x1 >= x2 || y1 >= y2)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
exaDrawableDirty (pDrawable, gx, gy, gx + gWidth,
|
|
||||||
gy + gHeight);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
x += pci->metrics.characterWidth;
|
|
||||||
}
|
}
|
||||||
exaFinishAccessGC (pGC);
|
exaFinishAccessGC (pGC);
|
||||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
|
|
||||||
|
damage:
|
||||||
|
exaGetDrawableDeltas(pDrawable, pPixmap, &dstXoff, &dstYoff);
|
||||||
|
exaPixmapDirty(pPixmap, xBack + dstXoff, yBack + dstYoff,
|
||||||
|
xBack + dstXoff + widthBack, yBack + dstYoff + heightBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
const GCOps exaOps = {
|
const GCOps exaOps = {
|
||||||
|
@ -1043,10 +1075,12 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
|
REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static Bool
|
||||||
exaFillRegionSolid (DrawablePtr pDrawable,
|
exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
RegionPtr pRegion,
|
RegionPtr pRegion,
|
||||||
Pixel pixel)
|
Pixel pixel,
|
||||||
|
CARD32 planemask,
|
||||||
|
CARD32 alu)
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pDrawable->pScreen);
|
ExaScreenPriv(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
|
@ -1062,22 +1096,19 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
if (pPixmap->drawable.width > pExaScr->info->maxX ||
|
if (pPixmap->drawable.width > pExaScr->info->maxX ||
|
||||||
pPixmap->drawable.height > pExaScr->info->maxY)
|
pPixmap->drawable.height > pExaScr->info->maxY)
|
||||||
{
|
{
|
||||||
exaDoMigration (pixmaps, 1, FALSE);
|
|
||||||
goto fallback;
|
goto fallback;
|
||||||
} else {
|
} else {
|
||||||
exaDoMigration (pixmaps, 1, TRUE);
|
exaDoMigration (pixmaps, 1, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) &&
|
if ((pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) &&
|
||||||
(*pExaScr->info->PrepareSolid) (pPixmap, GXcopy, FB_ALLONES, pixel))
|
(*pExaScr->info->PrepareSolid) (pPixmap, alu, planemask, pixel))
|
||||||
{
|
{
|
||||||
while (nbox--)
|
while (nbox--)
|
||||||
{
|
{
|
||||||
(*pExaScr->info->Solid) (pPixmap,
|
(*pExaScr->info->Solid) (pPixmap,
|
||||||
pBox->x1 + xoff, pBox->y1 + yoff,
|
pBox->x1 + xoff, pBox->y1 + yoff,
|
||||||
pBox->x2 + xoff, pBox->y2 + yoff);
|
pBox->x2 + xoff, pBox->y2 + yoff);
|
||||||
exaPixmapDirty (pPixmap, pBox->x1 + xoff, pBox->y1 + yoff,
|
|
||||||
pBox->x2 + xoff, pBox->y2 + yoff);
|
|
||||||
pBox++;
|
pBox++;
|
||||||
}
|
}
|
||||||
(*pExaScr->info->DoneSolid) (pPixmap);
|
(*pExaScr->info->DoneSolid) (pPixmap);
|
||||||
|
@ -1086,27 +1117,30 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fallback:
|
fallback:
|
||||||
|
if (alu != GXcopy || planemask != FB_ALLONES)
|
||||||
|
return FALSE;
|
||||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable,
|
EXA_FALLBACK(("to %p (%c)\n", pDrawable,
|
||||||
exaDrawableLocation(pDrawable)));
|
exaDrawableLocation(pDrawable)));
|
||||||
|
exaDoMigration (pixmaps, 1, FALSE);
|
||||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
fbFillRegionSolid (pDrawable, pRegion, 0,
|
fbFillRegionSolid (pDrawable, pRegion, 0,
|
||||||
fbReplicatePixel (pixel, pDrawable->bitsPerPixel));
|
fbReplicatePixel (pixel, pDrawable->bitsPerPixel));
|
||||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
while (nbox--)
|
|
||||||
{
|
|
||||||
exaDrawableDirty (pDrawable, pBox->x1, pBox->y1, pBox->x2, pBox->y2);
|
|
||||||
pBox++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to do an accelerated tile of the pTile into pRegion of pDrawable.
|
/* Try to do an accelerated tile of the pTile into pRegion of pDrawable.
|
||||||
* Based on fbFillRegionTiled(), fbTile().
|
* Based on fbFillRegionTiled(), fbTile().
|
||||||
*/
|
*/
|
||||||
static void
|
Bool
|
||||||
exaFillRegionTiled (DrawablePtr pDrawable,
|
exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
RegionPtr pRegion,
|
RegionPtr pRegion,
|
||||||
PixmapPtr pTile)
|
PixmapPtr pTile,
|
||||||
|
DDXPointPtr pPatOrg,
|
||||||
|
CARD32 planemask,
|
||||||
|
CARD32 alu)
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pDrawable->pScreen);
|
ExaScreenPriv(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
|
@ -1122,10 +1156,10 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
/* If we're filling with a solid color, grab it out and go to
|
/* If we're filling with a solid color, grab it out and go to
|
||||||
* FillRegionSolid, saving numerous copies.
|
* FillRegionSolid, saving numerous copies.
|
||||||
*/
|
*/
|
||||||
if (tileWidth == 1 && tileHeight == 1) {
|
if (tileWidth == 1 && tileHeight == 1)
|
||||||
exaFillRegionSolid(pDrawable, pRegion, exaGetPixmapFirstPixel (pTile));
|
return exaFillRegionSolid(pDrawable, pRegion,
|
||||||
return;
|
exaGetPixmapFirstPixel (pTile), planemask,
|
||||||
}
|
alu);
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = FALSE;
|
pixmaps[0].as_src = FALSE;
|
||||||
|
@ -1139,7 +1173,6 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
tileWidth > pExaScr->info->maxX ||
|
tileWidth > pExaScr->info->maxX ||
|
||||||
tileHeight > pExaScr->info->maxY)
|
tileHeight > pExaScr->info->maxY)
|
||||||
{
|
{
|
||||||
exaDoMigration (pixmaps, 2, FALSE);
|
|
||||||
goto fallback;
|
goto fallback;
|
||||||
} else {
|
} else {
|
||||||
exaDoMigration (pixmaps, 2, TRUE);
|
exaDoMigration (pixmaps, 2, TRUE);
|
||||||
|
@ -1153,8 +1186,9 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
if (!exaPixmapIsOffscreen(pTile))
|
if (!exaPixmapIsOffscreen(pTile))
|
||||||
goto fallback;
|
goto fallback;
|
||||||
|
|
||||||
if ((*pExaScr->info->PrepareCopy) (exaGetOffscreenPixmap((DrawablePtr)pTile, &tileXoff, &tileYoff), pPixmap, 0, 0, GXcopy,
|
if ((*pExaScr->info->PrepareCopy) (exaGetOffscreenPixmap((DrawablePtr)pTile,
|
||||||
FB_ALLONES))
|
&tileXoff, &tileYoff),
|
||||||
|
pPixmap, 0, 0, alu, planemask))
|
||||||
{
|
{
|
||||||
while (nbox--)
|
while (nbox--)
|
||||||
{
|
{
|
||||||
|
@ -1162,7 +1196,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
int dstY = pBox->y1;
|
int dstY = pBox->y1;
|
||||||
int tileY;
|
int tileY;
|
||||||
|
|
||||||
tileY = (dstY - pDrawable->y) % tileHeight;
|
tileY = (dstY - pDrawable->y - pPatOrg->y) % tileHeight;
|
||||||
while (height > 0) {
|
while (height > 0) {
|
||||||
int width = pBox->x2 - pBox->x1;
|
int width = pBox->x2 - pBox->x1;
|
||||||
int dstX = pBox->x1;
|
int dstX = pBox->x1;
|
||||||
|
@ -1173,7 +1207,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
h = height;
|
h = height;
|
||||||
height -= h;
|
height -= h;
|
||||||
|
|
||||||
tileX = (dstX - pDrawable->x) % tileWidth;
|
tileX = (dstX - pDrawable->x - pPatOrg->x) % tileWidth;
|
||||||
while (width > 0) {
|
while (width > 0) {
|
||||||
int w = tileWidth - tileX;
|
int w = tileWidth - tileX;
|
||||||
if (w > width)
|
if (w > width)
|
||||||
|
@ -1190,38 +1224,44 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
dstY += h;
|
dstY += h;
|
||||||
tileY = 0;
|
tileY = 0;
|
||||||
}
|
}
|
||||||
exaPixmapDirty (pPixmap, pBox->x1 + xoff, pBox->y1 + yoff,
|
|
||||||
pBox->x2 + xoff, pBox->y2 + yoff);
|
|
||||||
pBox++;
|
pBox++;
|
||||||
}
|
}
|
||||||
(*pExaScr->info->DoneCopy) (pPixmap);
|
(*pExaScr->info->DoneCopy) (pPixmap);
|
||||||
exaMarkSync(pDrawable->pScreen);
|
exaMarkSync(pDrawable->pScreen);
|
||||||
return;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
|
if (alu != GXcopy || planemask != FB_ALLONES)
|
||||||
|
return FALSE;
|
||||||
EXA_FALLBACK(("from %p to %p (%c,%c)\n", pTile, pDrawable,
|
EXA_FALLBACK(("from %p to %p (%c,%c)\n", pTile, pDrawable,
|
||||||
exaDrawableLocation(&pTile->drawable),
|
exaDrawableLocation(&pTile->drawable),
|
||||||
exaDrawableLocation(pDrawable)));
|
exaDrawableLocation(pDrawable)));
|
||||||
|
exaDoMigration (pixmaps, 2, FALSE);
|
||||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
exaPrepareAccess ((DrawablePtr)pTile, EXA_PREPARE_SRC);
|
exaPrepareAccess ((DrawablePtr)pTile, EXA_PREPARE_SRC);
|
||||||
fbFillRegionTiled (pDrawable, pRegion, pTile);
|
fbFillRegionTiled (pDrawable, pRegion, pTile);
|
||||||
exaFinishAccess ((DrawablePtr)pTile, EXA_PREPARE_SRC);
|
exaFinishAccess ((DrawablePtr)pTile, EXA_PREPARE_SRC);
|
||||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
while (nbox--)
|
|
||||||
{
|
return TRUE;
|
||||||
exaDrawableDirty (pDrawable, pBox->x1, pBox->y1, pBox->x2, pBox->y2);
|
|
||||||
pBox++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pWin->drawable.pScreen);
|
ExaScreenPriv (pWin->drawable.pScreen);
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
PixmapPtr pPixmap = exaGetDrawablePixmap((DrawablePtr)pWin);
|
||||||
|
int xoff, yoff;
|
||||||
|
BoxPtr pBox;
|
||||||
|
int nbox = REGION_NUM_RECTS(pRegion);
|
||||||
|
|
||||||
|
if (!nbox)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!pExaScr->swappedOut) {
|
if (!pExaScr->swappedOut) {
|
||||||
|
DDXPointRec zeros = { 0, 0 };
|
||||||
|
|
||||||
switch (what) {
|
switch (what) {
|
||||||
case PW_BACKGROUND:
|
case PW_BACKGROUND:
|
||||||
switch (pWin->backgroundState) {
|
switch (pWin->backgroundState) {
|
||||||
|
@ -1235,25 +1275,41 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
what);
|
what);
|
||||||
return;
|
return;
|
||||||
case BackgroundPixel:
|
case BackgroundPixel:
|
||||||
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->background.pixel);
|
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->background.pixel,
|
||||||
return;
|
FB_ALLONES, GXcopy);
|
||||||
|
goto damage;
|
||||||
case BackgroundPixmap:
|
case BackgroundPixmap:
|
||||||
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->background.pixmap);
|
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->background.pixmap,
|
||||||
return;
|
&zeros, FB_ALLONES, GXcopy);
|
||||||
|
goto damage;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PW_BORDER:
|
case PW_BORDER:
|
||||||
if (pWin->borderIsPixel) {
|
if (pWin->borderIsPixel) {
|
||||||
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->border.pixel);
|
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->border.pixel,
|
||||||
return;
|
FB_ALLONES, GXcopy);
|
||||||
|
goto damage;
|
||||||
} else {
|
} else {
|
||||||
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->border.pixmap);
|
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->border.pixmap,
|
||||||
return;
|
&zeros, FB_ALLONES, GXcopy);
|
||||||
|
goto damage;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ExaCheckPaintWindow (pWin, pRegion, what);
|
ExaCheckPaintWindow (pWin, pRegion, what);
|
||||||
|
|
||||||
|
damage:
|
||||||
|
exaGetDrawableDeltas((DrawablePtr)pWin, pPixmap, &xoff, &yoff);
|
||||||
|
|
||||||
|
pBox = REGION_RECTS(pRegion);
|
||||||
|
|
||||||
|
while (nbox--)
|
||||||
|
{
|
||||||
|
exaPixmapDirty (pPixmap, pBox->x1 + xoff, pBox->y1 + yoff,
|
||||||
|
pBox->x2 + xoff, pBox->y2 + yoff);
|
||||||
|
pBox++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1273,27 +1329,22 @@ exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
Bool ok;
|
Bool ok;
|
||||||
|
|
||||||
if (pExaScr->swappedOut || pExaScr->info->DownloadFromScreen == NULL)
|
if (pExaScr->info->DownloadFromScreen == NULL)
|
||||||
goto fallback;
|
goto migrate_and_fallback;
|
||||||
|
|
||||||
/* Only cover the ZPixmap, solid copy case. */
|
/* Only cover the ZPixmap, solid copy case. */
|
||||||
if (format != ZPixmap || !EXA_PM_IS_SOLID(pDrawable, planeMask))
|
if (format != ZPixmap || !EXA_PM_IS_SOLID(pDrawable, planeMask))
|
||||||
goto fallback;
|
goto migrate_and_fallback;
|
||||||
|
|
||||||
/* Only try to handle the 8bpp and up cases, since we don't want to think
|
/* Only try to handle the 8bpp and up cases, since we don't want to think
|
||||||
* about <8bpp.
|
* about <8bpp.
|
||||||
*/
|
*/
|
||||||
if (pDrawable->bitsPerPixel < 8)
|
if (pDrawable->bitsPerPixel < 8)
|
||||||
|
goto migrate_and_fallback;
|
||||||
|
|
||||||
|
if (pExaScr->swappedOut)
|
||||||
goto fallback;
|
goto fallback;
|
||||||
|
|
||||||
/* Migrate, but assume that we could accelerate the download. It is up to
|
|
||||||
* the migration scheme to ensure that this case doesn't result in bad
|
|
||||||
* moving of pixmaps.
|
|
||||||
*/
|
|
||||||
pixmaps[0].as_dst = FALSE;
|
|
||||||
pixmaps[0].as_src = TRUE;
|
|
||||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
|
|
||||||
exaDoMigration (pixmaps, 1, TRUE);
|
|
||||||
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
||||||
if (pPix == NULL)
|
if (pPix == NULL)
|
||||||
goto fallback;
|
goto fallback;
|
||||||
|
@ -1308,12 +1359,12 @@ exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fallback:
|
migrate_and_fallback:
|
||||||
pixmaps[0].as_dst = FALSE;
|
pixmaps[0].as_dst = FALSE;
|
||||||
pixmaps[0].as_src = TRUE;
|
pixmaps[0].as_src = TRUE;
|
||||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
|
pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable);
|
||||||
exaDoMigration (pixmaps, 1, FALSE);
|
exaDoMigration (pixmaps, 1, FALSE);
|
||||||
|
fallback:
|
||||||
ExaCheckGetImage (pDrawable, x, y, w, h, format, planeMask, d);
|
ExaCheckGetImage (pDrawable, x, y, w, h, format, planeMask, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -464,12 +464,10 @@ exaAssertNotDirty (PixmapPtr pPixmap)
|
||||||
BoxPtr pBox = REGION_RECTS(pValidReg);
|
BoxPtr pBox = REGION_RECTS(pValidReg);
|
||||||
Bool ret = TRUE;
|
Bool ret = TRUE;
|
||||||
|
|
||||||
if (pExaPixmap == NULL || pExaPixmap->fb_ptr == NULL)
|
if (!nbox || exaPixmapIsPinned(pPixmap) || pExaPixmap->fb_ptr == NULL)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
dst = pExaPixmap->sys_ptr;
|
|
||||||
dst_pitch = pExaPixmap->sys_pitch;
|
dst_pitch = pExaPixmap->sys_pitch;
|
||||||
src = pExaPixmap->fb_ptr;
|
|
||||||
src_pitch = pExaPixmap->fb_pitch;
|
src_pitch = pExaPixmap->fb_pitch;
|
||||||
cpp = pPixmap->drawable.bitsPerPixel / 8;
|
cpp = pPixmap->drawable.bitsPerPixel / 8;
|
||||||
|
|
||||||
|
@ -486,21 +484,18 @@ exaAssertNotDirty (PixmapPtr pPixmap)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
rowbytes = (pBox->x2 - pBox->x1) * cpp;
|
rowbytes = (pBox->x2 - pBox->x1) * cpp;
|
||||||
src += pBox->y1 * src_pitch + pBox->x1 * cpp;
|
src = pExaPixmap->fb_ptr + pBox->y1 * src_pitch + pBox->x1 * cpp;
|
||||||
dst += pBox->y1 * dst_pitch + pBox->x1 * cpp;
|
dst = pExaPixmap->sys_ptr + pBox->y1 * dst_pitch + pBox->x1 * cpp;
|
||||||
|
|
||||||
for (y = pBox->y2 - pBox->y1; y; y--) {
|
for (y = pBox->y1; y < pBox->y2;
|
||||||
if (memcmp(dst + pBox->y1 * dst_pitch + pBox->x1 * cpp,
|
y++, src += src_pitch, dst += dst_pitch) {
|
||||||
src + pBox->y1 * src_pitch + pBox->x1 * cpp,
|
if (memcmp(dst, src, rowbytes) != 0) {
|
||||||
(pBox->x2 - pBox->x1) * cpp) != 0) {
|
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
|
exaPixmapDirty(pPixmap, pBox->x1, pBox->y1, pBox->x2,
|
||||||
|
pBox->y2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
src += src_pitch;
|
|
||||||
dst += dst_pitch;
|
|
||||||
}
|
}
|
||||||
src -= pBox->y1 * src_pitch + pBox->x1 * cpp;
|
|
||||||
dst -= pBox->y1 * dst_pitch + pBox->x1 * cpp;
|
|
||||||
}
|
}
|
||||||
exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ ExaOffscreenValidate (ScreenPtr pScreen)
|
||||||
assert (area->offset >= area->base_offset &&
|
assert (area->offset >= area->base_offset &&
|
||||||
area->offset < (area->base_offset + area->size));
|
area->offset < (area->base_offset + area->size));
|
||||||
if (prev)
|
if (prev)
|
||||||
assert (prev->base_offset + prev->area.size == area->base_offset);
|
assert (prev->base_offset + prev->size == area->base_offset);
|
||||||
prev = area;
|
prev = area;
|
||||||
}
|
}
|
||||||
assert (prev->base_offset + prev->size == pExaScr->info->memorySize);
|
assert (prev->base_offset + prev->size == pExaScr->info->memorySize);
|
||||||
|
@ -341,13 +341,15 @@ exaEnableDisableFBAccess (int index, Bool enable)
|
||||||
ScreenPtr pScreen = screenInfo.screens[index];
|
ScreenPtr pScreen = screenInfo.screens[index];
|
||||||
ExaScreenPriv (pScreen);
|
ExaScreenPriv (pScreen);
|
||||||
|
|
||||||
if (!enable) {
|
if (!enable && pExaScr->disableFbCount++ == 0) {
|
||||||
if (pExaScr->info->exa_minor < 1)
|
if (pExaScr->info->exa_minor < 1)
|
||||||
ExaOffscreenSwapOut (pScreen);
|
ExaOffscreenSwapOut (pScreen);
|
||||||
else
|
else
|
||||||
ExaOffscreenEjectPixmaps (pScreen);
|
ExaOffscreenEjectPixmaps (pScreen);
|
||||||
pExaScr->swappedOut = TRUE;
|
pExaScr->swappedOut = TRUE;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if (enable && --pExaScr->disableFbCount == 0) {
|
||||||
if (pExaScr->info->exa_minor < 1)
|
if (pExaScr->info->exa_minor < 1)
|
||||||
ExaOffscreenSwapIn (pScreen);
|
ExaOffscreenSwapIn (pScreen);
|
||||||
pExaScr->swappedOut = FALSE;
|
pExaScr->swappedOut = FALSE;
|
||||||
|
|
|
@ -113,6 +113,7 @@ typedef struct {
|
||||||
enum ExaMigrationHeuristic migration;
|
enum ExaMigrationHeuristic migration;
|
||||||
Bool hideOffscreenPixmapData;
|
Bool hideOffscreenPixmapData;
|
||||||
Bool checkDirtyCorrectness;
|
Bool checkDirtyCorrectness;
|
||||||
|
unsigned disableFbCount;
|
||||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -287,6 +288,10 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap);
|
||||||
void
|
void
|
||||||
exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||||
|
|
||||||
|
Bool
|
||||||
|
exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
|
||||||
|
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu);
|
||||||
|
|
||||||
void
|
void
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
||||||
|
|
||||||
|
@ -317,9 +322,6 @@ ExaCheckComposite (CARD8 op,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* exa_offscreen.c */
|
/* exa_offscreen.c */
|
||||||
void
|
|
||||||
ExaOffscreenMarkUsed (PixmapPtr pPixmap);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ExaOffscreenSwapOut (ScreenPtr pScreen);
|
ExaOffscreenSwapOut (ScreenPtr pScreen);
|
||||||
|
|
||||||
|
@ -343,7 +345,8 @@ void
|
||||||
exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2);
|
exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2);
|
||||||
|
|
||||||
void
|
void
|
||||||
exaDrawableDirty(DrawablePtr pDrawable, int x1, int y1, int x2, int y2);
|
exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
|
||||||
|
int *xp, int *yp);
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
exaDrawableIsOffscreen (DrawablePtr pDrawable);
|
exaDrawableIsOffscreen (DrawablePtr pDrawable);
|
||||||
|
|
178
exa/exa_render.c
178
exa/exa_render.c
|
@ -297,15 +297,15 @@ exaTryDriverSolidFill(PicturePtr pSrc,
|
||||||
|
|
||||||
nbox = REGION_NUM_RECTS(®ion);
|
nbox = REGION_NUM_RECTS(®ion);
|
||||||
pbox = REGION_RECTS(®ion);
|
pbox = REGION_RECTS(®ion);
|
||||||
|
|
||||||
while (nbox--)
|
while (nbox--)
|
||||||
{
|
{
|
||||||
(*pExaScr->info->Solid) (pDstPix,
|
(*pExaScr->info->Solid) (pDstPix,
|
||||||
pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
||||||
pbox->x2 + dst_off_x, pbox->y2 + dst_off_y);
|
pbox->x2 + dst_off_x, pbox->y2 + dst_off_y);
|
||||||
exaPixmapDirty (pDstPix, pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
|
||||||
pbox->x2 + dst_off_x, pbox->y2 + dst_off_y);
|
|
||||||
pbox++;
|
pbox++;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*pExaScr->info->DoneSolid) (pDstPix);
|
(*pExaScr->info->DoneSolid) (pDstPix);
|
||||||
exaMarkSync(pDst->pDrawable->pScreen);
|
exaMarkSync(pDst->pDrawable->pScreen);
|
||||||
|
|
||||||
|
@ -446,8 +446,6 @@ exaTryDriverComposite(CARD8 op,
|
||||||
pbox->y1 + dst_off_y,
|
pbox->y1 + dst_off_y,
|
||||||
pbox->x2 - pbox->x1,
|
pbox->x2 - pbox->x1,
|
||||||
pbox->y2 - pbox->y1);
|
pbox->y2 - pbox->y1);
|
||||||
exaPixmapDirty (pDstPix, pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
|
||||||
pbox->x2 + dst_off_x, pbox->y2 + dst_off_y);
|
|
||||||
pbox++;
|
pbox++;
|
||||||
}
|
}
|
||||||
(*pExaScr->info->DoneComposite) (pDstPix);
|
(*pExaScr->info->DoneComposite) (pDstPix);
|
||||||
|
@ -521,6 +519,9 @@ exaTryMagicTwoPassCompositeHelper(CARD8 op,
|
||||||
CARD16 height)
|
CARD16 height)
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDst->pDrawable->pScreen);
|
ExaScreenPriv (pDst->pDrawable->pScreen);
|
||||||
|
DrawablePtr pDstDraw = pDst->pDrawable;
|
||||||
|
PixmapPtr pDstPixmap = exaGetDrawablePixmap(pDstDraw);
|
||||||
|
int xoff, yoff;
|
||||||
|
|
||||||
assert(op == PictOpOver);
|
assert(op == PictOpOver);
|
||||||
|
|
||||||
|
@ -539,6 +540,12 @@ exaTryMagicTwoPassCompositeHelper(CARD8 op,
|
||||||
exaComposite(PictOpOutReverse, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
|
exaComposite(PictOpOutReverse, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
|
||||||
xDst, yDst, width, height);
|
xDst, yDst, width, height);
|
||||||
|
|
||||||
|
exaGetDrawableDeltas(pDstDraw, pDstPixmap, &xoff, &yoff);
|
||||||
|
xoff += pDstDraw->x;
|
||||||
|
yoff += pDstDraw->y;
|
||||||
|
exaPixmapDirty(pDstPixmap, xDst + xoff, yDst + yoff, xDst + xoff + width,
|
||||||
|
yDst + yoff + height);
|
||||||
|
|
||||||
/* Then, add in the source value times the destination alpha factors (1.0).
|
/* Then, add in the source value times the destination alpha factors (1.0).
|
||||||
*/
|
*/
|
||||||
exaComposite(PictOpAdd, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
|
exaComposite(PictOpAdd, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
|
||||||
|
@ -565,6 +572,28 @@ exaComposite(CARD8 op,
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
Bool saveSrcRepeat = pSrc->repeat;
|
Bool saveSrcRepeat = pSrc->repeat;
|
||||||
Bool saveMaskRepeat = pMask ? pMask->repeat : 0;
|
Bool saveMaskRepeat = pMask ? pMask->repeat : 0;
|
||||||
|
ExaMigrationRec pixmaps[3];
|
||||||
|
int npixmaps = 1;
|
||||||
|
PixmapPtr pSrcPixmap = NULL;
|
||||||
|
|
||||||
|
pixmaps[0].as_dst = TRUE;
|
||||||
|
pixmaps[0].as_src = exaOpReadsDestination(op);
|
||||||
|
pixmaps[0].pPix = exaGetDrawablePixmap (pDst->pDrawable);
|
||||||
|
|
||||||
|
if (pSrc->pDrawable) {
|
||||||
|
pSrcPixmap = exaGetDrawablePixmap (pSrc->pDrawable);
|
||||||
|
pixmaps[npixmaps].as_dst = FALSE;
|
||||||
|
pixmaps[npixmaps].as_src = TRUE;
|
||||||
|
pixmaps[npixmaps].pPix = pSrcPixmap;
|
||||||
|
npixmaps++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pMask && pMask->pDrawable) {
|
||||||
|
pixmaps[npixmaps].as_dst = FALSE;
|
||||||
|
pixmaps[npixmaps].as_src = TRUE;
|
||||||
|
pixmaps[npixmaps].pPix = exaGetDrawablePixmap (pMask->pDrawable);
|
||||||
|
npixmaps++;
|
||||||
|
}
|
||||||
|
|
||||||
/* We currently don't support acceleration of gradients, or other pictures
|
/* We currently don't support acceleration of gradients, or other pictures
|
||||||
* with a NULL pDrawable.
|
* with a NULL pDrawable.
|
||||||
|
@ -583,19 +612,24 @@ exaComposite(CARD8 op,
|
||||||
|
|
||||||
if (!pMask)
|
if (!pMask)
|
||||||
{
|
{
|
||||||
if (op == PictOpSrc)
|
if ((op == PictOpSrc &&
|
||||||
|
((pSrc->format == pDst->format) ||
|
||||||
|
(pSrc->format==PICT_a8r8g8b8 && pDst->format==PICT_x8r8g8b8) ||
|
||||||
|
(pSrc->format==PICT_a8b8g8r8 && pDst->format==PICT_x8b8g8r8))) ||
|
||||||
|
(op == PictOpOver && !pSrc->alphaMap && !pDst->alphaMap &&
|
||||||
|
pSrc->format == pDst->format &&
|
||||||
|
(pSrc->format==PICT_x8r8g8b8 || pSrc->format==PICT_x8b8g8r8)))
|
||||||
{
|
{
|
||||||
if (pSrc->pDrawable->width == 1 &&
|
if (pSrc->pDrawable->width == 1 &&
|
||||||
pSrc->pDrawable->height == 1 && pSrc->repeat &&
|
pSrc->pDrawable->height == 1 &&
|
||||||
pSrc->repeatType == RepeatNormal)
|
pSrc->repeat)
|
||||||
{
|
{
|
||||||
ret = exaTryDriverSolidFill(pSrc, pDst, xSrc, ySrc, xDst, yDst,
|
ret = exaTryDriverSolidFill(pSrc, pDst, xSrc, ySrc, xDst, yDst,
|
||||||
width, height);
|
width, height);
|
||||||
if (ret == 1)
|
if (ret == 1)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
else if (!pSrc->repeat && !pSrc->transform &&
|
else if (pSrcPixmap && !pSrc->repeat && !pSrc->transform)
|
||||||
pSrc->format == pDst->format)
|
|
||||||
{
|
{
|
||||||
RegionRec region;
|
RegionRec region;
|
||||||
|
|
||||||
|
@ -617,6 +651,45 @@ exaComposite(CARD8 op,
|
||||||
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
else if (pSrcPixmap && !pSrc->transform &&
|
||||||
|
pSrc->repeatType == RepeatNormal)
|
||||||
|
{
|
||||||
|
RegionRec region;
|
||||||
|
DDXPointRec srcOrg;
|
||||||
|
|
||||||
|
/* Let's see if the driver can do the repeat in one go */
|
||||||
|
if (pExaScr->info->PrepareComposite && !pSrc->alphaMap &&
|
||||||
|
!pDst->alphaMap)
|
||||||
|
{
|
||||||
|
ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc,
|
||||||
|
ySrc, xMask, yMask, xDst, yDst,
|
||||||
|
width, height);
|
||||||
|
if (ret == 1)
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now see if we can use exaFillRegionTiled() */
|
||||||
|
xDst += pDst->pDrawable->x;
|
||||||
|
yDst += pDst->pDrawable->y;
|
||||||
|
xSrc += pSrc->pDrawable->x;
|
||||||
|
ySrc += pSrc->pDrawable->y;
|
||||||
|
|
||||||
|
if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, xSrc,
|
||||||
|
ySrc, xMask, yMask, xDst, yDst,
|
||||||
|
width, height))
|
||||||
|
goto done;
|
||||||
|
|
||||||
|
srcOrg.x = (xSrc - xDst) % pSrcPixmap->drawable.width;
|
||||||
|
srcOrg.y = (ySrc - yDst) % pSrcPixmap->drawable.height;
|
||||||
|
|
||||||
|
ret = exaFillRegionTiled(pDst->pDrawable, ®ion, pSrcPixmap,
|
||||||
|
&srcOrg, FB_ALLONES, GXcopy);
|
||||||
|
|
||||||
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -627,8 +700,8 @@ exaComposite(CARD8 op,
|
||||||
pMask->repeat = 0;
|
pMask->repeat = 0;
|
||||||
|
|
||||||
if (pExaScr->info->PrepareComposite &&
|
if (pExaScr->info->PrepareComposite &&
|
||||||
(!pSrc->repeat || pSrc->repeat == RepeatNormal) &&
|
(!pSrc->repeat || pSrc->repeatType == RepeatNormal) &&
|
||||||
(!pMask || !pMask->repeat || pMask->repeat == RepeatNormal) &&
|
(!pMask || !pMask->repeat || pMask->repeatType == RepeatNormal) &&
|
||||||
!pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap)
|
!pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap)
|
||||||
{
|
{
|
||||||
Bool isSrcSolid;
|
Bool isSrcSolid;
|
||||||
|
@ -660,39 +733,14 @@ exaComposite(CARD8 op,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret != 0) {
|
|
||||||
ExaMigrationRec pixmaps[3];
|
|
||||||
/* failure to accelerate was not due to pixmaps being in the wrong
|
|
||||||
* locations.
|
|
||||||
*/
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
|
||||||
pixmaps[0].as_src = exaOpReadsDestination(op);
|
|
||||||
pixmaps[0].pPix = exaGetDrawablePixmap (pDst->pDrawable);
|
|
||||||
pixmaps[1].as_dst = FALSE;
|
|
||||||
pixmaps[1].as_src = TRUE;
|
|
||||||
pixmaps[1].pPix = exaGetDrawablePixmap (pSrc->pDrawable);
|
|
||||||
if (pMask) {
|
|
||||||
pixmaps[2].as_dst = FALSE;
|
|
||||||
pixmaps[2].as_src = TRUE;
|
|
||||||
pixmaps[2].pPix = exaGetDrawablePixmap (pMask->pDrawable);
|
|
||||||
exaDoMigration(pixmaps, 3, FALSE);
|
|
||||||
} else {
|
|
||||||
exaDoMigration(pixmaps, 2, FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
#if DEBUG_TRACE_FALL
|
#if DEBUG_TRACE_FALL
|
||||||
exaPrintCompositeFallback (op, pSrc, pMask, pDst);
|
exaPrintCompositeFallback (op, pSrc, pMask, pDst);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
exaDoMigration(pixmaps, npixmaps, FALSE);
|
||||||
ExaCheckComposite (op, pSrc, pMask, pDst, xSrc, ySrc,
|
ExaCheckComposite (op, pSrc, pMask, pDst, xSrc, ySrc,
|
||||||
xMask, yMask, xDst, yDst, width, height);
|
xMask, yMask, xDst, yDst, width, height);
|
||||||
exaDrawableDirty(pDst->pDrawable,
|
|
||||||
pDst->pDrawable->x + xDst,
|
|
||||||
pDst->pDrawable->y + yDst,
|
|
||||||
pDst->pDrawable->x + xDst + width,
|
|
||||||
pDst->pDrawable->y + yDst + height);
|
|
||||||
|
|
||||||
done:
|
done:
|
||||||
pSrc->repeat = saveSrcRepeat;
|
pSrc->repeat = saveSrcRepeat;
|
||||||
|
@ -716,6 +764,7 @@ exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap,
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw = pPicture->pDrawable;
|
DrawablePtr pDraw = pPicture->pDrawable;
|
||||||
ExaMigrationRec pixmaps[1];
|
ExaMigrationRec pixmaps[1];
|
||||||
|
int xoff, yoff;
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = TRUE;
|
pixmaps[0].as_src = TRUE;
|
||||||
|
@ -724,8 +773,10 @@ exaRasterizeTrapezoid (PicturePtr pPicture, xTrapezoid *trap,
|
||||||
|
|
||||||
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
fbRasterizeTrapezoid(pPicture, trap, x_off, y_off);
|
fbRasterizeTrapezoid(pPicture, trap, x_off, y_off);
|
||||||
exaDrawableDirty(pDraw, pDraw->x, pDraw->y,
|
exaGetDrawableDeltas(pDraw, pixmaps[0].pPix, &xoff, &yoff);
|
||||||
pDraw->x + pDraw->width, pDraw->y + pDraw->height);
|
exaPixmapDirty(pixmaps[0].pPix, pDraw->x + xoff, pDraw->y + yoff,
|
||||||
|
pDraw->x + xoff + pDraw->width,
|
||||||
|
pDraw->y + yoff + pDraw->height);
|
||||||
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -739,6 +790,7 @@ exaAddTriangles (PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri,
|
||||||
{
|
{
|
||||||
DrawablePtr pDraw = pPicture->pDrawable;
|
DrawablePtr pDraw = pPicture->pDrawable;
|
||||||
ExaMigrationRec pixmaps[1];
|
ExaMigrationRec pixmaps[1];
|
||||||
|
int xoff, yoff;
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = TRUE;
|
pixmaps[0].as_src = TRUE;
|
||||||
|
@ -747,8 +799,10 @@ exaAddTriangles (PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri,
|
||||||
|
|
||||||
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
fbAddTriangles(pPicture, x_off, y_off, ntri, tris);
|
fbAddTriangles(pPicture, x_off, y_off, ntri, tris);
|
||||||
exaDrawableDirty(pDraw, pDraw->x, pDraw->y,
|
exaGetDrawableDeltas(pDraw, pixmaps[0].pPix, &xoff, &yoff);
|
||||||
pDraw->x + pDraw->width, pDraw->y + pDraw->height);
|
exaPixmapDirty(pixmaps[0].pPix, pDraw->x + xoff, pDraw->y + yoff,
|
||||||
|
pDraw->x + xoff + pDraw->width,
|
||||||
|
pDraw->y + yoff + pDraw->height);
|
||||||
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
exaFinishAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -845,10 +899,11 @@ exaGlyphs (CARD8 op,
|
||||||
PixmapPtr pPixmap = NULL;
|
PixmapPtr pPixmap = NULL;
|
||||||
PicturePtr pPicture;
|
PicturePtr pPicture;
|
||||||
PixmapPtr pMaskPixmap = NULL;
|
PixmapPtr pMaskPixmap = NULL;
|
||||||
|
PixmapPtr pDstPixmap = exaGetDrawablePixmap(pDst->pDrawable);
|
||||||
PicturePtr pMask;
|
PicturePtr pMask;
|
||||||
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
ScreenPtr pScreen = pDst->pDrawable->pScreen;
|
||||||
int width = 0, height = 0;
|
int width = 0, height = 0;
|
||||||
int x, y;
|
int x, y, x1, y1, xoff, yoff;
|
||||||
int xDst = list->xOff, yDst = list->yOff;
|
int xDst = list->xOff, yDst = list->yOff;
|
||||||
int n;
|
int n;
|
||||||
int error;
|
int error;
|
||||||
|
@ -892,7 +947,12 @@ exaGlyphs (CARD8 op,
|
||||||
xRectangle rect;
|
xRectangle rect;
|
||||||
|
|
||||||
miGlyphExtents (nlist, list, glyphs, &extents);
|
miGlyphExtents (nlist, list, glyphs, &extents);
|
||||||
|
|
||||||
|
extents.x1 = max(extents.x1, 0);
|
||||||
|
extents.y1 = max(extents.y1, 0);
|
||||||
|
extents.x2 = min(extents.x2, pDst->pDrawable->width);
|
||||||
|
extents.y2 = min(extents.y2, pDst->pDrawable->height);
|
||||||
|
|
||||||
if (extents.x2 <= extents.x1 || extents.y2 <= extents.y1)
|
if (extents.x2 <= extents.x1 || extents.y2 <= extents.y1)
|
||||||
return;
|
return;
|
||||||
width = extents.x2 - extents.x1;
|
width = extents.x2 - extents.x1;
|
||||||
|
@ -918,6 +978,7 @@ exaGlyphs (CARD8 op,
|
||||||
rect.width = width;
|
rect.width = width;
|
||||||
rect.height = height;
|
rect.height = height;
|
||||||
(*pGC->ops->PolyFillRect) (&pMaskPixmap->drawable, pGC, 1, &rect);
|
(*pGC->ops->PolyFillRect) (&pMaskPixmap->drawable, pGC, 1, &rect);
|
||||||
|
exaPixmapDirty(pMaskPixmap, 0, 0, width, height);
|
||||||
FreeScratchGC (pGC);
|
FreeScratchGC (pGC);
|
||||||
x = -extents.x1;
|
x = -extents.x1;
|
||||||
y = -extents.y1;
|
y = -extents.y1;
|
||||||
|
@ -929,6 +990,8 @@ exaGlyphs (CARD8 op,
|
||||||
y = 0;
|
y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exaGetDrawableDeltas(pDst->pDrawable, pDstPixmap, &xoff, &yoff);
|
||||||
|
|
||||||
while (nlist--)
|
while (nlist--)
|
||||||
{
|
{
|
||||||
GCPtr pGC = NULL;
|
GCPtr pGC = NULL;
|
||||||
|
@ -983,13 +1046,21 @@ exaGlyphs (CARD8 op,
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = TRUE;
|
pixmaps[0].as_src = TRUE;
|
||||||
pixmaps[0].pPix = pPixmap;
|
pixmaps[0].pPix = pPixmap;
|
||||||
exaDoMigration (pixmaps, 1, TRUE);
|
exaDoMigration (pixmaps, 1, pExaScr->info->PrepareComposite != NULL);
|
||||||
|
|
||||||
while (n--)
|
while (n--)
|
||||||
{
|
{
|
||||||
GlyphPtr glyph = *glyphs++;
|
GlyphPtr glyph = *glyphs++;
|
||||||
pointer glyphdata = (pointer) (glyph + 1);
|
pointer glyphdata = (pointer) (glyph + 1);
|
||||||
|
DrawablePtr pCmpDrw = (maskFormat ? pMask : pDst)->pDrawable;
|
||||||
|
|
||||||
|
x1 = x - glyph->info.x;
|
||||||
|
y1 = y - glyph->info.y;
|
||||||
|
|
||||||
|
if (x1 >= pCmpDrw->width || y1 >= pCmpDrw->height ||
|
||||||
|
(x1 + glyph->info.width) <= 0 || (y1 + glyph->info.height) <= 0)
|
||||||
|
goto nextglyph;
|
||||||
|
|
||||||
(*pScreen->ModifyPixmapHeader) (pScratchPixmap,
|
(*pScreen->ModifyPixmapHeader) (pScratchPixmap,
|
||||||
glyph->info.width,
|
glyph->info.width,
|
||||||
glyph->info.height,
|
glyph->info.height,
|
||||||
|
@ -1048,17 +1119,22 @@ exaGlyphs (CARD8 op,
|
||||||
if (maskFormat)
|
if (maskFormat)
|
||||||
{
|
{
|
||||||
exaComposite (PictOpAdd, pPicture, NULL, pMask, 0, 0, 0, 0,
|
exaComposite (PictOpAdd, pPicture, NULL, pMask, 0, 0, 0, 0,
|
||||||
x - glyph->info.x, y - glyph->info.y,
|
x1, y1, glyph->info.width, glyph->info.height);
|
||||||
glyph->info.width, glyph->info.height);
|
exaPixmapDirty(pMaskPixmap, x1, y1, x1 + glyph->info.width,
|
||||||
|
y1 + glyph->info.height);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
exaComposite (op, pSrc, pPicture, pDst,
|
exaComposite (op, pSrc, pPicture, pDst,
|
||||||
xSrc + (x - glyph->info.x) - xDst,
|
xSrc + x1 - xDst, ySrc + y1 - yDst,
|
||||||
ySrc + (y - glyph->info.y) - yDst,
|
0, 0, x1, y1, glyph->info.width,
|
||||||
0, 0, x - glyph->info.x, y - glyph->info.y,
|
glyph->info.height);
|
||||||
glyph->info.width, glyph->info.height);
|
x1 += pDst->pDrawable->x + xoff;
|
||||||
|
y1 += pDst->pDrawable->y + yoff;
|
||||||
|
exaPixmapDirty(pDstPixmap, x1, y1, x1 + glyph->info.width,
|
||||||
|
y1 + glyph->info.height);
|
||||||
}
|
}
|
||||||
|
nextglyph:
|
||||||
x += glyph->info.xOff;
|
x += glyph->info.xOff;
|
||||||
y += glyph->info.yOff;
|
y += glyph->info.yOff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,10 +88,15 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
|
||||||
int x, int y, int w, int h, int leftPad, int format,
|
int x, int y, int w, int h, int leftPad, int format,
|
||||||
char *bits)
|
char *bits)
|
||||||
{
|
{
|
||||||
|
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
|
||||||
|
int xoff, yoff;
|
||||||
|
|
||||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
||||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
|
fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
|
||||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
|
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||||
|
exaPixmapDirty(pPixmap, x + xoff, y + yoff, x + xoff + w, y + yoff + h);
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionPtr
|
RegionPtr
|
||||||
|
@ -201,32 +206,11 @@ ExaCheckPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
|
||||||
{
|
{
|
||||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
||||||
|
|
||||||
if (nrect) {
|
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
int x1 = max(prect->x, 0), y1 = max(prect->y, 0);
|
exaPrepareAccessGC (pGC);
|
||||||
int x2 = min(prect->x + prect->width, pDrawable->width);
|
fbPolyFillRect (pDrawable, pGC, nrect, prect);
|
||||||
int y2 = min(prect->y + prect->height, pDrawable->height);
|
exaFinishAccessGC (pGC);
|
||||||
|
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
|
||||||
exaPrepareAccessGC (pGC);
|
|
||||||
fbPolyFillRect (pDrawable, pGC, nrect, prect);
|
|
||||||
exaFinishAccessGC (pGC);
|
|
||||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
|
||||||
|
|
||||||
/* Only track bounding box of damage, as this path can degenerate to
|
|
||||||
* zillions of damage boxes
|
|
||||||
*/
|
|
||||||
while (--nrect)
|
|
||||||
{
|
|
||||||
prect++;
|
|
||||||
x1 = min(x1, prect->x);
|
|
||||||
x2 = max(x2, prect->x + prect->width);
|
|
||||||
y1 = min(y1, prect->y);
|
|
||||||
y2 = max(y2, prect->y + prect->height);
|
|
||||||
}
|
|
||||||
|
|
||||||
exaDrawableDirty (pDrawable, pDrawable->x + x1, pDrawable->y + y1,
|
|
||||||
pDrawable->x + x2, pDrawable->y + y2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
noinst_LTLIBRARIES = libfb.la libwfb.la libfbmmx.la
|
noinst_LTLIBRARIES = libfb.la libwfb.la
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
-I$(top_srcdir)/hw/xfree86/os-support \
|
-I$(top_srcdir)/hw/xfree86/os-support \
|
||||||
|
@ -12,25 +12,8 @@ endif
|
||||||
|
|
||||||
libfb_la_CFLAGS = $(AM_CFLAGS)
|
libfb_la_CFLAGS = $(AM_CFLAGS)
|
||||||
|
|
||||||
if MMX_CAPABLE
|
|
||||||
libfb_la_CFLAGS += -DUSE_MMX
|
|
||||||
|
|
||||||
libfbmmx_la_CFLAGS = \
|
|
||||||
$(DIX_CFLAGS) \
|
|
||||||
-DUSE_MMX \
|
|
||||||
-mmmx \
|
|
||||||
-msse \
|
|
||||||
-Winline \
|
|
||||||
--param inline-unit-growth=10000 \
|
|
||||||
--param large-function-growth=10000
|
|
||||||
endif
|
|
||||||
|
|
||||||
libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
|
libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
|
||||||
|
|
||||||
libfbmmx_la_SOURCES = \
|
|
||||||
fbmmx.c \
|
|
||||||
fbmmx.h
|
|
||||||
|
|
||||||
libfb_la_SOURCES = \
|
libfb_la_SOURCES = \
|
||||||
fb.h \
|
fb.h \
|
||||||
fb24_32.c \
|
fb24_32.c \
|
||||||
|
@ -42,7 +25,6 @@ libfb_la_SOURCES = \
|
||||||
fbblt.c \
|
fbblt.c \
|
||||||
fbbltone.c \
|
fbbltone.c \
|
||||||
fbbstore.c \
|
fbbstore.c \
|
||||||
fbcompose.c \
|
|
||||||
fbcopy.c \
|
fbcopy.c \
|
||||||
fbfill.c \
|
fbfill.c \
|
||||||
fbfillrect.c \
|
fbfillrect.c \
|
||||||
|
@ -70,12 +52,8 @@ libfb_la_SOURCES = \
|
||||||
fbutil.c \
|
fbutil.c \
|
||||||
fbwindow.c \
|
fbwindow.c \
|
||||||
fbpseudocolor.c \
|
fbpseudocolor.c \
|
||||||
fbpseudocolor.h \
|
fbpseudocolor.h
|
||||||
fbedge.c \
|
|
||||||
fbedgeimp.h
|
|
||||||
|
|
||||||
libwfb_la_SOURCES = $(libfb_la_SOURCES)
|
libwfb_la_SOURCES = $(libfb_la_SOURCES)
|
||||||
|
|
||||||
libfb_la_LIBADD = libfbmmx.la
|
|
||||||
|
|
||||||
EXTRA_DIST = fbcmap.c fbcmap_mi.c
|
EXTRA_DIST = fbcmap.c fbcmap_mi.c
|
||||||
|
|
6
fb/fb.h
6
fb/fb.h
|
@ -26,6 +26,8 @@
|
||||||
#define _FB_H_
|
#define _FB_H_
|
||||||
|
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
|
#include <pixman/pixman.h>
|
||||||
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "pixmap.h"
|
#include "pixmap.h"
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
|
@ -2146,4 +2148,8 @@ void
|
||||||
fbPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
fbPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
||||||
|
|
||||||
|
|
||||||
|
pixman_image_t *image_from_pict (PicturePtr pict,
|
||||||
|
Bool has_clip);
|
||||||
|
|
||||||
#endif /* _FB_H_ */
|
#endif /* _FB_H_ */
|
||||||
|
|
||||||
|
|
4414
fb/fbcompose.c
4414
fb/fbcompose.c
File diff suppressed because it is too large
Load Diff
25
fb/fbcopy.c
25
fb/fbcopy.c
|
@ -29,7 +29,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "fb.h"
|
#include "fb.h"
|
||||||
#include "fbmmx.h"
|
|
||||||
|
|
||||||
void
|
void
|
||||||
fbCopyNtoN (DrawablePtr pSrcDrawable,
|
fbCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
|
@ -60,21 +59,17 @@ fbCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
|
|
||||||
while (nbox--)
|
while (nbox--)
|
||||||
{
|
{
|
||||||
#ifdef USE_MMX
|
#ifndef FB_ACCESS_WRAPPER /* pixman_blt() doesn't support accessors yet */
|
||||||
if (pm == FB_ALLONES && alu == GXcopy && !reverse &&
|
if (pm == FB_ALLONES && alu == GXcopy && !reverse &&
|
||||||
!upsidedown && fbHaveMMX())
|
!upsidedown)
|
||||||
{
|
{
|
||||||
if (!fbCopyAreammx (pSrcDrawable,
|
if (!pixman_blt ((uint32_t *)src, (uint32_t *)dst, srcStride, dstStride, srcBpp, dstBpp,
|
||||||
pDstDrawable,
|
(pbox->x1 + dx + srcXoff),
|
||||||
|
(pbox->y1 + dy + srcYoff),
|
||||||
(pbox->x1 + dx),
|
(pbox->x1 + srcXoff),
|
||||||
(pbox->y1 + dy),
|
(pbox->y1 + srcYoff),
|
||||||
|
(pbox->x2 - pbox->x1),
|
||||||
(pbox->x1),
|
(pbox->y2 - pbox->y1)))
|
||||||
(pbox->y1),
|
|
||||||
|
|
||||||
(pbox->x2 - pbox->x1),
|
|
||||||
(pbox->y2 - pbox->y1)))
|
|
||||||
goto fallback;
|
goto fallback;
|
||||||
else
|
else
|
||||||
goto next;
|
goto next;
|
||||||
|
@ -98,7 +93,7 @@ fbCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
|
|
||||||
reverse,
|
reverse,
|
||||||
upsidedown);
|
upsidedown);
|
||||||
#ifdef USE_MMX
|
#ifndef FB_ACCESS_WRAPPER
|
||||||
next:
|
next:
|
||||||
#endif
|
#endif
|
||||||
pbox++;
|
pbox++;
|
||||||
|
|
314
fb/fbedge.c
314
fb/fbedge.c
|
@ -1,314 +0,0 @@
|
||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright © 2004 Keith Packard
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
* documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
* the above copyright notice appear in all copies and that both that
|
|
||||||
* copyright notice and this permission notice appear in supporting
|
|
||||||
* documentation, and that the name of Keith Packard not be used in
|
|
||||||
* advertising or publicity pertaining to distribution of the software without
|
|
||||||
* specific, written prior permission. Keith Packard makes no
|
|
||||||
* representations about the suitability of this software for any purpose. It
|
|
||||||
* is provided "as is" without express or implied warranty.
|
|
||||||
*
|
|
||||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
||||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
||||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
||||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
||||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "fb.h"
|
|
||||||
|
|
||||||
#ifdef RENDER
|
|
||||||
|
|
||||||
#include "picturestr.h"
|
|
||||||
#include "mipict.h"
|
|
||||||
#include "renderedge.h"
|
|
||||||
#include "fbpict.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 4 bit alpha
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define N_BITS 4
|
|
||||||
#define rasterizeEdges fbRasterizeEdges4
|
|
||||||
|
|
||||||
#if BITMAP_BIT_ORDER == LSBFirst
|
|
||||||
#define Shift4(o) ((o) << 2)
|
|
||||||
#else
|
|
||||||
#define Shift4(o) ((1-(o)) << 2)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define Get4(x,o) (((x) >> Shift4(o)) & 0xf)
|
|
||||||
#define Put4(x,o,v) (((x) & ~(0xf << Shift4(o))) | (((v) & 0xf) << Shift4(o)))
|
|
||||||
|
|
||||||
#define DefineAlpha(line,x) \
|
|
||||||
CARD8 *__ap = (CARD8 *) line + ((x) >> 1); \
|
|
||||||
int __ao = (x) & 1
|
|
||||||
|
|
||||||
#define StepAlpha ((__ap += __ao), (__ao ^= 1))
|
|
||||||
|
|
||||||
#define AddAlpha(a) { \
|
|
||||||
CARD8 __o = READ(__ap); \
|
|
||||||
CARD8 __a = (a) + Get4(__o, __ao); \
|
|
||||||
WRITE(__ap, Put4 (__o, __ao, __a | (0 - ((__a) >> 4)))); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "fbedgeimp.h"
|
|
||||||
|
|
||||||
#undef AddAlpha
|
|
||||||
#undef StepAlpha
|
|
||||||
#undef DefineAlpha
|
|
||||||
#undef rasterizeEdges
|
|
||||||
#undef N_BITS
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 1 bit alpha
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define N_BITS 1
|
|
||||||
#define rasterizeEdges fbRasterizeEdges1
|
|
||||||
|
|
||||||
#include "fbedgeimp.h"
|
|
||||||
|
|
||||||
#undef rasterizeEdges
|
|
||||||
#undef N_BITS
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 8 bit alpha
|
|
||||||
*/
|
|
||||||
|
|
||||||
static INLINE CARD8
|
|
||||||
clip255 (int x)
|
|
||||||
{
|
|
||||||
if (x > 255) return 255;
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
static INLINE void
|
|
||||||
add_saturate_8 (CARD8 *buf, int value, int length)
|
|
||||||
{
|
|
||||||
while (length--)
|
|
||||||
{
|
|
||||||
WRITE(buf, clip255 (READ(buf) + value));
|
|
||||||
buf++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We want to detect the case where we add the same value to a long
|
|
||||||
* span of pixels. The triangles on the end are filled in while we
|
|
||||||
* count how many sub-pixel scanlines contribute to the middle section.
|
|
||||||
*
|
|
||||||
* +--------------------------+
|
|
||||||
* fill_height =| \ /
|
|
||||||
* +------------------+
|
|
||||||
* |================|
|
|
||||||
* fill_start fill_end
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
fbRasterizeEdges8 (FbBits *buf,
|
|
||||||
int width,
|
|
||||||
int stride,
|
|
||||||
RenderEdge *l,
|
|
||||||
RenderEdge *r,
|
|
||||||
xFixed t,
|
|
||||||
xFixed b)
|
|
||||||
{
|
|
||||||
xFixed y = t;
|
|
||||||
FbBits *line;
|
|
||||||
int fill_start = -1, fill_end = -1;
|
|
||||||
int fill_size = 0;
|
|
||||||
|
|
||||||
line = buf + xFixedToInt (y) * stride;
|
|
||||||
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
CARD8 *ap = (CARD8 *) line;
|
|
||||||
xFixed lx, rx;
|
|
||||||
int lxi, rxi;
|
|
||||||
|
|
||||||
/* clip X */
|
|
||||||
lx = l->x;
|
|
||||||
if (lx < 0)
|
|
||||||
lx = 0;
|
|
||||||
rx = r->x;
|
|
||||||
if (xFixedToInt (rx) >= width)
|
|
||||||
rx = IntToxFixed (width);
|
|
||||||
|
|
||||||
/* Skip empty (or backwards) sections */
|
|
||||||
if (rx > lx)
|
|
||||||
{
|
|
||||||
int lxs, rxs;
|
|
||||||
|
|
||||||
/* Find pixel bounds for span. */
|
|
||||||
lxi = xFixedToInt (lx);
|
|
||||||
rxi = xFixedToInt (rx);
|
|
||||||
|
|
||||||
/* Sample coverage for edge pixels */
|
|
||||||
lxs = RenderSamplesX (lx, 8);
|
|
||||||
rxs = RenderSamplesX (rx, 8);
|
|
||||||
|
|
||||||
/* Add coverage across row */
|
|
||||||
if (lxi == rxi)
|
|
||||||
{
|
|
||||||
WRITE(ap +lxi, clip255 (READ(ap + lxi) + rxs - lxs));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WRITE(ap + lxi, clip255 (READ(ap + lxi) + N_X_FRAC(8) - lxs));
|
|
||||||
|
|
||||||
/* Move forward so that lxi/rxi is the pixel span */
|
|
||||||
lxi++;
|
|
||||||
|
|
||||||
/* Don't bother trying to optimize the fill unless
|
|
||||||
* the span is longer than 4 pixels. */
|
|
||||||
if (rxi - lxi > 4)
|
|
||||||
{
|
|
||||||
if (fill_start < 0)
|
|
||||||
{
|
|
||||||
fill_start = lxi;
|
|
||||||
fill_end = rxi;
|
|
||||||
fill_size++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (lxi >= fill_end || rxi < fill_start)
|
|
||||||
{
|
|
||||||
/* We're beyond what we saved, just fill it */
|
|
||||||
add_saturate_8 (ap + fill_start,
|
|
||||||
fill_size * N_X_FRAC(8),
|
|
||||||
fill_end - fill_start);
|
|
||||||
fill_start = lxi;
|
|
||||||
fill_end = rxi;
|
|
||||||
fill_size = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Update fill_start */
|
|
||||||
if (lxi > fill_start)
|
|
||||||
{
|
|
||||||
add_saturate_8 (ap + fill_start,
|
|
||||||
fill_size * N_X_FRAC(8),
|
|
||||||
lxi - fill_start);
|
|
||||||
fill_start = lxi;
|
|
||||||
}
|
|
||||||
else if (lxi < fill_start)
|
|
||||||
{
|
|
||||||
add_saturate_8 (ap + lxi, N_X_FRAC(8),
|
|
||||||
fill_start - lxi);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Update fill_end */
|
|
||||||
if (rxi < fill_end)
|
|
||||||
{
|
|
||||||
add_saturate_8 (ap + rxi,
|
|
||||||
fill_size * N_X_FRAC(8),
|
|
||||||
fill_end - rxi);
|
|
||||||
fill_end = rxi;
|
|
||||||
}
|
|
||||||
else if (fill_end < rxi)
|
|
||||||
{
|
|
||||||
add_saturate_8 (ap + fill_end,
|
|
||||||
N_X_FRAC(8),
|
|
||||||
rxi - fill_end);
|
|
||||||
}
|
|
||||||
fill_size++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
add_saturate_8 (ap + lxi, N_X_FRAC(8), rxi - lxi);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Do not add in a 0 alpha here. This check is
|
|
||||||
* necessary to avoid a buffer overrun, (when rx
|
|
||||||
* is exactly on a pixel boundary). */
|
|
||||||
if (rxs)
|
|
||||||
WRITE(ap + rxi, clip255 (READ(ap + rxi) + rxs));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (y == b) {
|
|
||||||
/* We're done, make sure we clean up any remaining fill. */
|
|
||||||
if (fill_start != fill_end) {
|
|
||||||
if (fill_size == N_Y_FRAC(8))
|
|
||||||
{
|
|
||||||
MEMSET_WRAPPED (ap + fill_start, 0xff, fill_end - fill_start);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
add_saturate_8 (ap + fill_start, fill_size * N_X_FRAC(8),
|
|
||||||
fill_end - fill_start);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xFixedFrac (y) != Y_FRAC_LAST(8))
|
|
||||||
{
|
|
||||||
RenderEdgeStepSmall (l);
|
|
||||||
RenderEdgeStepSmall (r);
|
|
||||||
y += STEP_Y_SMALL(8);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
RenderEdgeStepBig (l);
|
|
||||||
RenderEdgeStepBig (r);
|
|
||||||
y += STEP_Y_BIG(8);
|
|
||||||
if (fill_start != fill_end)
|
|
||||||
{
|
|
||||||
if (fill_size == N_Y_FRAC(8))
|
|
||||||
{
|
|
||||||
MEMSET_WRAPPED (ap + fill_start, 0xff, fill_end - fill_start);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
add_saturate_8 (ap + fill_start, fill_size * N_X_FRAC(8),
|
|
||||||
fill_end - fill_start);
|
|
||||||
}
|
|
||||||
fill_start = fill_end = -1;
|
|
||||||
fill_size = 0;
|
|
||||||
}
|
|
||||||
line += stride;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
fbRasterizeEdges (FbBits *buf,
|
|
||||||
int bpp,
|
|
||||||
int width,
|
|
||||||
int stride,
|
|
||||||
RenderEdge *l,
|
|
||||||
RenderEdge *r,
|
|
||||||
xFixed t,
|
|
||||||
xFixed b)
|
|
||||||
{
|
|
||||||
switch (bpp) {
|
|
||||||
case 1:
|
|
||||||
fbRasterizeEdges1 (buf, width, stride, l, r, t, b);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
fbRasterizeEdges4 (buf, width, stride, l, r, t, b);
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
fbRasterizeEdges8 (buf, width, stride, l, r, t, b);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* RENDER */
|
|
145
fb/fbedgeimp.h
145
fb/fbedgeimp.h
|
@ -1,145 +0,0 @@
|
||||||
/*
|
|
||||||
* $Id$
|
|
||||||
*
|
|
||||||
* Copyright © 2004 Keith Packard
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
* documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
* the above copyright notice appear in all copies and that both that
|
|
||||||
* copyright notice and this permission notice appear in supporting
|
|
||||||
* documentation, and that the name of Keith Packard not be used in
|
|
||||||
* advertising or publicity pertaining to distribution of the software without
|
|
||||||
* specific, written prior permission. Keith Packard makes no
|
|
||||||
* representations about the suitability of this software for any purpose. It
|
|
||||||
* is provided "as is" without express or implied warranty.
|
|
||||||
*
|
|
||||||
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
||||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
||||||
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
||||||
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
||||||
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef rasterizeSpan
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
|
||||||
rasterizeEdges (FbBits *buf,
|
|
||||||
int width,
|
|
||||||
int stride,
|
|
||||||
RenderEdge *l,
|
|
||||||
RenderEdge *r,
|
|
||||||
xFixed t,
|
|
||||||
xFixed b)
|
|
||||||
{
|
|
||||||
xFixed y = t;
|
|
||||||
FbBits *line;
|
|
||||||
|
|
||||||
line = buf + xFixedToInt (y) * stride;
|
|
||||||
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
xFixed lx, rx;
|
|
||||||
int lxi, rxi;
|
|
||||||
|
|
||||||
/* clip X */
|
|
||||||
lx = l->x;
|
|
||||||
if (lx < 0)
|
|
||||||
lx = 0;
|
|
||||||
rx = r->x;
|
|
||||||
if (xFixedToInt (rx) >= width)
|
|
||||||
rx = IntToxFixed (width);
|
|
||||||
|
|
||||||
/* Skip empty (or backwards) sections */
|
|
||||||
if (rx > lx)
|
|
||||||
{
|
|
||||||
|
|
||||||
/* Find pixel bounds for span */
|
|
||||||
lxi = xFixedToInt (lx);
|
|
||||||
rxi = xFixedToInt (rx);
|
|
||||||
|
|
||||||
#if N_BITS == 1
|
|
||||||
{
|
|
||||||
FbBits *a = line;
|
|
||||||
FbBits startmask, endmask;
|
|
||||||
int nmiddle;
|
|
||||||
int width = rxi - lxi;
|
|
||||||
int x = lxi;
|
|
||||||
|
|
||||||
a += x >> FB_SHIFT;
|
|
||||||
x &= FB_MASK;
|
|
||||||
|
|
||||||
FbMaskBits (x, width, startmask, nmiddle, endmask);
|
|
||||||
if (startmask) {
|
|
||||||
WRITE(a, READ(a) | startmask);
|
|
||||||
a++;
|
|
||||||
}
|
|
||||||
while (nmiddle--)
|
|
||||||
WRITE(a++, FB_ALLONES);
|
|
||||||
if (endmask)
|
|
||||||
WRITE(a, READ(a) | endmask);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
{
|
|
||||||
DefineAlpha(line,lxi);
|
|
||||||
int lxs, rxs;
|
|
||||||
|
|
||||||
/* Sample coverage for edge pixels */
|
|
||||||
lxs = RenderSamplesX (lx, N_BITS);
|
|
||||||
rxs = RenderSamplesX (rx, N_BITS);
|
|
||||||
|
|
||||||
/* Add coverage across row */
|
|
||||||
if (lxi == rxi)
|
|
||||||
{
|
|
||||||
AddAlpha (rxs - lxs);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int xi;
|
|
||||||
|
|
||||||
AddAlpha (N_X_FRAC(N_BITS) - lxs);
|
|
||||||
StepAlpha;
|
|
||||||
for (xi = lxi + 1; xi < rxi; xi++)
|
|
||||||
{
|
|
||||||
AddAlpha (N_X_FRAC(N_BITS));
|
|
||||||
StepAlpha;
|
|
||||||
}
|
|
||||||
/* Do not add in a 0 alpha here. This check is necessary
|
|
||||||
* to avoid a buffer overrun when rx is exactly on a pixel
|
|
||||||
* boundary.
|
|
||||||
*/
|
|
||||||
if (rxs != 0)
|
|
||||||
AddAlpha (rxs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if (y == b)
|
|
||||||
break;
|
|
||||||
|
|
||||||
#if N_BITS > 1
|
|
||||||
if (xFixedFrac (y) != Y_FRAC_LAST(N_BITS))
|
|
||||||
{
|
|
||||||
RenderEdgeStepSmall (l);
|
|
||||||
RenderEdgeStepSmall (r);
|
|
||||||
y += STEP_Y_SMALL(N_BITS);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
RenderEdgeStepBig (l);
|
|
||||||
RenderEdgeStepBig (r);
|
|
||||||
y += STEP_Y_BIG(N_BITS);
|
|
||||||
line += stride;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef rasterizeSpan
|
|
28
fb/fbfill.c
28
fb/fbfill.c
|
@ -27,7 +27,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fb.h"
|
#include "fb.h"
|
||||||
#include "fbmmx.h"
|
|
||||||
|
|
||||||
void
|
void
|
||||||
fbFill (DrawablePtr pDrawable,
|
fbFill (DrawablePtr pDrawable,
|
||||||
|
@ -47,12 +46,15 @@ fbFill (DrawablePtr pDrawable,
|
||||||
|
|
||||||
switch (pGC->fillStyle) {
|
switch (pGC->fillStyle) {
|
||||||
case FillSolid:
|
case FillSolid:
|
||||||
#ifdef USE_MMX
|
#ifndef FB_ACCESS_WRAPPER
|
||||||
if (!pPriv->and && fbHaveMMX())
|
if (!pPriv->and)
|
||||||
if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor)) {
|
{
|
||||||
|
if (pixman_fill (dst, dstStride, dstBpp, x + dstXoff, y + dstYoff, width, height, pPriv->xor))
|
||||||
|
{
|
||||||
fbFinishAccess (pDrawable);
|
fbFinishAccess (pDrawable);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
fbSolid (dst + (y + dstYoff) * dstStride,
|
fbSolid (dst + (y + dstYoff) * dstStride,
|
||||||
dstStride,
|
dstStride,
|
||||||
|
@ -215,16 +217,16 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
if (partY2 <= partY1)
|
if (partY2 <= partY1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
#ifdef USE_MMX
|
#ifndef FB_ACCESS_WRAPPER
|
||||||
if (!and && fbHaveMMX())
|
if (!and)
|
||||||
{
|
{
|
||||||
if (fbSolidFillmmx (pDrawable,
|
if (pixman_fill (dst, dstStride, dstBpp,
|
||||||
partX1, partY1,
|
partX1 + dstXoff, partX2 + dstYoff, (partX2 - partX1), (partY2 - partY1),
|
||||||
(partX2 - partX1), (partY2 - partY1),
|
xor))
|
||||||
xor)) {
|
{
|
||||||
fbFinishAccess (pDrawable);
|
fbFinishAccess (pDrawable);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
fbSolid (dst + (partY1 + dstYoff) * dstStride,
|
fbSolid (dst + (partY1 + dstYoff) * dstStride,
|
||||||
|
|
2900
fb/fbmmx.c
2900
fb/fbmmx.c
File diff suppressed because it is too large
Load Diff
294
fb/fbmmx.h
294
fb/fbmmx.h
|
@ -1,294 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright © 2004 Red Hat, Inc.
|
|
||||||
* Copyright © 2005 Trolltech AS
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
* documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
* the above copyright notice appear in all copies and that both that
|
|
||||||
* copyright notice and this permission notice appear in supporting
|
|
||||||
* documentation, and that the name of Red Hat not be used in advertising or
|
|
||||||
* publicity pertaining to distribution of the software without specific,
|
|
||||||
* written prior permission. Red Hat makes no representations about the
|
|
||||||
* suitability of this software for any purpose. It is provided "as is"
|
|
||||||
* without express or implied warranty.
|
|
||||||
*
|
|
||||||
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|
|
||||||
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
||||||
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
|
||||||
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
||||||
* SOFTWARE.
|
|
||||||
*
|
|
||||||
* Author: Søren Sandmann (sandmann@redhat.com)
|
|
||||||
* Lars Knoll (lars@trolltech.com)
|
|
||||||
*
|
|
||||||
* Based on work by Owen Taylor
|
|
||||||
*/
|
|
||||||
#ifdef HAVE_DIX_CONFIG_H
|
|
||||||
#include <dix-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_MMX
|
|
||||||
|
|
||||||
#if !defined(__amd64__) && !defined(__x86_64__)
|
|
||||||
Bool fbHaveMMX(void);
|
|
||||||
#else
|
|
||||||
#define fbHaveMMX() TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
|
||||||
#define fbHaveMMX() FALSE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_MMX
|
|
||||||
|
|
||||||
void fbComposeSetupMMX(void);
|
|
||||||
|
|
||||||
void fbCompositeSolidMask_nx8888x0565Cmmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSrcAdd_8888x8888mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSrc_8888x8888mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void
|
|
||||||
fbCompositeSolidMaskSrc_nx8x8888mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void
|
|
||||||
fbCompositeSrc_x888x8x8888mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSolidMask_nx8888x8888Cmmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSolidMask_nx8x8888mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeIn_nx8x8mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeIn_8x8mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSrcAdd_8888x8x8mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSrcAdd_8000x8000mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSrc_8888RevNPx8888mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSrc_8888x0565mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSrc_8888RevNPx0565mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSolid_nx8888mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSolid_nx0565mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSolidMask_nx8x0565mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
void fbCompositeSrc_8888x8x8888mmx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
Bool fbCopyAreammx (DrawablePtr pSrc,
|
|
||||||
DrawablePtr pDst,
|
|
||||||
int src_x,
|
|
||||||
int src_y,
|
|
||||||
int dst_x,
|
|
||||||
int dst_y,
|
|
||||||
int width,
|
|
||||||
int height);
|
|
||||||
void fbCompositeCopyAreammx (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
Bool fbSolidFillmmx (DrawablePtr pDraw,
|
|
||||||
int x,
|
|
||||||
int y,
|
|
||||||
int width,
|
|
||||||
int height,
|
|
||||||
FbBits xor);
|
|
||||||
|
|
||||||
#endif /* USE_MMX */
|
|
2529
fb/fbpict.c
2529
fb/fbpict.c
File diff suppressed because it is too large
Load Diff
236
fb/fbpict.h
236
fb/fbpict.h
|
@ -383,6 +383,9 @@ typedef struct _FbComposeData {
|
||||||
CARD16 height;
|
CARD16 height;
|
||||||
} FbComposeData;
|
} FbComposeData;
|
||||||
|
|
||||||
|
void
|
||||||
|
fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer);
|
||||||
|
|
||||||
typedef FASTCALL void (*CombineMaskU) (CARD32 *src, const CARD32 *mask, int width);
|
typedef FASTCALL void (*CombineMaskU) (CARD32 *src, const CARD32 *mask, int width);
|
||||||
typedef FASTCALL void (*CombineFuncU) (CARD32 *dest, const CARD32 *src, int width);
|
typedef FASTCALL void (*CombineFuncU) (CARD32 *dest, const CARD32 *src, int width);
|
||||||
typedef FASTCALL void (*CombineFuncC) (CARD32 *dest, CARD32 *src, CARD32 *mask, int width);
|
typedef FASTCALL void (*CombineFuncC) (CARD32 *dest, CARD32 *src, CARD32 *mask, int width);
|
||||||
|
@ -409,210 +412,7 @@ fbCompositeGeneral (CARD8 op,
|
||||||
CARD16 width,
|
CARD16 width,
|
||||||
CARD16 height);
|
CARD16 height);
|
||||||
|
|
||||||
|
|
||||||
/* fbedge.c */
|
|
||||||
void
|
|
||||||
fbRasterizeEdges (FbBits *buf,
|
|
||||||
int bpp,
|
|
||||||
int width,
|
|
||||||
int stride,
|
|
||||||
RenderEdge *l,
|
|
||||||
RenderEdge *r,
|
|
||||||
xFixed t,
|
|
||||||
xFixed b);
|
|
||||||
|
|
||||||
/* fbpict.c */
|
/* fbpict.c */
|
||||||
CARD32
|
|
||||||
fbOver (CARD32 x, CARD32 y);
|
|
||||||
|
|
||||||
CARD32
|
|
||||||
fbOver24 (CARD32 x, CARD32 y);
|
|
||||||
|
|
||||||
CARD32
|
|
||||||
fbIn (CARD32 x, CARD8 y);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSolidMask_nx8x8888 (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSolidMask_nx8x0888 (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSolidMask_nx8888x8888C (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSolidMask_nx8x0565 (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSolidMask_nx8888x0565C (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSrc_8888x8888 (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSrc_8888x0888 (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSrc_8888x0565 (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSrc_0565x0565 (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSrcAdd_8000x8000 (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSrcAdd_8888x8888 (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSrcAdd_1000x1000 (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
|
||||||
fbCompositeSolidMask_nx1xn (CARD8 op,
|
|
||||||
PicturePtr pSrc,
|
|
||||||
PicturePtr pMask,
|
|
||||||
PicturePtr pDst,
|
|
||||||
INT16 xSrc,
|
|
||||||
INT16 ySrc,
|
|
||||||
INT16 xMask,
|
|
||||||
INT16 yMask,
|
|
||||||
INT16 xDst,
|
|
||||||
INT16 yDst,
|
|
||||||
CARD16 width,
|
|
||||||
CARD16 height);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
fbComposite (CARD8 op,
|
fbComposite (CARD8 op,
|
||||||
PicturePtr pSrc,
|
PicturePtr pSrc,
|
||||||
|
@ -627,6 +427,36 @@ fbComposite (CARD8 op,
|
||||||
CARD16 width,
|
CARD16 width,
|
||||||
CARD16 height);
|
CARD16 height);
|
||||||
|
|
||||||
|
typedef void (*CompositeFunc) (CARD8 op,
|
||||||
|
PicturePtr pSrc,
|
||||||
|
PicturePtr pMask,
|
||||||
|
PicturePtr pDst,
|
||||||
|
INT16 xSrc,
|
||||||
|
INT16 ySrc,
|
||||||
|
INT16 xMask,
|
||||||
|
INT16 yMask,
|
||||||
|
INT16 xDst,
|
||||||
|
INT16 yDst,
|
||||||
|
CARD16 width,
|
||||||
|
CARD16 height);
|
||||||
|
|
||||||
|
void
|
||||||
|
fbWalkCompositeRegion (CARD8 op,
|
||||||
|
PicturePtr pSrc,
|
||||||
|
PicturePtr pMask,
|
||||||
|
PicturePtr pDst,
|
||||||
|
INT16 xSrc,
|
||||||
|
INT16 ySrc,
|
||||||
|
INT16 xMask,
|
||||||
|
INT16 yMask,
|
||||||
|
INT16 xDst,
|
||||||
|
INT16 yDst,
|
||||||
|
CARD16 width,
|
||||||
|
CARD16 height,
|
||||||
|
Bool srcRepeat,
|
||||||
|
Bool maskRepeat,
|
||||||
|
CompositeFunc compositeRect);
|
||||||
|
|
||||||
/* fbtrap.c */
|
/* fbtrap.c */
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
100
fb/fbtrap.c
100
fb/fbtrap.c
|
@ -42,61 +42,16 @@ fbAddTraps (PicturePtr pPicture,
|
||||||
int ntrap,
|
int ntrap,
|
||||||
xTrap *traps)
|
xTrap *traps)
|
||||||
{
|
{
|
||||||
FbBits *buf;
|
pixman_image_t *image = image_from_pict (pPicture, FALSE);
|
||||||
int bpp;
|
|
||||||
int width;
|
|
||||||
int stride;
|
|
||||||
int height;
|
|
||||||
int pxoff, pyoff;
|
|
||||||
|
|
||||||
xFixed x_off_fixed;
|
if (!image)
|
||||||
xFixed y_off_fixed;
|
return;
|
||||||
RenderEdge l, r;
|
|
||||||
xFixed t, b;
|
|
||||||
|
|
||||||
fbGetDrawable (pPicture->pDrawable, buf, stride, bpp, pxoff, pyoff);
|
pixman_add_traps (image, x_off, y_off, ntrap, (pixman_trap_t *)traps);
|
||||||
|
|
||||||
width = pPicture->pDrawable->width;
|
|
||||||
height = pPicture->pDrawable->height;
|
|
||||||
x_off += pxoff;
|
|
||||||
y_off += pyoff;
|
|
||||||
|
|
||||||
x_off_fixed = IntToxFixed(y_off);
|
|
||||||
y_off_fixed = IntToxFixed(y_off);
|
|
||||||
|
|
||||||
while (ntrap--)
|
|
||||||
{
|
|
||||||
t = traps->top.y + y_off_fixed;
|
|
||||||
if (t < 0)
|
|
||||||
t = 0;
|
|
||||||
t = RenderSampleCeilY (t, bpp);
|
|
||||||
|
|
||||||
b = traps->bot.y + y_off_fixed;
|
|
||||||
if (xFixedToInt (b) >= height)
|
|
||||||
b = IntToxFixed (height) - 1;
|
|
||||||
b = RenderSampleFloorY (b, bpp);
|
|
||||||
|
|
||||||
if (b >= t)
|
|
||||||
{
|
|
||||||
/* initialize edge walkers */
|
|
||||||
RenderEdgeInit (&l, bpp, t,
|
|
||||||
traps->top.l + x_off_fixed,
|
|
||||||
traps->top.y + y_off_fixed,
|
|
||||||
traps->bot.l + x_off_fixed,
|
|
||||||
traps->bot.y + y_off_fixed);
|
|
||||||
|
|
||||||
RenderEdgeInit (&r, bpp, t,
|
|
||||||
traps->top.r + x_off_fixed,
|
|
||||||
traps->top.y + y_off_fixed,
|
|
||||||
traps->bot.r + x_off_fixed,
|
|
||||||
traps->bot.y + y_off_fixed);
|
|
||||||
|
|
||||||
fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);
|
|
||||||
}
|
|
||||||
traps++;
|
|
||||||
}
|
|
||||||
|
|
||||||
fbFinishAccess (pPicture->pDrawable);
|
fbFinishAccess (pPicture->pDrawable);
|
||||||
|
|
||||||
|
pixman_image_unref (image);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -105,47 +60,16 @@ fbRasterizeTrapezoid (PicturePtr pPicture,
|
||||||
int x_off,
|
int x_off,
|
||||||
int y_off)
|
int y_off)
|
||||||
{
|
{
|
||||||
FbBits *buf;
|
pixman_image_t *image = image_from_pict (pPicture, FALSE);
|
||||||
int bpp;
|
|
||||||
int width;
|
|
||||||
int stride;
|
|
||||||
int height;
|
|
||||||
int pxoff, pyoff;
|
|
||||||
|
|
||||||
xFixed x_off_fixed;
|
if (!image)
|
||||||
xFixed y_off_fixed;
|
return;
|
||||||
RenderEdge l, r;
|
|
||||||
xFixed t, b;
|
|
||||||
|
|
||||||
fbGetDrawable (pPicture->pDrawable, buf, stride, bpp, pxoff, pyoff);
|
|
||||||
|
|
||||||
width = pPicture->pDrawable->width;
|
pixman_rasterize_trapezoid (image, (pixman_trapezoid_t *)trap, x_off, y_off);
|
||||||
height = pPicture->pDrawable->height;
|
|
||||||
x_off += pxoff;
|
|
||||||
y_off += pyoff;
|
|
||||||
|
|
||||||
x_off_fixed = IntToxFixed(x_off);
|
|
||||||
y_off_fixed = IntToxFixed(y_off);
|
|
||||||
t = trap->top + y_off_fixed;
|
|
||||||
if (t < 0)
|
|
||||||
t = 0;
|
|
||||||
t = RenderSampleCeilY (t, bpp);
|
|
||||||
|
|
||||||
b = trap->bottom + y_off_fixed;
|
|
||||||
if (xFixedToInt (b) >= height)
|
|
||||||
b = IntToxFixed (height) - 1;
|
|
||||||
b = RenderSampleFloorY (b, bpp);
|
|
||||||
|
|
||||||
if (b >= t)
|
|
||||||
{
|
|
||||||
/* initialize edge walkers */
|
|
||||||
RenderLineFixedEdgeInit (&l, bpp, t, &trap->left, x_off, y_off);
|
|
||||||
RenderLineFixedEdgeInit (&r, bpp, t, &trap->right, x_off, y_off);
|
|
||||||
|
|
||||||
fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);
|
|
||||||
}
|
|
||||||
|
|
||||||
fbFinishAccess (pPicture->pDrawable);
|
fbFinishAccess (pPicture->pDrawable);
|
||||||
|
|
||||||
|
pixman_image_unref (image);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -30,10 +30,6 @@
|
||||||
|
|
||||||
#include "fb.h"
|
#include "fb.h"
|
||||||
|
|
||||||
#ifdef USE_MMX
|
|
||||||
#include "fbmmx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
fbCreateWindow(WindowPtr pWin)
|
fbCreateWindow(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
|
@ -222,37 +218,38 @@ fbFillRegionSolid (DrawablePtr pDrawable,
|
||||||
int n = REGION_NUM_RECTS(pRegion);
|
int n = REGION_NUM_RECTS(pRegion);
|
||||||
BoxPtr pbox = REGION_RECTS(pRegion);
|
BoxPtr pbox = REGION_RECTS(pRegion);
|
||||||
|
|
||||||
#ifdef USE_MMX
|
#ifndef FB_ACCESS_WRAPPER
|
||||||
int has_mmx = 0;
|
int try_mmx = 0;
|
||||||
if (!and && fbHaveMMX())
|
if (!and)
|
||||||
has_mmx = 1;
|
try_mmx = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||||
|
|
||||||
while (n--)
|
while (n--)
|
||||||
{
|
{
|
||||||
#ifdef USE_MMX
|
#ifndef FB_ACCESS_WRAPPER
|
||||||
if (!has_mmx || !fbSolidFillmmx (pDrawable,
|
if (!try_mmx || !pixman_fill (dst, dstStride, dstBpp,
|
||||||
pbox->x1,
|
pbox->x1 + dstXoff, pbox->y1 + dstYoff,
|
||||||
pbox->y1,
|
(pbox->x2 - pbox->x1),
|
||||||
(pbox->x2 - pbox->x1),
|
(pbox->y2 - pbox->y1),
|
||||||
(pbox->y2 - pbox->y1), xor)) {
|
xor))
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
fbSolid (dst + (pbox->y1 + dstYoff) * dstStride,
|
fbSolid (dst + (pbox->y1 + dstYoff) * dstStride,
|
||||||
dstStride,
|
dstStride,
|
||||||
(pbox->x1 + dstXoff) * dstBpp,
|
(pbox->x1 + dstXoff) * dstBpp,
|
||||||
dstBpp,
|
dstBpp,
|
||||||
(pbox->x2 - pbox->x1) * dstBpp,
|
(pbox->x2 - pbox->x1) * dstBpp,
|
||||||
pbox->y2 - pbox->y1,
|
pbox->y2 - pbox->y1,
|
||||||
and, xor);
|
and, xor);
|
||||||
#ifdef USE_MMX
|
#ifndef FB_ACCESS_WRAPPER
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
fbValidateDrawable (pDrawable);
|
fbValidateDrawable (pDrawable);
|
||||||
pbox++;
|
pbox++;
|
||||||
}
|
}
|
||||||
|
|
||||||
fbFinishAccess (pDrawable);
|
fbFinishAccess (pDrawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,9 +184,11 @@
|
||||||
#define fbUnmapWindow wfbUnmapWindow
|
#define fbUnmapWindow wfbUnmapWindow
|
||||||
#define fbUnrealizeFont wfbUnrealizeFont
|
#define fbUnrealizeFont wfbUnrealizeFont
|
||||||
#define fbValidateGC wfbValidateGC
|
#define fbValidateGC wfbValidateGC
|
||||||
|
#define fbWalkCompositeRegion wfbWalkCompositeRegion
|
||||||
#define fbWinPrivateIndex wfbWinPrivateIndex
|
#define fbWinPrivateIndex wfbWinPrivateIndex
|
||||||
#define fbZeroLine wfbZeroLine
|
#define fbZeroLine wfbZeroLine
|
||||||
#define fbZeroSegment wfbZeroSegment
|
#define fbZeroSegment wfbZeroSegment
|
||||||
|
#define image_from_pict wfb_image_from_pict
|
||||||
#define xxScrPrivateIndex wfbxxScrPrivateIndex
|
#define xxScrPrivateIndex wfbxxScrPrivateIndex
|
||||||
#define xxGCPrivateIndex wfbxxGCPrivateIndex
|
#define xxGCPrivateIndex wfbxxGCPrivateIndex
|
||||||
#define xxColormapPrivateIndex wfbxxColormapPrivateIndex
|
#define xxColormapPrivateIndex wfbxxColormapPrivateIndex
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
((year-2000) * 10000) + \
|
((year-2000) * 10000) + \
|
||||||
((month) * 100) + \
|
((month) * 100) + \
|
||||||
((day) * 1)
|
((day) * 1)
|
||||||
#define VENDOR_RELEASE DMX_VENDOR_RELEASE(1,2,2004,6,30)
|
#define VENDOR_RELEASE DMX_VENDOR_RELEASE(1,2,2007,4,24)
|
||||||
#define VENDOR_STRING "DMX Project"
|
#define VENDOR_STRING "DMX Project"
|
||||||
|
|
||||||
/* Enable the DMX extension */
|
/* Enable the DMX extension */
|
||||||
|
|
|
@ -67,7 +67,7 @@ extern void __glXFreeGLXPixmap( __GLXpixmap *pGlxPixmap );
|
||||||
|
|
||||||
extern void __glXNoSuchRenderOpcode(GLbyte*);
|
extern void __glXNoSuchRenderOpcode(GLbyte*);
|
||||||
extern int __glXNoSuchSingleOpcode(__GLXclientState*, GLbyte*);
|
extern int __glXNoSuchSingleOpcode(__GLXclientState*, GLbyte*);
|
||||||
extern void __glXErrorCallBack(__GLinterface *gc, GLenum code);
|
extern void __glXErrorCallBack(GLenum code);
|
||||||
extern void __glXClearErrorOccured(void);
|
extern void __glXClearErrorOccured(void);
|
||||||
extern GLboolean __glXErrorOccured(void);
|
extern GLboolean __glXErrorOccured(void);
|
||||||
extern void __glXResetLargeCommandStatus(__GLXclientState*);
|
extern void __glXResetLargeCommandStatus(__GLXclientState*);
|
||||||
|
|
|
@ -65,7 +65,7 @@ of the copyright holder.
|
||||||
|
|
||||||
#include <linux/agpgart.h>
|
#include <linux/agpgart.h>
|
||||||
|
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/agpio.h>
|
#include <sys/agpio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1365,7 +1365,7 @@ do { \
|
||||||
# define write_mem_barrier() /* NOP */
|
# define write_mem_barrier() /* NOP */
|
||||||
|
|
||||||
# if !defined(__SUNPRO_C)
|
# if !defined(__SUNPRO_C)
|
||||||
# if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__)
|
# if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__)
|
||||||
# ifdef GCCUSESGAS
|
# ifdef GCCUSESGAS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
#define BUILD_DATE @BUILD_DATE@
|
#define BUILD_DATE @BUILD_DATE@
|
||||||
|
#define BUILD_TIME @BUILD_TIME@
|
||||||
|
|
|
@ -3004,7 +3004,7 @@ xf86FindPrimaryDevice()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(__sparc) && !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__)
|
#if !defined(__sparc) && !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__arm__)
|
||||||
#include "vgaHW.h"
|
#include "vgaHW.h"
|
||||||
#include "compiler.h"
|
#include "compiler.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -131,9 +131,9 @@ static Bool configInput(IDevPtr inputp, XF86ConfInputPtr conf_input,
|
||||||
static Bool configDisplay(DispPtr displayp, XF86ConfDisplayPtr conf_display);
|
static Bool configDisplay(DispPtr displayp, XF86ConfDisplayPtr conf_display);
|
||||||
static Bool addDefaultModes(MonPtr monitorp);
|
static Bool addDefaultModes(MonPtr monitorp);
|
||||||
#ifdef XF86DRI
|
#ifdef XF86DRI
|
||||||
static Bool configDRI(XF86ConfDRIPtr drip);
|
static void configDRI(XF86ConfDRIPtr drip);
|
||||||
#endif
|
#endif
|
||||||
static Bool configExtensions(XF86ConfExtensionsPtr conf_ext);
|
static void configExtensions(XF86ConfExtensionsPtr conf_ext);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* xf86GetPathElem --
|
* xf86GetPathElem --
|
||||||
|
@ -254,6 +254,7 @@ xf86ModulelistFromConfig(pointer **optlist)
|
||||||
char *ignore[] = { "GLcore", "speedo", "bitmap", "drm", NULL };
|
char *ignore[] = { "GLcore", "speedo", "bitmap", "drm", NULL };
|
||||||
pointer *optarray;
|
pointer *optarray;
|
||||||
XF86LoadPtr modp;
|
XF86LoadPtr modp;
|
||||||
|
Bool found;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* make sure the config file has been parsed and that we have a
|
* make sure the config file has been parsed and that we have a
|
||||||
|
@ -266,35 +267,76 @@ xf86ModulelistFromConfig(pointer **optlist)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xf86configptr->conf_modules) {
|
if (xf86configptr->conf_modules) {
|
||||||
/*
|
/* Walk the disable list and let people know what we've parsed to
|
||||||
* Walk the list of modules in the "Module" section to determine how
|
* not be loaded
|
||||||
* many we have.
|
*/
|
||||||
*/
|
modp = xf86configptr->conf_modules->mod_disable_lst;
|
||||||
modp = xf86configptr->conf_modules->mod_load_lst;
|
while (modp) {
|
||||||
while (modp) {
|
xf86Msg(X_WARNING, "\"%s\" will not be loaded unless you've specified it to be loaded elsewhere.\n", modp->load_name);
|
||||||
for (i = 0; ignore[i]; i++) {
|
modp = (XF86LoadPtr) modp->list.next;
|
||||||
if (strcmp(modp->load_name, ignore[i]) == 0)
|
}
|
||||||
modp->ignore = 1;
|
/*
|
||||||
|
* Walk the default settings table. For each module listed to be
|
||||||
|
* loaded, make sure it's in the mod_load_lst. If it's not, make
|
||||||
|
* sure it's not in the mod_no_load_lst. If it's not disabled,
|
||||||
|
* append it to mod_load_lst
|
||||||
|
*/
|
||||||
|
for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
|
||||||
|
if (ModuleDefaults[i].toLoad == FALSE) {
|
||||||
|
xf86Msg(X_WARNING, "\"%s\" is not to be loaded by default. Skipping.\n", ModuleDefaults[i].name);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
if (!modp->ignore)
|
found = FALSE;
|
||||||
count++;
|
modp = xf86configptr->conf_modules->mod_load_lst;
|
||||||
modp = (XF86LoadPtr) modp->list.next;
|
while (modp) {
|
||||||
}
|
if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) {
|
||||||
|
xf86Msg(X_INFO, "\"%s\" will be loaded. This was enabled by default and also specified in the config file.\n", ModuleDefaults[i].name);
|
||||||
|
found = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
modp = (XF86LoadPtr) modp->list.next;
|
||||||
|
}
|
||||||
|
if (found == FALSE) {
|
||||||
|
modp = xf86configptr->conf_modules->mod_disable_lst;
|
||||||
|
while (modp) {
|
||||||
|
if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) {
|
||||||
|
xf86Msg(X_INFO, "\"%s\" will be loaded even though the default is to disable it.\n", ModuleDefaults[i].name);
|
||||||
|
found = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
modp = (XF86LoadPtr) modp->list.next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found == FALSE) {
|
||||||
|
XF86ConfModulePtr ptr = xf86configptr->conf_modules;
|
||||||
|
ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
|
||||||
|
xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n", ModuleDefaults[i].name);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
xf86configptr->conf_modules = xnfcalloc(1, sizeof(XF86ConfModuleRec));
|
xf86configptr->conf_modules = xnfcalloc(1, sizeof(XF86ConfModuleRec));
|
||||||
|
for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
|
||||||
|
if (ModuleDefaults[i].toLoad == TRUE) {
|
||||||
|
XF86ConfModulePtr ptr = xf86configptr->conf_modules;
|
||||||
|
ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count == 0) {
|
/*
|
||||||
XF86ConfModulePtr ptr = xf86configptr->conf_modules;
|
* Walk the list of modules in the "Module" section to determine how
|
||||||
ptr = xf86addNewLoadDirective(ptr, "extmod", XF86_LOAD_MODULE, NULL);
|
* many we have.
|
||||||
ptr = xf86addNewLoadDirective(ptr, "dbe", XF86_LOAD_MODULE, NULL);
|
*/
|
||||||
ptr = xf86addNewLoadDirective(ptr, "glx", XF86_LOAD_MODULE, NULL);
|
modp = xf86configptr->conf_modules->mod_load_lst;
|
||||||
ptr = xf86addNewLoadDirective(ptr, "freetype", XF86_LOAD_MODULE, NULL);
|
while (modp) {
|
||||||
ptr = xf86addNewLoadDirective(ptr, "type1", XF86_LOAD_MODULE, NULL);
|
for (i = 0; ignore[i]; i++) {
|
||||||
ptr = xf86addNewLoadDirective(ptr, "record", XF86_LOAD_MODULE, NULL);
|
if (strcmp(modp->load_name, ignore[i]) == 0)
|
||||||
ptr = xf86addNewLoadDirective(ptr, "dri", XF86_LOAD_MODULE, NULL);
|
modp->ignore = 1;
|
||||||
count = 7;
|
}
|
||||||
}
|
if (!modp->ignore)
|
||||||
|
count++;
|
||||||
|
modp = (XF86LoadPtr) modp->list.next;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* allocate the memory and walk the list again to fill in the pointers
|
* allocate the memory and walk the list again to fill in the pointers
|
||||||
|
@ -303,22 +345,22 @@ xf86ModulelistFromConfig(pointer **optlist)
|
||||||
optarray = xnfalloc((count + 1) * sizeof(pointer));
|
optarray = xnfalloc((count + 1) * sizeof(pointer));
|
||||||
count = 0;
|
count = 0;
|
||||||
if (xf86configptr->conf_modules) {
|
if (xf86configptr->conf_modules) {
|
||||||
modp = xf86configptr->conf_modules->mod_load_lst;
|
modp = xf86configptr->conf_modules->mod_load_lst;
|
||||||
while (modp) {
|
while (modp) {
|
||||||
if (!modp->ignore) {
|
if (!modp->ignore) {
|
||||||
modulearray[count] = modp->load_name;
|
modulearray[count] = modp->load_name;
|
||||||
optarray[count] = modp->load_opt;
|
optarray[count] = modp->load_opt;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
modp = (XF86LoadPtr) modp->list.next;
|
modp = (XF86LoadPtr) modp->list.next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
modulearray[count] = NULL;
|
modulearray[count] = NULL;
|
||||||
optarray[count] = NULL;
|
optarray[count] = NULL;
|
||||||
if (optlist)
|
if (optlist)
|
||||||
*optlist = optarray;
|
*optlist = optarray;
|
||||||
else
|
else
|
||||||
xfree(optarray);
|
xfree(optarray);
|
||||||
return modulearray;
|
return modulearray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -556,7 +598,7 @@ xf86ConfigError(char *msg, ...)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static void
|
||||||
configFiles(XF86ConfFilesPtr fileconf)
|
configFiles(XF86ConfFilesPtr fileconf)
|
||||||
{
|
{
|
||||||
MessageType pathFrom = X_DEFAULT;
|
MessageType pathFrom = X_DEFAULT;
|
||||||
|
@ -565,16 +607,24 @@ configFiles(XF86ConfFilesPtr fileconf)
|
||||||
char *log_buf;
|
char *log_buf;
|
||||||
|
|
||||||
/* FontPath */
|
/* FontPath */
|
||||||
|
|
||||||
/* Try XF86Config FontPath first */
|
/* Try XF86Config FontPath first */
|
||||||
if (!xf86fpFlag) {
|
if (!xf86fpFlag) {
|
||||||
if (fileconf) {
|
if (fileconf) {
|
||||||
if (fileconf->file_fontpath) {
|
if (fileconf->file_fontpath) {
|
||||||
char *f = xf86ValidateFontPath(fileconf->file_fontpath);
|
char *f = xf86ValidateFontPath(fileconf->file_fontpath);
|
||||||
pathFrom = X_CONFIG;
|
pathFrom = X_CONFIG;
|
||||||
if (*f)
|
if (*f) {
|
||||||
defaultFontPath = f;
|
if (xf86Info.useDefaultFontPath) {
|
||||||
else {
|
xf86Msg(X_DEFAULT, "Including the default font path %s.\n", defaultFontPath);
|
||||||
|
char *g = xnfalloc(strlen(defaultFontPath) + strlen(f) + 3);
|
||||||
|
strcpy(g, f);
|
||||||
|
strcat(g, ",");
|
||||||
|
defaultFontPath = strcat(g, defaultFontPath);
|
||||||
|
xfree(f);
|
||||||
|
} else {
|
||||||
|
defaultFontPath = f;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
xf86Msg(X_WARNING,
|
xf86Msg(X_WARNING,
|
||||||
"FontPath is completely invalid. Using compiled-in default.\n");
|
"FontPath is completely invalid. Using compiled-in default.\n");
|
||||||
fontPath = NULL;
|
fontPath = NULL;
|
||||||
|
@ -582,7 +632,7 @@ configFiles(XF86ConfFilesPtr fileconf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
xf86Msg(X_WARNING,
|
xf86Msg(X_DEFAULT,
|
||||||
"No FontPath specified. Using compiled-in default.\n");
|
"No FontPath specified. Using compiled-in default.\n");
|
||||||
pathFrom = X_DEFAULT;
|
pathFrom = X_DEFAULT;
|
||||||
}
|
}
|
||||||
|
@ -742,6 +792,7 @@ typedef enum {
|
||||||
FLAG_AIGLX,
|
FLAG_AIGLX,
|
||||||
FLAG_IGNORE_ABI,
|
FLAG_IGNORE_ABI,
|
||||||
FLAG_ALLOW_EMPTY_INPUT,
|
FLAG_ALLOW_EMPTY_INPUT,
|
||||||
|
FLAG_USE_DEFAULT_FONT_PATH
|
||||||
} FlagValues;
|
} FlagValues;
|
||||||
|
|
||||||
static OptionInfoRec FlagOptions[] = {
|
static OptionInfoRec FlagOptions[] = {
|
||||||
|
@ -817,6 +868,8 @@ static OptionInfoRec FlagOptions[] = {
|
||||||
{0}, FALSE },
|
{0}, FALSE },
|
||||||
{ FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN,
|
{ FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN,
|
||||||
{0}, FALSE },
|
{0}, FALSE },
|
||||||
|
{ FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN,
|
||||||
|
{0}, FALSE },
|
||||||
{ -1, NULL, OPTV_NONE,
|
{ -1, NULL, OPTV_NONE,
|
||||||
{0}, FALSE },
|
{0}, FALSE },
|
||||||
};
|
};
|
||||||
|
@ -1016,6 +1069,13 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
if (xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &value))
|
if (xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &value))
|
||||||
xf86Info.allowEmptyInput = TRUE;
|
xf86Info.allowEmptyInput = TRUE;
|
||||||
|
|
||||||
|
xf86Info.useDefaultFontPath = TRUE;
|
||||||
|
xf86Info.useDefaultFontPathFrom = X_DEFAULT;
|
||||||
|
if (xf86GetOptValBool(FlagOptions, FLAG_USE_DEFAULT_FONT_PATH, &value)) {
|
||||||
|
xf86Info.useDefaultFontPath = value;
|
||||||
|
xf86Info.useDefaultFontPathFrom = X_CONFIG;
|
||||||
|
}
|
||||||
|
|
||||||
/* Make sure that timers don't overflow CARD32's after multiplying */
|
/* Make sure that timers don't overflow CARD32's after multiplying */
|
||||||
#define MAX_TIME_IN_MIN (0x7fffffff / MILLI_PER_MIN)
|
#define MAX_TIME_IN_MIN (0x7fffffff / MILLI_PER_MIN)
|
||||||
|
|
||||||
|
@ -1414,13 +1474,13 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pointerMsg) {
|
if (pointerMsg) {
|
||||||
xf86Msg(X_WARNING, "The core pointer device wasn't specified "
|
xf86Msg(X_DEFAULT, "The core pointer device wasn't specified "
|
||||||
"explicitly in the layout.\n"
|
"explicitly in the layout.\n"
|
||||||
"\tUsing the %s.\n", pointerMsg);
|
"\tUsing the %s.\n", pointerMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyboardMsg) {
|
if (keyboardMsg) {
|
||||||
xf86Msg(X_WARNING, "The core keyboard device wasn't specified "
|
xf86Msg(X_DEFAULT, "The core keyboard device wasn't specified "
|
||||||
"explicitly in the layout.\n"
|
"explicitly in the layout.\n"
|
||||||
"\tUsing the %s.\n", keyboardMsg);
|
"\tUsing the %s.\n", keyboardMsg);
|
||||||
}
|
}
|
||||||
|
@ -1749,7 +1809,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen)
|
||||||
indp = xnfalloc(sizeof(IDevRec));
|
indp = xnfalloc(sizeof(IDevRec));
|
||||||
indp->identifier = NULL;
|
indp->identifier = NULL;
|
||||||
servlayoutp->inputs = indp;
|
servlayoutp->inputs = indp;
|
||||||
if (!xf86Info.allowEmptyInput && checkCoreInputDevices(servlayoutp, TRUE))
|
if (!xf86Info.allowEmptyInput && !checkCoreInputDevices(servlayoutp, TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1877,7 +1937,7 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defaultMonitor) {
|
if (defaultMonitor) {
|
||||||
xf86Msg(X_WARNING, "No monitor specified for screen \"%s\".\n"
|
xf86Msg(X_DEFAULT, "No monitor specified for screen \"%s\".\n"
|
||||||
"\tUsing a default monitor configuration.\n", screenp->id);
|
"\tUsing a default monitor configuration.\n", screenp->id);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -2168,7 +2228,7 @@ configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef XF86DRI
|
#ifdef XF86DRI
|
||||||
static Bool
|
static void
|
||||||
configDRI(XF86ConfDRIPtr drip)
|
configDRI(XF86ConfDRIPtr drip)
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
@ -2209,12 +2269,10 @@ configDRI(XF86ConfDRIPtr drip)
|
||||||
xf86ConfigDRI.bufs[i].flags = 0;
|
xf86ConfigDRI.bufs[i].flags = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static Bool
|
static void
|
||||||
configExtensions(XF86ConfExtensionsPtr conf_ext)
|
configExtensions(XF86ConfExtensionsPtr conf_ext)
|
||||||
{
|
{
|
||||||
XF86OptionPtr o;
|
XF86OptionPtr o;
|
||||||
|
@ -2249,11 +2307,9 @@ configExtensions(XF86ConfExtensionsPtr conf_ext)
|
||||||
xf86NameCmp(val, "false") == 0) {
|
xf86NameCmp(val, "false") == 0) {
|
||||||
enable = !enable;
|
enable = !enable;
|
||||||
} else {
|
} else {
|
||||||
xf86Msg(X_ERROR,
|
xf86Msg(X_WARNING, "Ignoring unrecognized value \"%s\"\n", val);
|
||||||
"%s is not a valid value for the Extension option\n",
|
|
||||||
val);
|
|
||||||
xfree(n);
|
xfree(n);
|
||||||
return FALSE;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EnableDisableExtension(name, enable)) {
|
if (EnableDisableExtension(name, enable)) {
|
||||||
|
@ -2266,8 +2322,6 @@ configExtensions(XF86ConfExtensionsPtr conf_ext)
|
||||||
xfree(n);
|
xfree(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
@ -2397,7 +2451,7 @@ xf86HandleConfigFile(Bool autoconfig)
|
||||||
|
|
||||||
if (xf86configptr->conf_layout_lst == NULL || xf86ScreenName != NULL) {
|
if (xf86configptr->conf_layout_lst == NULL || xf86ScreenName != NULL) {
|
||||||
if (xf86ScreenName == NULL) {
|
if (xf86ScreenName == NULL) {
|
||||||
xf86Msg(X_WARNING,
|
xf86Msg(X_DEFAULT,
|
||||||
"No Layout section. Using the first Screen section.\n");
|
"No Layout section. Using the first Screen section.\n");
|
||||||
}
|
}
|
||||||
if (!configImpliedLayout(&xf86ConfigLayout,
|
if (!configImpliedLayout(&xf86ConfigLayout,
|
||||||
|
@ -2450,19 +2504,17 @@ xf86HandleConfigFile(Bool autoconfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now process everything else */
|
/* Now process everything else */
|
||||||
|
if (!configServerFlags(xf86configptr->conf_flags,xf86ConfigLayout.options)){
|
||||||
if (!configFiles(xf86configptr->conf_files) ||
|
|
||||||
!configServerFlags(xf86configptr->conf_flags,
|
|
||||||
xf86ConfigLayout.options) ||
|
|
||||||
!configExtensions(xf86configptr->conf_extensions)
|
|
||||||
#ifdef XF86DRI
|
|
||||||
|| !configDRI(xf86configptr->conf_dri)
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
ErrorF ("Problem when converting the config data structures\n");
|
ErrorF ("Problem when converting the config data structures\n");
|
||||||
return CONFIG_PARSE_ERROR;
|
return CONFIG_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configFiles(xf86configptr->conf_files);
|
||||||
|
configExtensions(xf86configptr->conf_extensions);
|
||||||
|
#ifdef XF86DRI
|
||||||
|
configDRI(xf86configptr->conf_dri);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle some command line options that can override some of the
|
* Handle some command line options that can override some of the
|
||||||
* ServerFlags settings.
|
* ServerFlags settings.
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#ifndef _xf86_config_h
|
#ifndef _xf86_config_h
|
||||||
#define _xf86_config_h
|
#define _xf86_config_h
|
||||||
|
|
||||||
|
#include "xf86Optrec.h"
|
||||||
|
|
||||||
#ifdef HAVE_PARSER_DECLS
|
#ifdef HAVE_PARSER_DECLS
|
||||||
/*
|
/*
|
||||||
* global structure that holds the result of parsing the config file
|
* global structure that holds the result of parsing the config file
|
||||||
|
@ -46,6 +48,23 @@ typedef enum _ConfigStatus {
|
||||||
CONFIG_NOFILE
|
CONFIG_NOFILE
|
||||||
} ConfigStatus;
|
} ConfigStatus;
|
||||||
|
|
||||||
|
typedef struct _ModuleDefault {
|
||||||
|
char *name;
|
||||||
|
Bool toLoad;
|
||||||
|
XF86OptionPtr load_opt;
|
||||||
|
} ModuleDefault;
|
||||||
|
|
||||||
|
static ModuleDefault ModuleDefaults[] = {
|
||||||
|
{.name = "extmod", .toLoad = TRUE, .load_opt=NULL},
|
||||||
|
{.name = "dbe", .toLoad = TRUE, .load_opt=NULL},
|
||||||
|
{.name = "glx", .toLoad = TRUE, .load_opt=NULL},
|
||||||
|
{.name = "freetype", .toLoad = TRUE, .load_opt=NULL},
|
||||||
|
{.name = "type1", .toLoad = TRUE, .load_opt=NULL},
|
||||||
|
{.name = "record", .toLoad = TRUE, .load_opt=NULL},
|
||||||
|
{.name = "dri", .toLoad = TRUE, .load_opt=NULL},
|
||||||
|
{.name = NULL, .toLoad = FALSE, .load_opt=NULL}
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* prototypes
|
* prototypes
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1210,31 +1210,3 @@ _X_EXPORT void
|
||||||
DDXRingBell(int volume, int pitch, int duration) {
|
DDXRingBell(int volume, int pitch, int duration) {
|
||||||
xf86OSRingBell(volume, pitch, duration);
|
xf86OSRingBell(volume, pitch, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WSCONS_SUPPORT
|
|
||||||
|
|
||||||
/* XXX Currently XKB is mandatory. */
|
|
||||||
|
|
||||||
extern int WSKbdToKeycode(int);
|
|
||||||
|
|
||||||
void
|
|
||||||
xf86PostWSKbdEvent(struct wscons_event *event)
|
|
||||||
{
|
|
||||||
int type = event->type;
|
|
||||||
int value = event->value;
|
|
||||||
unsigned int keycode;
|
|
||||||
int blocked;
|
|
||||||
|
|
||||||
if (type == WSCONS_EVENT_KEY_UP || type == WSCONS_EVENT_KEY_DOWN) {
|
|
||||||
Bool down = (type == WSCONS_EVENT_KEY_DOWN ? TRUE : FALSE);
|
|
||||||
|
|
||||||
/* map the scancodes to standard XFree86 scancode */
|
|
||||||
keycode = WSKbdToKeycode(value);
|
|
||||||
if (!down) keycode |= 0x80;
|
|
||||||
/* It seems better to block SIGIO there */
|
|
||||||
blocked = xf86BlockSIGIO();
|
|
||||||
xf86PostKbdEvent(keycode);
|
|
||||||
xf86UnblockSIGIO(blocked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* WSCONS_SUPPORT */
|
|
||||||
|
|
|
@ -1730,8 +1730,16 @@ xf86PrintBanner()
|
||||||
t.tm_mday = BUILD_DATE % 100;
|
t.tm_mday = BUILD_DATE % 100;
|
||||||
t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
|
t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
|
||||||
t.tm_year = BUILD_DATE / 10000 - 1900;
|
t.tm_year = BUILD_DATE / 10000 - 1900;
|
||||||
|
#if defined(BUILD_TIME)
|
||||||
|
t.tm_sec = BUILD_TIME % 100;
|
||||||
|
t.tm_min = (BUILD_TIME / 100) % 100;
|
||||||
|
t.tm_hour = (BUILD_TIME / 10000) % 100;
|
||||||
|
if (strftime(buf, sizeof(buf), "%d %B %Y %I:%M:%s%p", &t))
|
||||||
|
ErrorF("Build Date: %s\n", buf);
|
||||||
|
#else
|
||||||
if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
|
if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
|
||||||
ErrorF("Build Date: %s\n", buf);
|
ErrorF("Build Date: %s\n", buf);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(CLOG_DATE) && (CLOG_DATE > 19000000)
|
#if defined(CLOG_DATE) && (CLOG_DATE > 19000000)
|
||||||
|
|
|
@ -1890,7 +1890,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
|
||||||
virtX, virtY, vx, vy);
|
virtX, virtY, vx, vy);
|
||||||
virtX = vx;
|
virtX = vx;
|
||||||
virtY = vy;
|
virtY = vy;
|
||||||
linePitch = miScanLineWidth(vx, vy, linePitch, apertureSize,
|
linePitch = miScanLineWidth(vx, vy, minPitch, apertureSize,
|
||||||
BankFormat, pitchInc);
|
BankFormat, pitchInc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ typedef enum {
|
||||||
*/
|
*/
|
||||||
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3)
|
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3)
|
||||||
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(2, 0)
|
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(2, 0)
|
||||||
#define ABI_XINPUT_VERSION SET_ABI_VERSION(1, 0)
|
#define ABI_XINPUT_VERSION SET_ABI_VERSION(1, 1)
|
||||||
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(0, 3)
|
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(0, 3)
|
||||||
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 5)
|
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 5)
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,8 @@ typedef struct {
|
||||||
MessageType randRFrom;
|
MessageType randRFrom;
|
||||||
Bool aiglx;
|
Bool aiglx;
|
||||||
MessageType aiglxFrom;
|
MessageType aiglxFrom;
|
||||||
|
Bool useDefaultFontPath;
|
||||||
|
MessageType useDefaultFontPathFrom;
|
||||||
Bool ignoreABI;
|
Bool ignoreABI;
|
||||||
struct {
|
struct {
|
||||||
Bool disabled; /* enable/disable deactivating
|
Bool disabled; /* enable/disable deactivating
|
||||||
|
|
|
@ -110,7 +110,7 @@ xf86SendDragEvents(DeviceIntPtr device)
|
||||||
{
|
{
|
||||||
LocalDevicePtr local = (LocalDevicePtr) device->public.devicePrivate;
|
LocalDevicePtr local = (LocalDevicePtr) device->public.devicePrivate;
|
||||||
|
|
||||||
if (device->button->buttonsDown > 0)
|
if (device->button && device->button->buttonsDown > 0)
|
||||||
return (local->flags & XI86_SEND_DRAG_EVENTS);
|
return (local->flags & XI86_SEND_DRAG_EVENTS);
|
||||||
else
|
else
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
|
@ -129,9 +129,11 @@ xf86ProcessCommonOptions(LocalDevicePtr local,
|
||||||
pointer list)
|
pointer list)
|
||||||
{
|
{
|
||||||
if (xf86SetBoolOption(list, "AlwaysCore", 0) ||
|
if (xf86SetBoolOption(list, "AlwaysCore", 0) ||
|
||||||
xf86SetBoolOption(list, "SendCoreEvents", 0) ||
|
!xf86SetBoolOption(list, "SendCoreEvents", 1) ||
|
||||||
xf86SetBoolOption(list, "CorePointer", 0) ||
|
!xf86SetBoolOption(list, "CorePointer", 1) ||
|
||||||
xf86SetBoolOption(list, "CoreKeyboard", 0)) {
|
!xf86SetBoolOption(list, "CoreKeyboard", 1)) {
|
||||||
|
xf86Msg(X_CONFIG, "%s: doesn't report core events\n", local->name);
|
||||||
|
} else {
|
||||||
local->flags |= XI86_ALWAYS_CORE;
|
local->flags |= XI86_ALWAYS_CORE;
|
||||||
xf86Msg(X_CONFIG, "%s: always reports core events\n", local->name);
|
xf86Msg(X_CONFIG, "%s: always reports core events\n", local->name);
|
||||||
}
|
}
|
||||||
|
@ -358,7 +360,7 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
|
||||||
for (option = options; option; option = option->next) {
|
for (option = options; option; option = option->next) {
|
||||||
if (strcmp(option->key, "driver") == 0) {
|
if (strcasecmp(option->key, "driver") == 0) {
|
||||||
if (idev->driver) {
|
if (idev->driver) {
|
||||||
rval = BadRequest;
|
rval = BadRequest;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
|
@ -381,8 +383,8 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (strcmp(option->key, "name") == 0 ||
|
if (strcasecmp(option->key, "name") == 0 ||
|
||||||
strcmp(option->key, "identifier") == 0) {
|
strcasecmp(option->key, "identifier") == 0) {
|
||||||
if (idev->identifier) {
|
if (idev->identifier) {
|
||||||
rval = BadRequest;
|
rval = BadRequest;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
|
@ -445,7 +447,7 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
|
||||||
|
|
||||||
dev = pInfo->dev;
|
dev = pInfo->dev;
|
||||||
ActivateDevice(dev);
|
ActivateDevice(dev);
|
||||||
if (dev->inited && dev->startup)
|
if (dev->inited && dev->startup && xf86Screens[0]->vtSema)
|
||||||
EnableDevice(dev);
|
EnableDevice(dev);
|
||||||
|
|
||||||
if (!IsPointerDevice(dev))
|
if (!IsPointerDevice(dev))
|
||||||
|
@ -505,26 +507,47 @@ xf86PostMotionEvent(DeviceIntPtr device,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
va_list var;
|
va_list var;
|
||||||
int i = 0, nevents = 0;
|
int i = 0;
|
||||||
int dx, dy;
|
static int *valuators = NULL;
|
||||||
Bool drag = xf86SendDragEvents(device);
|
static int n_valuators = 0;
|
||||||
int *valuators = NULL;
|
|
||||||
int flags = 0;
|
|
||||||
xEvent *xE = NULL;
|
|
||||||
int index;
|
|
||||||
|
|
||||||
if (is_absolute)
|
if (num_valuators > n_valuators) {
|
||||||
flags = POINTER_ABSOLUTE;
|
xfree (valuators);
|
||||||
else
|
valuators = NULL;
|
||||||
flags = POINTER_RELATIVE | POINTER_ACCELERATE;
|
}
|
||||||
|
|
||||||
valuators = xcalloc(sizeof(int), num_valuators);
|
if (!valuators) {
|
||||||
|
valuators = xcalloc(sizeof(int), num_valuators);
|
||||||
|
n_valuators = num_valuators;
|
||||||
|
}
|
||||||
|
|
||||||
va_start(var, num_valuators);
|
va_start(var, num_valuators);
|
||||||
for (i = 0; i < num_valuators; i++)
|
for (i = 0; i < num_valuators; i++)
|
||||||
valuators[i] = va_arg(var, int);
|
valuators[i] = va_arg(var, int);
|
||||||
va_end(var);
|
va_end(var);
|
||||||
|
|
||||||
|
xf86PostMotionEventP(device, is_absolute, first_valuator, num_valuators, valuators);
|
||||||
|
}
|
||||||
|
|
||||||
|
_X_EXPORT void
|
||||||
|
xf86PostMotionEventP(DeviceIntPtr device,
|
||||||
|
int is_absolute,
|
||||||
|
int first_valuator,
|
||||||
|
int num_valuators,
|
||||||
|
int *valuators)
|
||||||
|
{
|
||||||
|
int i = 0, nevents = 0;
|
||||||
|
int dx, dy;
|
||||||
|
Bool drag = xf86SendDragEvents(device);
|
||||||
|
xEvent *xE = NULL;
|
||||||
|
int index;
|
||||||
|
int flags = 0;
|
||||||
|
|
||||||
|
if (is_absolute)
|
||||||
|
flags = POINTER_ABSOLUTE;
|
||||||
|
else
|
||||||
|
flags = POINTER_RELATIVE | POINTER_ACCELERATE;
|
||||||
|
|
||||||
#if XFreeXDGA
|
#if XFreeXDGA
|
||||||
if (first_valuator == 0 && num_valuators >= 2) {
|
if (first_valuator == 0 && num_valuators >= 2) {
|
||||||
if (miPointerGetScreen(inputInfo.pointer)) {
|
if (miPointerGetScreen(inputInfo.pointer)) {
|
||||||
|
@ -538,7 +561,7 @@ xf86PostMotionEvent(DeviceIntPtr device,
|
||||||
dy = valuators[1];
|
dy = valuators[1];
|
||||||
}
|
}
|
||||||
if (DGAStealMotionEvent(index, dx, dy))
|
if (DGAStealMotionEvent(index, dx, dy))
|
||||||
goto out;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -560,9 +583,6 @@ xf86PostMotionEvent(DeviceIntPtr device,
|
||||||
mieqEnqueue(device, (xf86Events + i)->event);
|
mieqEnqueue(device, (xf86Events + i)->event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
xfree(valuators);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
|
|
|
@ -164,6 +164,8 @@ extern InputInfoPtr xf86InputDevs;
|
||||||
void InitExtInput(void);
|
void InitExtInput(void);
|
||||||
void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
|
void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
|
||||||
int first_valuator, int num_valuators, ...);
|
int first_valuator, int num_valuators, ...);
|
||||||
|
void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute,
|
||||||
|
int first_valuator, int num_valuators, int *valuators);
|
||||||
void xf86PostProximityEvent(DeviceIntPtr device, int is_in,
|
void xf86PostProximityEvent(DeviceIntPtr device, int is_in,
|
||||||
int first_valuator, int num_valuators, ...);
|
int first_valuator, int num_valuators, ...);
|
||||||
void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button,
|
void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button,
|
||||||
|
|
|
@ -979,6 +979,9 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
|
||||||
winPriv->next = PrivRoot;
|
winPriv->next = PrivRoot;
|
||||||
pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
|
pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
portPriv->pDraw = (DrawablePtr)pWin;
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1375,7 +1378,6 @@ xf86XVPutVideo(
|
||||||
result = xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
|
result = xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
|
||||||
if(result != Success) return result;
|
if(result != Success) return result;
|
||||||
|
|
||||||
portPriv->pDraw = pDraw;
|
|
||||||
portPriv->type = XvInputMask;
|
portPriv->type = XvInputMask;
|
||||||
|
|
||||||
/* save a copy of these parameters */
|
/* save a copy of these parameters */
|
||||||
|
@ -1479,7 +1481,6 @@ xf86XVPutStill(
|
||||||
|
|
||||||
xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
|
xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
|
||||||
portPriv->isOn = XV_ON;
|
portPriv->isOn = XV_ON;
|
||||||
portPriv->pDraw = pDraw;
|
|
||||||
portPriv->drw_x = drw_x; portPriv->drw_y = drw_y;
|
portPriv->drw_x = drw_x; portPriv->drw_y = drw_y;
|
||||||
portPriv->drw_w = drw_w; portPriv->drw_h = drw_h;
|
portPriv->drw_w = drw_w; portPriv->drw_h = drw_h;
|
||||||
portPriv->type = 0; /* no mask means it's transient and should
|
portPriv->type = 0; /* no mask means it's transient and should
|
||||||
|
@ -1529,7 +1530,6 @@ xf86XVGetVideo(
|
||||||
result = xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
|
result = xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
|
||||||
if(result != Success) return result;
|
if(result != Success) return result;
|
||||||
|
|
||||||
portPriv->pDraw = pDraw;
|
|
||||||
portPriv->type = XvOutputMask;
|
portPriv->type = XvOutputMask;
|
||||||
|
|
||||||
/* save a copy of these parameters */
|
/* save a copy of these parameters */
|
||||||
|
@ -1784,7 +1784,6 @@ xf86XVPutImage(
|
||||||
(portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) {
|
(portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) {
|
||||||
|
|
||||||
portPriv->isOn = XV_ON;
|
portPriv->isOn = XV_ON;
|
||||||
portPriv->pDraw = pDraw;
|
|
||||||
portPriv->drw_x = drw_x; portPriv->drw_y = drw_y;
|
portPriv->drw_x = drw_x; portPriv->drw_y = drw_y;
|
||||||
portPriv->drw_w = drw_w; portPriv->drw_h = drw_h;
|
portPriv->drw_w = drw_w; portPriv->drw_h = drw_h;
|
||||||
portPriv->type = 0; /* no mask means it's transient and should
|
portPriv->type = 0; /* no mask means it's transient and should
|
||||||
|
@ -1876,42 +1875,35 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
|
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
|
||||||
{
|
{
|
||||||
XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen);
|
|
||||||
DrawablePtr root = &WindowTable[pScreen->myNum]->drawable;
|
DrawablePtr root = &WindowTable[pScreen->myNum]->drawable;
|
||||||
XID pval[2];
|
XID pval[2];
|
||||||
BoxPtr pbox = REGION_RECTS(clipboxes);
|
BoxPtr pbox = REGION_RECTS(clipboxes);
|
||||||
int i, nbox = REGION_NUM_RECTS(clipboxes);
|
int i, nbox = REGION_NUM_RECTS(clipboxes);
|
||||||
xRectangle *rects;
|
xRectangle *rects;
|
||||||
|
GCPtr gc;
|
||||||
|
|
||||||
if(!xf86Screens[pScreen->myNum]->vtSema) return;
|
if(!xf86Screens[pScreen->myNum]->vtSema) return;
|
||||||
|
|
||||||
if(!ScreenPriv->videoGC) {
|
gc = GetScratchGC(root->depth, pScreen);
|
||||||
int status;
|
pval[0] = key;
|
||||||
pval[0] = key;
|
pval[1] = IncludeInferiors;
|
||||||
pval[1] = IncludeInferiors;
|
(void) ChangeGC(gc, GCForeground|GCSubwindowMode, pval);
|
||||||
ScreenPriv->videoGC = CreateGC(root, GCForeground | GCSubwindowMode,
|
ValidateGC(root, gc);
|
||||||
pval, &status);
|
|
||||||
if(!ScreenPriv->videoGC) return;
|
|
||||||
ValidateGC(root, ScreenPriv->videoGC);
|
|
||||||
} else if (key != ScreenPriv->videoGC->fgPixel){
|
|
||||||
pval[0] = key;
|
|
||||||
ChangeGC(ScreenPriv->videoGC, GCForeground, pval);
|
|
||||||
ValidateGC(root, ScreenPriv->videoGC);
|
|
||||||
}
|
|
||||||
|
|
||||||
rects = ALLOCATE_LOCAL(nbox * sizeof(xRectangle));
|
rects = xalloc (nbox * sizeof(xRectangle));
|
||||||
|
|
||||||
for(i = 0; i < nbox; i++, pbox++) {
|
for(i = 0; i < nbox; i++, pbox++)
|
||||||
|
{
|
||||||
rects[i].x = pbox->x1;
|
rects[i].x = pbox->x1;
|
||||||
rects[i].y = pbox->y1;
|
rects[i].y = pbox->y1;
|
||||||
rects[i].width = pbox->x2 - pbox->x1;
|
rects[i].width = pbox->x2 - pbox->x1;
|
||||||
rects[i].height = pbox->y2 - pbox->y1;
|
rects[i].height = pbox->y2 - pbox->y1;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*ScreenPriv->videoGC->ops->PolyFillRect)(
|
(*gc->ops->PolyFillRect)(root, gc, nbox, rects);
|
||||||
root, ScreenPriv->videoGC, nbox, rects);
|
|
||||||
|
xfree (rects);
|
||||||
DEALLOCATE_LOCAL(rects);
|
FreeScratchGC (gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* xf86XVClipVideoHelper -
|
/* xf86XVClipVideoHelper -
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
sdk_HEADERS = edid.h vdif.h xf86DDC.h
|
sdk_HEADERS = edid.h xf86DDC.h
|
||||||
|
|
||||||
noinst_LIBRARIES = libddc.a
|
noinst_LIBRARIES = libddc.a
|
||||||
|
|
||||||
libddc_a_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \
|
libddc_a_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \
|
||||||
interpret_vdif.c print_vdif.c ddcProperty.c
|
ddcProperty.c
|
||||||
|
|
||||||
INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
|
INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
|
|
||||||
#define EDID1_ATOM_NAME "XFree86_DDC_EDID1_RAWDATA"
|
#define EDID1_ATOM_NAME "XFree86_DDC_EDID1_RAWDATA"
|
||||||
#define EDID2_ATOM_NAME "XFree86_DDC_EDID2_RAWDATA"
|
#define EDID2_ATOM_NAME "XFree86_DDC_EDID2_RAWDATA"
|
||||||
#define VDIF_ATOM_NAME "XFree86_DDC_VDIF_RAWDATA"
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
|
addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
|
||||||
|
@ -103,16 +102,6 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC)
|
||||||
xf86RegisterRootWindowProperty(scrnIndex, EDID2Atom, XA_INTEGER, 8,
|
xf86RegisterRootWindowProperty(scrnIndex, EDID2Atom, XA_INTEGER, 8,
|
||||||
256, (unsigned char *)EDID2rawdata);
|
256, (unsigned char *)EDID2rawdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (DDC->vdif) {
|
|
||||||
#define VDIF_DUMMY_STRING "setting dummy VDIF property - please insert correct values\n"
|
|
||||||
|
|
||||||
VDIFAtom = MakeAtom(VDIF_ATOM_NAME, sizeof(VDIF_ATOM_NAME), TRUE);
|
|
||||||
xf86RegisterRootWindowProperty(scrnIndex, VDIFAtom, XA_STRING, 8,
|
|
||||||
strlen(VDIF_DUMMY_STRING), VDIF_DUMMY_STRING);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#ifndef _EDID_H_
|
#ifndef _EDID_H_
|
||||||
#define _EDID_H_
|
#define _EDID_H_
|
||||||
|
|
||||||
#include "vdif.h"
|
|
||||||
|
|
||||||
/* read complete EDID record */
|
/* read complete EDID record */
|
||||||
#define EDID1_LEN 128
|
#define EDID1_LEN 128
|
||||||
#define BITS_PER_BYTE 9
|
#define BITS_PER_BYTE 9
|
||||||
|
@ -453,7 +451,7 @@ typedef struct {
|
||||||
struct established_timings timings1;
|
struct established_timings timings1;
|
||||||
struct std_timings timings2[8];
|
struct std_timings timings2[8];
|
||||||
struct detailed_monitor_section det_mon[4];
|
struct detailed_monitor_section det_mon[4];
|
||||||
xf86vdifPtr vdif;
|
void *vdif; /* unused */
|
||||||
int no_sections;
|
int no_sections;
|
||||||
Uchar *rawData;
|
Uchar *rawData;
|
||||||
} xf86Monitor, *xf86MonPtr;
|
} xf86Monitor, *xf86MonPtr;
|
||||||
|
|
|
@ -1,132 +0,0 @@
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/Xarch.h>
|
|
||||||
#include "xf86DDC.h"
|
|
||||||
#include "vdif.h"
|
|
||||||
|
|
||||||
static xf86VdifLimitsPtr* get_limits(CARD8 *c);
|
|
||||||
static xf86VdifGammaPtr* get_gamma(CARD8 *c);
|
|
||||||
static xf86VdifTimingPtr* get_timings(CARD8 *c);
|
|
||||||
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
|
||||||
static CARD32 swap_byte_order(CARD32 c);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
xf86vdifPtr
|
|
||||||
xf86InterpretVdif(CARD8 *c)
|
|
||||||
{
|
|
||||||
xf86VdifPtr p = (xf86VdifPtr)c;
|
|
||||||
xf86vdifPtr vdif;
|
|
||||||
int i;
|
|
||||||
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
|
||||||
int length;
|
|
||||||
#endif
|
|
||||||
unsigned long l = 0;
|
|
||||||
|
|
||||||
if (c == NULL) return NULL;
|
|
||||||
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
|
||||||
length = swap_byte_order(p->FileLength);
|
|
||||||
for (i = 0; i < (length >>2); i++)
|
|
||||||
((CARD32*)c)[i] = swap_byte_order(((CARD32*)c)[i]) ;
|
|
||||||
#endif
|
|
||||||
if (p->VDIFId[0] != 'V' || p->VDIFId[1] != 'D' || p->VDIFId[2] != 'I'
|
|
||||||
|| p->VDIFId[3] != 'F') return NULL;
|
|
||||||
for ( i = 12; i < p->FileLength; i++)
|
|
||||||
l += c[i];
|
|
||||||
if ( l != p->Checksum) return NULL;
|
|
||||||
vdif = xalloc(sizeof(xf86vdif));
|
|
||||||
vdif->vdif = p;
|
|
||||||
vdif->limits = get_limits(c);
|
|
||||||
vdif->timings = get_timings(c);
|
|
||||||
vdif->gamma = get_gamma(c);
|
|
||||||
vdif->strings = VDIF_STRING(((xf86VdifPtr)c),0);
|
|
||||||
xfree(c);
|
|
||||||
return vdif;
|
|
||||||
}
|
|
||||||
|
|
||||||
static xf86VdifLimitsPtr*
|
|
||||||
get_limits(CARD8 *c)
|
|
||||||
{
|
|
||||||
int num, i, j;
|
|
||||||
xf86VdifLimitsPtr *pp;
|
|
||||||
xf86VdifLimitsPtr p;
|
|
||||||
|
|
||||||
num = ((xf86VdifPtr)c)->NumberOperationalLimits;
|
|
||||||
pp = xalloc(sizeof(xf86VdifLimitsPtr) * (num+1));
|
|
||||||
p = VDIF_OPERATIONAL_LIMITS(((xf86VdifPtr)c));
|
|
||||||
j = 0;
|
|
||||||
for ( i = 0; i<num; i++) {
|
|
||||||
if (p->Header.ScnTag == VDIF_OPERATIONAL_LIMITS_TAG)
|
|
||||||
pp[j++] = p;
|
|
||||||
VDIF_NEXT_OPERATIONAL_LIMITS(p);
|
|
||||||
}
|
|
||||||
pp[j] = NULL;
|
|
||||||
return pp;
|
|
||||||
}
|
|
||||||
|
|
||||||
static xf86VdifGammaPtr*
|
|
||||||
get_gamma(CARD8 *c)
|
|
||||||
{
|
|
||||||
int num, i, j;
|
|
||||||
xf86VdifGammaPtr *pp;
|
|
||||||
xf86VdifGammaPtr p;
|
|
||||||
|
|
||||||
num = ((xf86VdifPtr)c)->NumberOptions;
|
|
||||||
pp = xalloc(sizeof(xf86VdifGammaPtr) * (num+1));
|
|
||||||
p = (xf86VdifGammaPtr)VDIF_OPTIONS(((xf86VdifPtr)c));
|
|
||||||
j = 0;
|
|
||||||
for ( i = 0; i<num; i++)
|
|
||||||
{
|
|
||||||
if (p->Header.ScnTag == VDIF_GAMMA_TABLE_TAG)
|
|
||||||
pp[j++] = p;
|
|
||||||
VDIF_NEXT_OPTIONS(p);
|
|
||||||
}
|
|
||||||
pp[j] = NULL;
|
|
||||||
return pp;
|
|
||||||
}
|
|
||||||
|
|
||||||
static xf86VdifTimingPtr*
|
|
||||||
get_timings(CARD8 *c)
|
|
||||||
{
|
|
||||||
int num, num_limits;
|
|
||||||
int i,j,k;
|
|
||||||
xf86VdifLimitsPtr lp;
|
|
||||||
xf86VdifTimingPtr *pp;
|
|
||||||
xf86VdifTimingPtr p;
|
|
||||||
|
|
||||||
num = ((xf86VdifPtr)c)->NumberOperationalLimits;
|
|
||||||
lp = VDIF_OPERATIONAL_LIMITS(((xf86VdifPtr)c));
|
|
||||||
num_limits = 0;
|
|
||||||
for (i = 0; i < num; i++) {
|
|
||||||
if (lp->Header.ScnTag == VDIF_OPERATIONAL_LIMITS_TAG)
|
|
||||||
num_limits += lp->NumberPreadjustedTimings;
|
|
||||||
VDIF_NEXT_OPERATIONAL_LIMITS(lp);
|
|
||||||
}
|
|
||||||
pp = xalloc(sizeof(xf86VdifTimingPtr)
|
|
||||||
* (num_limits+1));
|
|
||||||
j = 0;
|
|
||||||
lp = VDIF_OPERATIONAL_LIMITS(((xf86VdifPtr) c));
|
|
||||||
for (i = 0; i < num; i++) {
|
|
||||||
p = VDIF_PREADJUSTED_TIMING(lp);
|
|
||||||
for (k = 0; k < lp->NumberPreadjustedTimings; k++) {
|
|
||||||
if (p->Header.ScnTag == VDIF_PREADJUSTED_TIMING_TAG)
|
|
||||||
pp[j++] = p;
|
|
||||||
VDIF_NEXT_PREADJUSTED_TIMING(p);
|
|
||||||
}
|
|
||||||
VDIF_NEXT_OPERATIONAL_LIMITS(lp);
|
|
||||||
}
|
|
||||||
pp[j] = NULL;
|
|
||||||
return pp;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
|
||||||
static CARD32
|
|
||||||
swap_byte_order(CARD32 c)
|
|
||||||
{
|
|
||||||
return ((c & 0xFF000000) >> 24) | ((c & 0xFF0000) >> 8)
|
|
||||||
| ((c & 0xFF00) << 8) | ((c & 0xFF) << 24);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,225 +0,0 @@
|
||||||
|
|
||||||
#ifdef HAVE_XORG_CONFIG_H
|
|
||||||
#include <xorg-config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "vdif.h"
|
|
||||||
#include "misc.h"
|
|
||||||
#include "xf86DDC.h"
|
|
||||||
|
|
||||||
static void print_vdif(xf86VdifPtr l, char *s);
|
|
||||||
static void print_timings(xf86VdifTimingPtr *pt);
|
|
||||||
static void print_limits(xf86VdifLimitsPtr *pl);
|
|
||||||
static void print_gamma(xf86VdifGammaPtr *pg);
|
|
||||||
static void print_type(CARD8 c);
|
|
||||||
static void print_polarity(CARD8 c);
|
|
||||||
|
|
||||||
void
|
|
||||||
xf86print_vdif(xf86vdifPtr v)
|
|
||||||
{
|
|
||||||
print_vdif(v->vdif,v->strings);
|
|
||||||
print_limits(v->limits);
|
|
||||||
print_timings(v->timings);
|
|
||||||
print_gamma(v->gamma);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
print_vdif(xf86VdifPtr l, char *s)
|
|
||||||
{
|
|
||||||
ErrorF("Version %i.%i",l->VDIFVersion,l->VDIFRevision);
|
|
||||||
ErrorF(" Date: %i/%i/%i, Manufactured: %i/%i/%i\n",l->Date[0],
|
|
||||||
l->Date[1],l->Date[2],l->DateManufactured[0],
|
|
||||||
l->DateManufactured[1],l->DateManufactured[2]);
|
|
||||||
ErrorF("File Revision: %i",l->FileRevision);
|
|
||||||
ErrorF("Manufacturer: %s\n",s + l->Manufacturer);
|
|
||||||
ErrorF("ModelNumber: %s\n",s + l->ModelNumber);
|
|
||||||
ErrorF("VDIFIndex: %s\n",s +l->MinVDIFIndex);
|
|
||||||
ErrorF("Version: %s\n",s + l->Version);
|
|
||||||
ErrorF("SerialNumber %s\n",s + l->SerialNumber);
|
|
||||||
ErrorF("MonitorType: ");
|
|
||||||
switch (l->MonitorType) {
|
|
||||||
case VDIF_MONITOR_MONOCHROME:
|
|
||||||
ErrorF("Mono\n");
|
|
||||||
break;
|
|
||||||
case VDIF_MONITOR_COLOR:
|
|
||||||
ErrorF("Color\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
ErrorF("CRT Size: %i inches\n",l->CRTSize);
|
|
||||||
switch (l->MonitorType) {
|
|
||||||
case VDIF_MONITOR_MONOCHROME:
|
|
||||||
ErrorF("Border: %i percent\n",
|
|
||||||
l->BorderRed);
|
|
||||||
ErrorF("Phosphor Decay: 1: %i,",l->RedPhosphorDecay);
|
|
||||||
if (l->GreenPhosphorDecay !=0)
|
|
||||||
ErrorF(" 2: %i,",l->GreenPhosphorDecay);
|
|
||||||
if (l->BluePhosphorDecay !=0)
|
|
||||||
ErrorF(" 3: %i",l->BluePhosphorDecay);
|
|
||||||
ErrorF(" ms\n");
|
|
||||||
if (l->RedChromaticity_x)
|
|
||||||
ErrorF("Chromaticity: 1: x:%f, y:%f; ",
|
|
||||||
l->RedChromaticity_x/1000.0,l->RedChromaticity_y/1000.0);
|
|
||||||
if (l->GreenChromaticity_x)
|
|
||||||
ErrorF("Chromaticity: 2: x:%f, y:%f; ",
|
|
||||||
l->GreenChromaticity_x/1000.0,l->GreenChromaticity_y/1000.0);
|
|
||||||
if (l->BlueChromaticity_x)
|
|
||||||
ErrorF("Chromaticity: 3: x:%f, y:%f ",
|
|
||||||
l->BlueChromaticity_x/1000.0,l->BlueChromaticity_y/1000.0);
|
|
||||||
ErrorF("\n");
|
|
||||||
ErrorF("Gamma: %f\n",l->RedGamma/1000.0);
|
|
||||||
break;
|
|
||||||
case VDIF_MONITOR_COLOR:
|
|
||||||
ErrorF("Border: Red: %i Green: %i Blue: %i percent\n",
|
|
||||||
l->BorderRed,l->BorderGreen,l->BorderBlue);
|
|
||||||
ErrorF("Phosphor Decay: Red: %i, Green: %i, Blue: %i ms\n",
|
|
||||||
l->RedPhosphorDecay,l->GreenPhosphorDecay,l->BluePhosphorDecay);
|
|
||||||
ErrorF("Chromaticity: Red: x:%f, y:%f; Green: x:%f, y:%f; "
|
|
||||||
"Blue: x:%f, y:%f\n",
|
|
||||||
l->RedChromaticity_x/1000.0,l->RedChromaticity_y/1000.0,
|
|
||||||
l->GreenChromaticity_x/1000.0,l->GreenChromaticity_y/1000.0,
|
|
||||||
l->BlueChromaticity_x/1000.0,l->BlueChromaticity_y/1000.0);
|
|
||||||
ErrorF("Gamma: Red:%f, Green:%f, Blue:%f\n",l->RedGamma/1000.0,
|
|
||||||
l->GreenGamma/1000.0,l->BlueGamma/1000.0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
ErrorF("White Point: x: %f y: %f Y: %f\n",l->WhitePoint_x/1000.0,
|
|
||||||
l->WhitePoint_y/1000.0,l->WhitePoint_Y/1000.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
print_limits(xf86VdifLimitsPtr *pl)
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
xf86VdifLimitsPtr l;
|
|
||||||
|
|
||||||
while((l = pl[i]) != NULL) {
|
|
||||||
ErrorF("Max display resolution: %i x %i pixel\n",l->MaxHorPixel,
|
|
||||||
l->MaxVerPixel);
|
|
||||||
ErrorF("Size of active area: %i x %i millimeters\n",l->MaxHorActiveLength,
|
|
||||||
l->MaxVerActiveHeight);
|
|
||||||
ErrorF("Video Type: ");
|
|
||||||
print_type(l->VideoType);
|
|
||||||
ErrorF("Sync Type: ");
|
|
||||||
print_type(l->SyncType);
|
|
||||||
ErrorF("Sync Configuration ");
|
|
||||||
switch (l->SyncConfiguration) {
|
|
||||||
case VDIF_SYNC_SEPARATE:
|
|
||||||
ErrorF("separate\n");
|
|
||||||
break;
|
|
||||||
case VDIF_SYNC_C:
|
|
||||||
ErrorF("composite C\n");
|
|
||||||
break;
|
|
||||||
case VDIF_SYNC_CP:
|
|
||||||
ErrorF("composite CP\n");
|
|
||||||
break;
|
|
||||||
case VDIF_SYNC_G:
|
|
||||||
ErrorF("composite G\n");
|
|
||||||
break;
|
|
||||||
case VDIF_SYNC_GP:
|
|
||||||
ErrorF("composite GP\n");
|
|
||||||
break;
|
|
||||||
case VDIF_SYNC_OTHER:
|
|
||||||
ErrorF("other\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
ErrorF("Termination Resistance: %i\n",l->TerminationResistance);
|
|
||||||
ErrorF("Levels: white: %i, black: %i, blank: %i, sync: %i mV\n",
|
|
||||||
l->WhiteLevel,l->BlackLevel,l->BlankLevel,l->SyncLevel);
|
|
||||||
ErrorF("Max. Pixel Clock: %f MHz\n",l->MaxPixelClock/1000.0);
|
|
||||||
ErrorF("Freq. Range: Hor.: %f - %f kHz, Ver.: %f - %f Hz\n",
|
|
||||||
l->MaxHorFrequency/1000.0,l->MinHorFrequency/1000.0,
|
|
||||||
l->MaxVerFrequency/1000.0,l->MinVerFrequency/1000.0);
|
|
||||||
ErrorF("Retrace time: Hor: %f us, Ver: %f ms\n",l->MinHorRetrace/1000.0,
|
|
||||||
l->MinVerRetrace/1000.0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
print_timings(xf86VdifTimingPtr *pt)
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
xf86VdifTimingPtr t;
|
|
||||||
|
|
||||||
while((t = pt[i]) != NULL) {
|
|
||||||
ErrorF("SVGA / SVPMI mode number: %i\n",t->PreadjustedTimingName);
|
|
||||||
ErrorF("Mode %i x %i\n",t->HorPixel,t->VerPixel);
|
|
||||||
ErrorF("Size: %i x %i mm\n",t->HorAddrLength,t->VerAddrHeight);
|
|
||||||
ErrorF("Ratios: %i/%i\n",t->PixelWidthRatio,t->PixelHeightRatio);
|
|
||||||
ErrorF("Character width: %i",t->CharacterWidth);
|
|
||||||
ErrorF("Clock: %f MHz HFreq.: %f kHz, VFreq: %f Hz\n",t->PixelClock/1000.0,
|
|
||||||
t->HorFrequency/1000.0,t->VerFrequency/1000.0);
|
|
||||||
ErrorF("Htotal: %f us, Vtotal %f ms\n", t->HorTotalTime/1000.0,
|
|
||||||
t->VerTotalTime/1000.0);
|
|
||||||
ErrorF("HDisp: %f, HBlankStart: %f, HBlankLength: %f, "
|
|
||||||
"HSyncStart: %f HSyncEnd: %f us\n",t->HorAddrTime/1000.0,
|
|
||||||
t->HorBlankStart/1000.0,t->HorBlankTime/1000.0,
|
|
||||||
t->HorSyncStart/1000.0,t->HorSyncTime/1000.0);
|
|
||||||
ErrorF("VDisp: %f, VBlankStart: %f, VBlankLength: %f, "
|
|
||||||
"VSyncStart: %f VSyncEnd: %f us\n",t->VerAddrTime/1000.0,
|
|
||||||
t->VerBlankStart/1000.0,t->VerBlankTime/1000.0,
|
|
||||||
t->VerSyncStart/1000.0,t->VerSyncTime/1000.0);
|
|
||||||
ErrorF("Scan Type: ");
|
|
||||||
switch (t->ScanType) {
|
|
||||||
case VDIF_SCAN_INTERLACED:
|
|
||||||
ErrorF("interlaced ");
|
|
||||||
break;
|
|
||||||
case VDIF_SCAN_NONINTERLACED:
|
|
||||||
ErrorF("non interlaced ");
|
|
||||||
break;
|
|
||||||
case VDIF_SCAN_OTHER:
|
|
||||||
ErrorF("other ");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
ErrorF("Polarity: H: ");
|
|
||||||
print_polarity(t->HorSyncPolarity);
|
|
||||||
ErrorF("V: ");
|
|
||||||
print_polarity(t->VerSyncPolarity);
|
|
||||||
ErrorF("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
print_gamma(xf86VdifGammaPtr *pg)
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
xf86VdifGammaPtr g;
|
|
||||||
|
|
||||||
while((g = pg[i]) != NULL) {
|
|
||||||
ErrorF("Gamma Table Entries: %i\n",g->GammaTableEntries);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
print_type(CARD8 c)
|
|
||||||
{
|
|
||||||
switch (c) {
|
|
||||||
case VDIF_VIDEO_TTL :
|
|
||||||
ErrorF("TTL\n");
|
|
||||||
break;
|
|
||||||
case VDIF_VIDEO_ANALOG :
|
|
||||||
ErrorF("Analog\n");
|
|
||||||
break;
|
|
||||||
case VDIF_VIDEO_ECL:
|
|
||||||
ErrorF("ECL\n");
|
|
||||||
break;
|
|
||||||
case VDIF_VIDEO_DECL:
|
|
||||||
ErrorF("DECL\n");
|
|
||||||
break;
|
|
||||||
case VDIF_VIDEO_OTHER:
|
|
||||||
ErrorF("other\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
print_polarity(CARD8 c)
|
|
||||||
{
|
|
||||||
switch (c) {
|
|
||||||
case VDIF_POLARITY_NEGATIVE:
|
|
||||||
ErrorF(" Neg.");
|
|
||||||
break;
|
|
||||||
case VDIF_POLARITY_POSITIVE:
|
|
||||||
ErrorF(" Pos.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,174 +0,0 @@
|
||||||
|
|
||||||
#ifndef _VDIF_H
|
|
||||||
#define _VDIF_H
|
|
||||||
|
|
||||||
#define VDIF_MONITOR_MONOCHROME 0
|
|
||||||
#define VDIF_MONITOR_COLOR 1
|
|
||||||
#define VDIF_VIDEO_TTL 0
|
|
||||||
#define VDIF_VIDEO_ANALOG 1
|
|
||||||
#define VDIF_VIDEO_ECL 2
|
|
||||||
#define VDIF_VIDEO_DECL 3
|
|
||||||
#define VDIF_VIDEO_OTHER 4
|
|
||||||
#define VDIF_SYNC_SEPARATE 0
|
|
||||||
#define VDIF_SYNC_C 1
|
|
||||||
#define VDIF_SYNC_CP 2
|
|
||||||
#define VDIF_SYNC_G 3
|
|
||||||
#define VDIF_SYNC_GP 4
|
|
||||||
#define VDIF_SYNC_OTHER 5
|
|
||||||
#define VDIF_SCAN_NONINTERLACED 0
|
|
||||||
#define VDIF_SCAN_INTERLACED 1
|
|
||||||
#define VDIF_SCAN_OTHER 2
|
|
||||||
#define VDIF_POLARITY_NEGATIVE 0
|
|
||||||
#define VDIF_POLARITY_POSITIVE 1
|
|
||||||
|
|
||||||
#include <X11/Xmd.h>
|
|
||||||
|
|
||||||
#undef CARD32
|
|
||||||
#define CARD32 unsigned int /* ... on all supported platforms */
|
|
||||||
|
|
||||||
typedef struct _VDIF { /* Monitor Description: */
|
|
||||||
CARD8 VDIFId[4]; /* alway "VDIF" */
|
|
||||||
CARD32 FileLength; /* lenght of the whole file */
|
|
||||||
CARD32 Checksum; /* sum of all bytes in the file after*/
|
|
||||||
/* this field */
|
|
||||||
CARD16 VDIFVersion; /* structure version number */
|
|
||||||
CARD16 VDIFRevision; /* structure revision number */
|
|
||||||
CARD16 Date[3]; /* file date Year/Month/Day */
|
|
||||||
CARD16 DateManufactured[3]; /* date Year/Month/Day */
|
|
||||||
CARD32 FileRevision; /* file revision string */
|
|
||||||
CARD32 Manufacturer; /* ASCII ID of the manufacturer */
|
|
||||||
CARD32 ModelNumber; /* ASCII ID of the model */
|
|
||||||
CARD32 MinVDIFIndex; /* ASCII ID of Minimum VDIF index */
|
|
||||||
CARD32 Version; /* ASCII ID of the model version */
|
|
||||||
CARD32 SerialNumber; /* ASCII ID of the serial number */
|
|
||||||
CARD8 MonitorType; /* Monochrome or Color */
|
|
||||||
CARD8 CRTSize; /* inches */
|
|
||||||
CARD8 BorderRed; /* percent */
|
|
||||||
CARD8 BorderGreen; /* percent */
|
|
||||||
CARD8 BorderBlue; /* percent */
|
|
||||||
CARD8 Reserved1; /* padding */
|
|
||||||
CARD16 Reserved2; /* padding */
|
|
||||||
CARD32 RedPhosphorDecay; /* microseconds */
|
|
||||||
CARD32 GreenPhosphorDecay; /* microseconds */
|
|
||||||
CARD32 BluePhosphorDecay; /* microseconds */
|
|
||||||
CARD16 WhitePoint_x; /* WhitePoint in CIExyY (scale 1000) */
|
|
||||||
CARD16 WhitePoint_y;
|
|
||||||
CARD16 WhitePoint_Y;
|
|
||||||
CARD16 RedChromaticity_x; /* Red chromaticity in x,y */
|
|
||||||
CARD16 RedChromaticity_y;
|
|
||||||
CARD16 GreenChromaticity_x; /* Green chromaticity in x,y */
|
|
||||||
CARD16 GreenChromaticity_y;
|
|
||||||
CARD16 BlueChromaticity_x; /* Blue chromaticity in x,y */
|
|
||||||
CARD16 BlueChromaticity_y;
|
|
||||||
CARD16 RedGamma; /* Gamme curve exponent (scale 1000) */
|
|
||||||
CARD16 GreenGamma;
|
|
||||||
CARD16 BlueGamma;
|
|
||||||
CARD32 NumberOperationalLimits;
|
|
||||||
CARD32 OffsetOperationalLimits;
|
|
||||||
CARD32 NumberOptions; /* optinal sections (gamma table) */
|
|
||||||
CARD32 OffsetOptions;
|
|
||||||
CARD32 OffsetStringTable;
|
|
||||||
} xf86VdifRec, *xf86VdifPtr;
|
|
||||||
|
|
||||||
typedef enum { /* Tags for section identification */
|
|
||||||
VDIF_OPERATIONAL_LIMITS_TAG = 1,
|
|
||||||
VDIF_PREADJUSTED_TIMING_TAG,
|
|
||||||
VDIF_GAMMA_TABLE_TAG
|
|
||||||
} VDIFScnTag;
|
|
||||||
|
|
||||||
typedef struct _VDIFScnHdr { /* Generic Section Header: */
|
|
||||||
CARD32 ScnLength; /* lenght of section */
|
|
||||||
CARD32 ScnTag; /* tag for section identification */
|
|
||||||
} VDIFScnHdrRec, *VDIFScnHdrPtr;
|
|
||||||
|
|
||||||
typedef struct _VDIFLimits { /* Operational Limits: */
|
|
||||||
VDIFScnHdrRec Header; /* common section info */
|
|
||||||
CARD16 MaxHorPixel; /* pixels */
|
|
||||||
CARD16 MaxVerPixel; /* lines */
|
|
||||||
CARD16 MaxHorActiveLength; /* millimeters */
|
|
||||||
CARD16 MaxVerActiveHeight; /* millimeters */
|
|
||||||
CARD8 VideoType; /* TTL / Analog / ECL / DECL */
|
|
||||||
CARD8 SyncType; /* TTL / Analog / ECL / DECL */
|
|
||||||
CARD8 SyncConfiguration; /* separate / composite / other */
|
|
||||||
CARD8 Reserved1; /* padding */
|
|
||||||
CARD16 Reserved2; /* padding */
|
|
||||||
CARD16 TerminationResistance; /* */
|
|
||||||
CARD16 WhiteLevel; /* millivolts */
|
|
||||||
CARD16 BlackLevel; /* millivolts */
|
|
||||||
CARD16 BlankLevel; /* millivolts */
|
|
||||||
CARD16 SyncLevel; /* millivolts */
|
|
||||||
CARD32 MaxPixelClock; /* kiloHertz */
|
|
||||||
CARD32 MinHorFrequency; /* Hertz */
|
|
||||||
CARD32 MaxHorFrequency; /* Hertz */
|
|
||||||
CARD32 MinVerFrequency; /* milliHertz */
|
|
||||||
CARD32 MaxVerFrequency; /* milliHertz */
|
|
||||||
CARD16 MinHorRetrace; /* nanoseconds */
|
|
||||||
CARD16 MinVerRetrace; /* microseconds */
|
|
||||||
CARD32 NumberPreadjustedTimings;
|
|
||||||
CARD32 OffsetNextLimits;
|
|
||||||
} xf86VdifLimitsRec, *xf86VdifLimitsPtr;
|
|
||||||
|
|
||||||
typedef struct _VDIFTiming { /* Preadjusted Timing: */
|
|
||||||
VDIFScnHdrRec Header; /* common section info */
|
|
||||||
CARD32 PreadjustedTimingName; /* SVGA/SVPMI mode number */
|
|
||||||
CARD16 HorPixel; /* pixels */
|
|
||||||
CARD16 VerPixel; /* lines */
|
|
||||||
CARD16 HorAddrLength; /* millimeters */
|
|
||||||
CARD16 VerAddrHeight; /* millimeters */
|
|
||||||
CARD8 PixelWidthRatio; /* gives H:V */
|
|
||||||
CARD8 PixelHeightRatio;
|
|
||||||
CARD8 Reserved1; /* padding */
|
|
||||||
CARD8 ScanType; /* noninterlaced / interlaced / other*/
|
|
||||||
CARD8 HorSyncPolarity; /* negative / positive */
|
|
||||||
CARD8 VerSyncPolarity; /* negative / positive */
|
|
||||||
CARD16 CharacterWidth; /* pixels */
|
|
||||||
CARD32 PixelClock; /* kiloHertz */
|
|
||||||
CARD32 HorFrequency; /* Hertz */
|
|
||||||
CARD32 VerFrequency; /* milliHertz */
|
|
||||||
CARD32 HorTotalTime; /* nanoseconds */
|
|
||||||
CARD32 VerTotalTime; /* microseconds */
|
|
||||||
CARD16 HorAddrTime; /* nanoseconds */
|
|
||||||
CARD16 HorBlankStart; /* nanoseconds */
|
|
||||||
CARD16 HorBlankTime; /* nanoseconds */
|
|
||||||
CARD16 HorSyncStart; /* nanoseconds */
|
|
||||||
CARD16 HorSyncTime; /* nanoseconds */
|
|
||||||
CARD16 VerAddrTime; /* microseconds */
|
|
||||||
CARD16 VerBlankStart; /* microseconds */
|
|
||||||
CARD16 VerBlankTime; /* microseconds */
|
|
||||||
CARD16 VerSyncStart; /* microseconds */
|
|
||||||
CARD16 VerSyncTime; /* microseconds */
|
|
||||||
} xf86VdifTimingRec, *xf86VdifTimingPtr;
|
|
||||||
|
|
||||||
typedef struct _VDIFGamma { /* Gamma Table: */
|
|
||||||
VDIFScnHdrRec Header; /* common section info */
|
|
||||||
CARD16 GammaTableEntries; /* count of grays or RGB 3-tuples */
|
|
||||||
CARD16 Unused1;
|
|
||||||
} xf86VdifGammaRec, *xf86VdifGammaPtr;
|
|
||||||
|
|
||||||
/* access macros */
|
|
||||||
#define VDIF_OPERATIONAL_LIMITS(vdif) \
|
|
||||||
((xf86VdifLimitsPtr)((char*)(vdif) + (vdif)->OffsetOperationalLimits))
|
|
||||||
#define VDIF_NEXT_OPERATIONAL_LIMITS(limits) limits = \
|
|
||||||
((xf86VdifLimitsPtr)((char*)(limits) + (limits)->OffsetNextLimits))
|
|
||||||
#define VDIF_PREADJUSTED_TIMING(limits) \
|
|
||||||
((xf86VdifTimingPtr)((char*)(limits) + (limits)->Header.ScnLength))
|
|
||||||
#define VDIF_NEXT_PREADJUSTED_TIMING(timing) timing = \
|
|
||||||
((xf86VdifTimingPtr)((char*)(timing) + (timing)->Header.ScnLength))
|
|
||||||
#define VDIF_OPTIONS(vdif) \
|
|
||||||
((VDIFScnHdrPtr)((char*)(vdif) + (vdif)->OffsetOptions))
|
|
||||||
#define VDIF_NEXT_OPTIONS(options) options = \
|
|
||||||
((xf86VdifGammaPtr)((char*)(options) + (options)->Header.ScnLength))
|
|
||||||
#define VDIF_STRING(vdif, string) \
|
|
||||||
((char*)((char*)vdif + vdif->OffsetStringTable + (string)))
|
|
||||||
|
|
||||||
typedef struct _vdif {
|
|
||||||
xf86VdifPtr vdif;
|
|
||||||
xf86VdifLimitsPtr *limits;
|
|
||||||
xf86VdifTimingPtr *timings;
|
|
||||||
xf86VdifGammaPtr *gamma;
|
|
||||||
char * strings;
|
|
||||||
} xf86vdif, *xf86vdifPtr;
|
|
||||||
|
|
||||||
#undef CARD32
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -38,12 +38,6 @@ static unsigned char* EDID1Read_DDC2(
|
||||||
I2CBusPtr pBus
|
I2CBusPtr pBus
|
||||||
);
|
);
|
||||||
|
|
||||||
static unsigned char * VDIFRead(
|
|
||||||
int scrnIndex,
|
|
||||||
I2CBusPtr pBus,
|
|
||||||
int start
|
|
||||||
);
|
|
||||||
|
|
||||||
static unsigned char * DDCRead_DDC2(
|
static unsigned char * DDCRead_DDC2(
|
||||||
int scrnIndex,
|
int scrnIndex,
|
||||||
I2CBusPtr pBus,
|
I2CBusPtr pBus,
|
||||||
|
@ -138,7 +132,6 @@ xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
||||||
unsigned char *EDID_block = NULL;
|
unsigned char *EDID_block = NULL;
|
||||||
unsigned char *VDIF_Block = NULL;
|
|
||||||
xf86MonPtr tmp = NULL;
|
xf86MonPtr tmp = NULL;
|
||||||
/* Default DDC and DDC2 to enabled. */
|
/* Default DDC and DDC2 to enabled. */
|
||||||
Bool noddc = FALSE, noddc2 = FALSE;
|
Bool noddc = FALSE, noddc2 = FALSE;
|
||||||
|
@ -171,11 +164,6 @@ xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
|
||||||
else
|
else
|
||||||
ErrorF("Sections to follow: %i\n",tmp->no_sections);
|
ErrorF("Sections to follow: %i\n",tmp->no_sections);
|
||||||
#endif
|
#endif
|
||||||
if (tmp) {
|
|
||||||
VDIF_Block =
|
|
||||||
VDIFRead(scrnIndex, pBus, EDID1_LEN * (tmp->no_sections + 1));
|
|
||||||
tmp->vdif = xf86InterpretVdif(VDIF_Block);
|
|
||||||
}
|
|
||||||
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
@ -253,35 +241,6 @@ EDID1Read_DDC2(int scrnIndex, I2CBusPtr pBus)
|
||||||
return DDCRead_DDC2(scrnIndex, pBus, 0, EDID1_LEN);
|
return DDCRead_DDC2(scrnIndex, pBus, 0, EDID1_LEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned char*
|
|
||||||
VDIFRead(int scrnIndex, I2CBusPtr pBus, int start)
|
|
||||||
{
|
|
||||||
unsigned char * Buffer, *v_buffer = NULL, *v_bufferp = NULL;
|
|
||||||
int i, num = 0;
|
|
||||||
|
|
||||||
/* read VDIF length in 64 byte blocks */
|
|
||||||
Buffer = DDCRead_DDC2(scrnIndex, pBus,start,64);
|
|
||||||
if (Buffer == NULL)
|
|
||||||
return NULL;
|
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("number of 64 bit blocks: %i\n",Buffer[0]);
|
|
||||||
#endif
|
|
||||||
if ((num = Buffer[0]) > 0)
|
|
||||||
v_buffer = v_bufferp = xalloc(sizeof(unsigned char) * 64 * num);
|
|
||||||
|
|
||||||
for (i = 0; i < num; i++) {
|
|
||||||
Buffer = DDCRead_DDC2(scrnIndex, pBus,start,64);
|
|
||||||
if (Buffer == NULL) {
|
|
||||||
xfree (v_buffer);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
memcpy(v_bufferp,Buffer,63); /* 64th byte is checksum */
|
|
||||||
xfree(Buffer);
|
|
||||||
v_bufferp += 63;
|
|
||||||
}
|
|
||||||
return v_buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
static unsigned char *
|
static unsigned char *
|
||||||
DDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len)
|
DDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,10 +43,6 @@ extern xf86MonPtr xf86InterpretEDID(
|
||||||
int screenIndex, Uchar *block
|
int screenIndex, Uchar *block
|
||||||
);
|
);
|
||||||
|
|
||||||
extern xf86vdifPtr xf86InterpretVdif(
|
|
||||||
CARD8 *c
|
|
||||||
);
|
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC);
|
xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC);
|
||||||
|
|
||||||
|
@ -55,10 +51,6 @@ extern Bool xf86SetDDCproperties(
|
||||||
xf86MonPtr DDC
|
xf86MonPtr DDC
|
||||||
);
|
);
|
||||||
|
|
||||||
extern void xf86print_vdif(
|
|
||||||
xf86vdifPtr v
|
|
||||||
);
|
|
||||||
|
|
||||||
DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
|
DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -45,9 +45,6 @@ fontsmodule_LTLIBRARIES = libfreetype.la \
|
||||||
|
|
||||||
AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
|
AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
|
||||||
INCLUDES = @XORG_INCS@ \
|
INCLUDES = @XORG_INCS@ \
|
||||||
-I$(top_srcdir)/afb \
|
|
||||||
-I$(top_srcdir)/cfb \
|
|
||||||
-I$(top_srcdir)/mfb \
|
|
||||||
-I$(top_srcdir)/dbe \
|
-I$(top_srcdir)/dbe \
|
||||||
-I$(top_srcdir)/hw/xfree86/loader \
|
-I$(top_srcdir)/hw/xfree86/loader \
|
||||||
-I$(top_srcdir)/miext/shadow \
|
-I$(top_srcdir)/miext/shadow \
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "xf86Module.h"
|
#include "xf86Module.h"
|
||||||
#include "afb.h"
|
|
||||||
|
|
||||||
static MODULESETUPPROTO(afbSetup);
|
static MODULESETUPPROTO(afbSetup);
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,7 @@
|
||||||
#include <xorg-config.h>
|
#include <xorg-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PSZ 32
|
|
||||||
|
|
||||||
#include "xf86Module.h"
|
#include "xf86Module.h"
|
||||||
#include "cfb.h"
|
|
||||||
|
|
||||||
static MODULESETUPPROTO(cfb32Setup);
|
static MODULESETUPPROTO(cfb32Setup);
|
||||||
|
|
||||||
|
|
|
@ -28,10 +28,7 @@
|
||||||
#include <xorg-config.h>
|
#include <xorg-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PSZ 8
|
|
||||||
|
|
||||||
#include "xf86Module.h"
|
#include "xf86Module.h"
|
||||||
#include "cfb.h"
|
|
||||||
|
|
||||||
static MODULESETUPPROTO(cfbSetup);
|
static MODULESETUPPROTO(cfbSetup);
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1519,13 +1519,18 @@ DRIGetDrawableInfo(ScreenPtr pScreen,
|
||||||
if (x1 > pScreen->width) x1 = pScreen->width;
|
if (x1 > pScreen->width) x1 = pScreen->width;
|
||||||
if (y1 > pScreen->height) y1 = pScreen->height;
|
if (y1 > pScreen->height) y1 = pScreen->height;
|
||||||
|
|
||||||
pDRIPriv->private_buffer_rect.x1 = x0;
|
if (y0 >= y1 || x0 >= x1) {
|
||||||
pDRIPriv->private_buffer_rect.y1 = y0;
|
*numBackClipRects = 0;
|
||||||
pDRIPriv->private_buffer_rect.x2 = x1;
|
*pBackClipRects = NULL;
|
||||||
pDRIPriv->private_buffer_rect.y2 = y1;
|
} else {
|
||||||
|
pDRIPriv->private_buffer_rect.x1 = x0;
|
||||||
|
pDRIPriv->private_buffer_rect.y1 = y0;
|
||||||
|
pDRIPriv->private_buffer_rect.x2 = x1;
|
||||||
|
pDRIPriv->private_buffer_rect.y2 = y1;
|
||||||
|
|
||||||
*numBackClipRects = 1;
|
*numBackClipRects = 1;
|
||||||
*pBackClipRects = &(pDRIPriv->private_buffer_rect);
|
*pBackClipRects = &(pDRIPriv->private_buffer_rect);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Use the frontbuffer cliprects for back buffers. */
|
/* Use the frontbuffer cliprects for back buffers. */
|
||||||
*numBackClipRects = 0;
|
*numBackClipRects = 0;
|
||||||
|
@ -1864,11 +1869,15 @@ DRITreeTraversal(WindowPtr pWin, pointer data)
|
||||||
if(pDRIDrawablePriv) {
|
if(pDRIDrawablePriv) {
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||||
RegionPtr reg = (RegionPtr)data;
|
|
||||||
|
|
||||||
REGION_UNION(pScreen, reg, reg, &(pWin->clipList));
|
if(REGION_NUM_RECTS(&(pWin->clipList)) > 0) {
|
||||||
|
RegionPtr reg = (RegionPtr)data;
|
||||||
|
|
||||||
if(pDRIPriv->nrWindows == 1)
|
REGION_UNION(pScreen, reg, reg, &(pWin->clipList));
|
||||||
|
pDRIPriv->nrWalked++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pDRIPriv->nrWindows == pDRIPriv->nrWalked)
|
||||||
return WT_STOPWALKING;
|
return WT_STOPWALKING;
|
||||||
}
|
}
|
||||||
return WT_WALKCHILDREN;
|
return WT_WALKCHILDREN;
|
||||||
|
@ -1886,6 +1895,7 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
RegionRec reg;
|
RegionRec reg;
|
||||||
|
|
||||||
REGION_NULL(pScreen, ®);
|
REGION_NULL(pScreen, ®);
|
||||||
|
pDRIPriv->nrWalked = 0;
|
||||||
TraverseTree(pWin, DRITreeTraversal, (pointer)(®));
|
TraverseTree(pWin, DRITreeTraversal, (pointer)(®));
|
||||||
|
|
||||||
if(REGION_NOTEMPTY(pScreen, ®)) {
|
if(REGION_NOTEMPTY(pScreen, ®)) {
|
||||||
|
@ -2211,6 +2221,19 @@ DRIGetContext(ScreenPtr pScreen)
|
||||||
return pDRIPriv->myContext;
|
return pDRIPriv->myContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DRIGetTexOffsetFuncs(ScreenPtr pScreen,
|
||||||
|
DRITexOffsetStartProcPtr *texOffsetStartFunc,
|
||||||
|
DRITexOffsetFinishProcPtr *texOffsetFinishFunc)
|
||||||
|
{
|
||||||
|
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||||
|
|
||||||
|
if (!pDRIPriv) return;
|
||||||
|
|
||||||
|
*texOffsetStartFunc = pDRIPriv->pDriverInfo->texOffsetStart;
|
||||||
|
*texOffsetFinishFunc = pDRIPriv->pDriverInfo->texOffsetFinish;
|
||||||
|
}
|
||||||
|
|
||||||
/* This lets get at the unwrapped functions so that they can correctly
|
/* This lets get at the unwrapped functions so that they can correctly
|
||||||
* call the lowerlevel functions, and choose whether they will be
|
* call the lowerlevel functions, and choose whether they will be
|
||||||
* called at every level of recursion (eg in validatetree).
|
* called at every level of recursion (eg in validatetree).
|
||||||
|
|
|
@ -107,9 +107,12 @@ typedef struct {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DRIINFO_MAJOR_VERSION 5
|
#define DRIINFO_MAJOR_VERSION 5
|
||||||
#define DRIINFO_MINOR_VERSION 2
|
#define DRIINFO_MINOR_VERSION 3
|
||||||
#define DRIINFO_PATCH_VERSION 0
|
#define DRIINFO_PATCH_VERSION 0
|
||||||
|
|
||||||
|
typedef unsigned long long (*DRITexOffsetStartProcPtr)(PixmapPtr pPix);
|
||||||
|
typedef void (*DRITexOffsetFinishProcPtr)(PixmapPtr pPix);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* driver call back functions
|
/* driver call back functions
|
||||||
*
|
*
|
||||||
|
@ -180,6 +183,10 @@ typedef struct {
|
||||||
/* New with DRI version 5.2.0 */
|
/* New with DRI version 5.2.0 */
|
||||||
Bool allocSarea;
|
Bool allocSarea;
|
||||||
Bool keepFDOpen;
|
Bool keepFDOpen;
|
||||||
|
|
||||||
|
/* New with DRI version 5.3.0 */
|
||||||
|
DRITexOffsetStartProcPtr texOffsetStart;
|
||||||
|
DRITexOffsetFinishProcPtr texOffsetFinish;
|
||||||
} DRIInfoRec, *DRIInfoPtr;
|
} DRIInfoRec, *DRIInfoPtr;
|
||||||
|
|
||||||
|
|
||||||
|
@ -358,7 +365,9 @@ extern void *DRIMasterSareaPointer(ScrnInfoPtr pScrn);
|
||||||
|
|
||||||
extern drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn);
|
extern drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn);
|
||||||
|
|
||||||
|
extern void DRIGetTexOffsetFuncs(ScreenPtr pScreen,
|
||||||
|
DRITexOffsetStartProcPtr *texOffsetStartFunc,
|
||||||
|
DRITexOffsetFinishProcPtr *texOffsetFinishFunc);
|
||||||
|
|
||||||
#define _DRI_H_
|
#define _DRI_H_
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,6 @@ driSetup(pointer module, pointer opts, int *errmaj, int *errmin)
|
||||||
drmSetServerInfo(&DRIDRMServerInfo);
|
drmSetServerInfo(&DRIDRMServerInfo);
|
||||||
|
|
||||||
/* Need a non-NULL return value to indicate success */
|
/* Need a non-NULL return value to indicate success */
|
||||||
return 1;
|
return (pointer)1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -452,7 +452,7 @@ ProcXF86DRIGetDrawableInfo(
|
||||||
xXF86DRIGetDrawableInfoReply rep;
|
xXF86DRIGetDrawableInfoReply rep;
|
||||||
DrawablePtr pDrawable;
|
DrawablePtr pDrawable;
|
||||||
int X, Y, W, H;
|
int X, Y, W, H;
|
||||||
drm_clip_rect_t * pClipRects;
|
drm_clip_rect_t * pClipRects, *pClippedRects;
|
||||||
drm_clip_rect_t * pBackClipRects;
|
drm_clip_rect_t * pBackClipRects;
|
||||||
int backX, backY, rc;
|
int backX, backY, rc;
|
||||||
|
|
||||||
|
@ -502,8 +502,35 @@ ProcXF86DRIGetDrawableInfo(
|
||||||
if (rep.numBackClipRects)
|
if (rep.numBackClipRects)
|
||||||
rep.length += sizeof(drm_clip_rect_t) * rep.numBackClipRects;
|
rep.length += sizeof(drm_clip_rect_t) * rep.numBackClipRects;
|
||||||
|
|
||||||
if (rep.numClipRects)
|
pClippedRects = pClipRects;
|
||||||
|
|
||||||
|
if (rep.numClipRects) {
|
||||||
|
/* Clip cliprects to screen dimensions (redirected windows) */
|
||||||
|
pClippedRects = xalloc(rep.numClipRects * sizeof(drm_clip_rect_t));
|
||||||
|
|
||||||
|
if (pClippedRects) {
|
||||||
|
ScreenPtr pScreen = screenInfo.screens[stuff->screen];
|
||||||
|
int i, j;
|
||||||
|
|
||||||
|
for (i = 0, j = 0; i < rep.numClipRects; i++) {
|
||||||
|
pClippedRects[j].x1 = max(pClipRects[i].x1, 0);
|
||||||
|
pClippedRects[j].y1 = max(pClipRects[i].y1, 0);
|
||||||
|
pClippedRects[j].x2 = min(pClipRects[i].x2, pScreen->width);
|
||||||
|
pClippedRects[j].y2 = min(pClipRects[i].y2, pScreen->height);
|
||||||
|
|
||||||
|
if (pClippedRects[j].x1 < pClippedRects[j].x2 &&
|
||||||
|
pClippedRects[j].y1 < pClippedRects[j].y2) {
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rep.numClipRects = j;
|
||||||
|
} else {
|
||||||
|
rep.numClipRects = 0;
|
||||||
|
}
|
||||||
|
|
||||||
rep.length += sizeof(drm_clip_rect_t) * rep.numClipRects;
|
rep.length += sizeof(drm_clip_rect_t) * rep.numClipRects;
|
||||||
|
}
|
||||||
|
|
||||||
rep.length = ((rep.length + 3) & ~3) >> 2;
|
rep.length = ((rep.length + 3) & ~3) >> 2;
|
||||||
|
|
||||||
|
@ -512,7 +539,8 @@ ProcXF86DRIGetDrawableInfo(
|
||||||
if (rep.numClipRects) {
|
if (rep.numClipRects) {
|
||||||
WriteToClient(client,
|
WriteToClient(client,
|
||||||
sizeof(drm_clip_rect_t) * rep.numClipRects,
|
sizeof(drm_clip_rect_t) * rep.numClipRects,
|
||||||
(char *)pClipRects);
|
(char *)pClippedRects);
|
||||||
|
xfree(pClippedRects);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rep.numBackClipRects) {
|
if (rep.numBackClipRects) {
|
||||||
|
|
|
@ -96,6 +96,11 @@
|
||||||
#endif
|
#endif
|
||||||
#include "xf86DDC.h"
|
#include "xf86DDC.h"
|
||||||
#include "edid.h"
|
#include "edid.h"
|
||||||
|
#include "xf86Cursor.h"
|
||||||
|
#include "xf86RamDac.h"
|
||||||
|
#include "BT.h"
|
||||||
|
#include "IBM.h"
|
||||||
|
#include "TI.h"
|
||||||
|
|
||||||
#include "xf86RamDac.h"
|
#include "xf86RamDac.h"
|
||||||
#include "BT.h"
|
#include "BT.h"
|
||||||
|
@ -1234,8 +1239,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
|
||||||
SYMFUNC(xf86DoEDID_DDC2)
|
SYMFUNC(xf86DoEDID_DDC2)
|
||||||
SYMFUNC(xf86InterpretEDID)
|
SYMFUNC(xf86InterpretEDID)
|
||||||
SYMFUNC(xf86PrintEDID)
|
SYMFUNC(xf86PrintEDID)
|
||||||
SYMFUNC(xf86InterpretVdif)
|
|
||||||
SYMFUNC(xf86print_vdif)
|
|
||||||
SYMFUNC(xf86DDCMonitorSet)
|
SYMFUNC(xf86DDCMonitorSet)
|
||||||
SYMFUNC(xf86SetDDCproperties)
|
SYMFUNC(xf86SetDDCproperties)
|
||||||
|
|
||||||
|
@ -1259,13 +1262,49 @@ _X_HIDDEN void *xfree86LookupTab[] = {
|
||||||
SYMFUNC(xf86I2CWriteVec)
|
SYMFUNC(xf86I2CWriteVec)
|
||||||
SYMFUNC(xf86I2CWriteWord)
|
SYMFUNC(xf86I2CWriteWord)
|
||||||
|
|
||||||
/* ramdac */
|
/* ramdac/xf86RamDac.c */
|
||||||
SYMFUNC(RamDacInit)
|
|
||||||
SYMFUNC(RamDacCreateInfoRec)
|
SYMFUNC(RamDacCreateInfoRec)
|
||||||
SYMFUNC(RamDacDestroyInfoRec)
|
|
||||||
SYMFUNC(RamDacHelperCreateInfoRec)
|
SYMFUNC(RamDacHelperCreateInfoRec)
|
||||||
SYMFUNC(RamDacFreeRec)
|
SYMFUNC(RamDacDestroyInfoRec)
|
||||||
|
SYMFUNC(RamDacHelperDestroyInfoRec)
|
||||||
|
SYMFUNC(RamDacInit)
|
||||||
SYMFUNC(RamDacHandleColormaps)
|
SYMFUNC(RamDacHandleColormaps)
|
||||||
|
SYMFUNC(RamDacFreeRec)
|
||||||
SYMFUNC(RamDacGetHWIndex)
|
SYMFUNC(RamDacGetHWIndex)
|
||||||
|
SYMVAR(RamDacHWPrivateIndex)
|
||||||
|
SYMVAR(RamDacScreenPrivateIndex)
|
||||||
|
|
||||||
|
/* ramdac/xf86Cursor.c */
|
||||||
|
SYMFUNC(xf86InitCursor)
|
||||||
|
SYMFUNC(xf86CreateCursorInfoRec)
|
||||||
|
SYMFUNC(xf86DestroyCursorInfoRec)
|
||||||
|
SYMFUNC(xf86ForceHWCursor)
|
||||||
|
|
||||||
|
/* ramdac/BT.c */
|
||||||
SYMFUNC(BTramdacProbe)
|
SYMFUNC(BTramdacProbe)
|
||||||
|
SYMFUNC(BTramdacSave)
|
||||||
|
SYMFUNC(BTramdacRestore)
|
||||||
|
SYMFUNC(BTramdacSetBpp)
|
||||||
|
|
||||||
|
/* ramdac/IBM.c */
|
||||||
|
SYMFUNC(IBMramdacProbe)
|
||||||
|
SYMFUNC(IBMramdacSave)
|
||||||
|
SYMFUNC(IBMramdacRestore)
|
||||||
|
SYMFUNC(IBMramdac526SetBpp)
|
||||||
|
SYMFUNC(IBMramdac640SetBpp)
|
||||||
|
SYMFUNC(IBMramdac526CalculateMNPCForClock)
|
||||||
|
SYMFUNC(IBMramdac640CalculateMNPCForClock)
|
||||||
|
SYMFUNC(IBMramdac526HWCursorInit)
|
||||||
|
SYMFUNC(IBMramdac640HWCursorInit)
|
||||||
|
SYMFUNC(IBMramdac526SetBppWeak)
|
||||||
|
|
||||||
|
/* ramdac/TI.c */
|
||||||
|
SYMFUNC(TIramdacCalculateMNPForClock)
|
||||||
|
SYMFUNC(TIramdacProbe)
|
||||||
|
SYMFUNC(TIramdacSave)
|
||||||
|
SYMFUNC(TIramdacRestore)
|
||||||
|
SYMFUNC(TIramdac3026SetBpp)
|
||||||
|
SYMFUNC(TIramdac3030SetBpp)
|
||||||
|
SYMFUNC(TIramdacHWCursorInit)
|
||||||
|
SYMFUNC(TIramdacLoadPalette)
|
||||||
};
|
};
|
||||||
|
|
|
@ -1217,8 +1217,15 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
|
||||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
int o;
|
int o;
|
||||||
|
|
||||||
if (maxX == 0 || maxY == 0)
|
/* When canGrow was TRUE in the initial configuration we have to
|
||||||
xf86RandR12GetOriginalVirtualSize (scrn, &maxX, &maxY);
|
* compare against the maximum values so that we don't drop modes.
|
||||||
|
* When canGrow was FALSE, the maximum values would have been clamped
|
||||||
|
* anyway.
|
||||||
|
*/
|
||||||
|
if (maxX == 0 || maxY == 0) {
|
||||||
|
maxX = config->maxWidth;
|
||||||
|
maxY = config->maxHeight;
|
||||||
|
}
|
||||||
|
|
||||||
/* Elide duplicate modes before defaulting code uses them */
|
/* Elide duplicate modes before defaulting code uses them */
|
||||||
xf86PruneDuplicateMonitorModes (scrn->monitor);
|
xf86PruneDuplicateMonitorModes (scrn->monitor);
|
||||||
|
@ -1723,8 +1730,26 @@ Bool
|
||||||
xf86SetDesiredModes (ScrnInfoPtr scrn)
|
xf86SetDesiredModes (ScrnInfoPtr scrn)
|
||||||
{
|
{
|
||||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
int c;
|
int c, o;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Turn off everything so mode setting is done
|
||||||
|
* with hardware in a consistent state
|
||||||
|
*/
|
||||||
|
for (o = 0; o < config->num_output; o++)
|
||||||
|
{
|
||||||
|
xf86OutputPtr output = config->output[o];
|
||||||
|
(*output->funcs->dpms)(output, DPMSModeOff);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (c = 0; c < config->num_crtc; c++)
|
||||||
|
{
|
||||||
|
xf86CrtcPtr crtc = config->crtc[c];
|
||||||
|
|
||||||
|
crtc->funcs->dpms(crtc, DPMSModeOff);
|
||||||
|
memset(&crtc->mode, 0, sizeof(crtc->mode));
|
||||||
|
}
|
||||||
|
|
||||||
for (c = 0; c < config->num_crtc; c++)
|
for (c = 0; c < config->num_crtc; c++)
|
||||||
{
|
{
|
||||||
xf86CrtcPtr crtc = config->crtc[c];
|
xf86CrtcPtr crtc = config->crtc[c];
|
||||||
|
|
|
@ -562,6 +562,10 @@ typedef struct _xf86CrtcConfig {
|
||||||
OptionInfoPtr options;
|
OptionInfoPtr options;
|
||||||
|
|
||||||
Bool debug_modes;
|
Bool debug_modes;
|
||||||
|
|
||||||
|
/* wrap screen BlockHandler for rotation */
|
||||||
|
ScreenBlockHandlerProcPtr BlockHandler;
|
||||||
|
|
||||||
} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
|
} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
|
||||||
|
|
||||||
extern int xf86CrtcConfigPrivateIndex;
|
extern int xf86CrtcConfigPrivateIndex;
|
||||||
|
|
|
@ -71,7 +71,11 @@ static Bool quirk_dt_sync_hm_vp (int scrnIndex, xf86MonPtr DDC)
|
||||||
if (memcmp (DDC->vendor.name, "VSC", 4) == 0 &&
|
if (memcmp (DDC->vendor.name, "VSC", 4) == 0 &&
|
||||||
DDC->vendor.prod_id == 58653)
|
DDC->vendor.prod_id == 58653)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
/* Samsung SyncMaster 205BW */
|
||||||
|
if (memcmp (DDC->vendor.name, "SAM", 4) == 0 &&
|
||||||
|
DDC->vendor.prod_id == 541)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -264,7 +264,7 @@ xf86RotatePrepare (ScreenPtr pScreen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static Bool
|
||||||
xf86RotateRedisplay(ScreenPtr pScreen)
|
xf86RotateRedisplay(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||||
|
@ -273,7 +273,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
||||||
RegionPtr region;
|
RegionPtr region;
|
||||||
|
|
||||||
if (!damage)
|
if (!damage)
|
||||||
return;
|
return FALSE;
|
||||||
xf86RotatePrepare (pScreen);
|
xf86RotatePrepare (pScreen);
|
||||||
region = DamageRegion(damage);
|
region = DamageRegion(damage);
|
||||||
if (REGION_NOTEMPTY(pScreen, region))
|
if (REGION_NOTEMPTY(pScreen, region))
|
||||||
|
@ -317,19 +317,25 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
||||||
pScreen->SourceValidate = SourceValidate;
|
pScreen->SourceValidate = SourceValidate;
|
||||||
DamageEmpty(damage);
|
DamageEmpty(damage);
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xf86RotateBlockHandler(pointer data, OSTimePtr pTimeout, pointer pRead)
|
xf86RotateBlockHandler(int screenNum, pointer blockData,
|
||||||
|
pointer pTimeout, pointer pReadmask)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = (ScreenPtr) data;
|
ScreenPtr pScreen = screenInfo.screens[screenNum];
|
||||||
|
ScrnInfoPtr pScrn = xf86Screens[screenNum];
|
||||||
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
|
|
||||||
xf86RotateRedisplay(pScreen);
|
pScreen->BlockHandler = xf86_config->BlockHandler;
|
||||||
}
|
(*pScreen->BlockHandler) (screenNum, blockData, pTimeout, pReadmask);
|
||||||
|
if (xf86RotateRedisplay(pScreen))
|
||||||
static void
|
{
|
||||||
xf86RotateWakeupHandler(pointer data, int i, pointer LastSelectMask)
|
/* Re-wrap if rotation is still happening */
|
||||||
{
|
xf86_config->BlockHandler = pScreen->BlockHandler;
|
||||||
|
pScreen->BlockHandler = xf86RotateBlockHandler;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -367,10 +373,6 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
|
||||||
}
|
}
|
||||||
DamageDestroy (xf86_config->rotation_damage);
|
DamageDestroy (xf86_config->rotation_damage);
|
||||||
xf86_config->rotation_damage = NULL;
|
xf86_config->rotation_damage = NULL;
|
||||||
/* Free block/wakeup handler */
|
|
||||||
RemoveBlockAndWakeupHandlers (xf86RotateBlockHandler,
|
|
||||||
xf86RotateWakeupHandler,
|
|
||||||
(pointer) pScreen);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,20 +442,12 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
|
||||||
if (!xf86_config->rotation_damage)
|
if (!xf86_config->rotation_damage)
|
||||||
goto bail2;
|
goto bail2;
|
||||||
|
|
||||||
/* Assign block/wakeup handler */
|
/* Wrap block handler */
|
||||||
if (!RegisterBlockAndWakeupHandlers (xf86RotateBlockHandler,
|
xf86_config->BlockHandler = pScreen->BlockHandler;
|
||||||
xf86RotateWakeupHandler,
|
pScreen->BlockHandler = xf86RotateBlockHandler;
|
||||||
(pointer) pScreen))
|
|
||||||
{
|
|
||||||
goto bail3;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (0)
|
if (0)
|
||||||
{
|
{
|
||||||
bail3:
|
|
||||||
DamageDestroy (xf86_config->rotation_damage);
|
|
||||||
xf86_config->rotation_damage = NULL;
|
|
||||||
|
|
||||||
bail2:
|
bail2:
|
||||||
if (shadow || shadowData)
|
if (shadow || shadowData)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <xorg-config.h>
|
#include <xorg-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
|
#if defined (SYSCONS_SUPPORT)
|
||||||
#include <sys/kbio.h>
|
#include <sys/kbio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ xf86OSRingBell(int loudness, int pitch, int duration)
|
||||||
wsb.pitch = pitch;
|
wsb.pitch = pitch;
|
||||||
wsb.period = duration;
|
wsb.period = duration;
|
||||||
wsb.volume = loudness;
|
wsb.volume = loudness;
|
||||||
ioctl(KBD_FD(xf86Info), WSKBDIO_COMPLEXBELL,
|
ioctl(xf86Info.consoleFd, WSKBDIO_COMPLEXBELL,
|
||||||
&wsb);
|
&wsb);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -50,6 +50,11 @@
|
||||||
#include <machine/mtrr.h>
|
#include <machine/mtrr.h>
|
||||||
#include <machine/sysarch.h>
|
#include <machine/sysarch.h>
|
||||||
#include <sys/queue.h>
|
#include <sys/queue.h>
|
||||||
|
#ifdef __x86_64__
|
||||||
|
#define i386_set_mtrr x86_64_set_mtrr
|
||||||
|
#define i386_get_mtrr x86_64_get_mtrr
|
||||||
|
#define i386_iopl x86_64_iopl
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__OpenBSD__) && defined(__amd64__)
|
#if defined(__OpenBSD__) && defined(__amd64__)
|
||||||
|
|
|
@ -327,7 +327,7 @@
|
||||||
# define INCLUDE_XF86_MAP_PCI_MEM
|
# define INCLUDE_XF86_MAP_PCI_MEM
|
||||||
# define INCLUDE_XF86_NO_DOMAIN
|
# define INCLUDE_XF86_NO_DOMAIN
|
||||||
# endif
|
# endif
|
||||||
# if !defined(__FreeBSD__)
|
# if !defined(__FreeBSD__) && !defined(linux)
|
||||||
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
|
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
|
||||||
# endif
|
# endif
|
||||||
#elif defined(__amd64__) || defined(__amd64)
|
#elif defined(__amd64__) || defined(__amd64)
|
||||||
|
|
|
@ -788,8 +788,10 @@ xf86ReadDomainMemory(PCITAG Tag, ADDRESS Base, int Len, unsigned char *Buf)
|
||||||
write(fd, "1", 2);
|
write(fd, "1", 2);
|
||||||
lseek(fd, 0, SEEK_SET);
|
lseek(fd, 0, SEEK_SET);
|
||||||
|
|
||||||
|
len = min(Len, st.st_size);
|
||||||
|
|
||||||
/* copy the ROM until we hit Len, EOF or read error */
|
/* copy the ROM until we hit Len, EOF or read error */
|
||||||
for (i = 0; i < Len && read(fd, Buf, 1) > 0; Buf++, i++)
|
for (; len && (size = read(fd, Buf, len)) > 0 ; Buf+=size, len-=size)
|
||||||
;
|
;
|
||||||
|
|
||||||
write(fd, "0", 2);
|
write(fd, "0", 2);
|
||||||
|
|
|
@ -117,49 +117,29 @@ xf86LinearVidMem()
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* I/O Permissions section
|
* I/O Permissions section
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
mach_port_t io_port;
|
|
||||||
|
/*
|
||||||
|
* Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare
|
||||||
|
* this.
|
||||||
|
*/
|
||||||
|
extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on);
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
xf86EnableIO()
|
xf86EnableIO()
|
||||||
{
|
{
|
||||||
mach_port_t device;
|
if (ioperm(0, 0xffff, 1)) {
|
||||||
kern_return_t err;
|
FatalError("xf86EnableIO: ioperm() failed (%s)\n", strerror(errno));
|
||||||
|
return FALSE;
|
||||||
err = get_privileged_ports(NULL, &device);
|
|
||||||
if( err )
|
|
||||||
{
|
|
||||||
errno = err;
|
|
||||||
FatalError("xf86EnableIO() can't get_privileged_ports. (%s)\n",strerror(errno));
|
|
||||||
}
|
|
||||||
err = device_open(device,D_READ|D_WRITE,"io",&io_port);
|
|
||||||
mach_port_deallocate(mach_task_self(), device);
|
|
||||||
if( err )
|
|
||||||
{
|
|
||||||
errno = err;
|
|
||||||
FatalError("xf86EnableIO() can't device_open. (%s)\n",strerror(errno));
|
|
||||||
}
|
|
||||||
|
|
||||||
err = i386_io_port_add(mach_thread_self (), io_port);
|
|
||||||
if( err )
|
|
||||||
{
|
|
||||||
errno = err;
|
|
||||||
FatalError("xf86EnableIO() can't i386_io_port_add.(io_port) (%s)\n",strerror(errno));
|
|
||||||
}
|
}
|
||||||
|
ioperm(0x40,4,0); /* trap access to the timer chip */
|
||||||
|
ioperm(0x60,4,0); /* trap access to the keyboard controller */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xf86DisableIO()
|
xf86DisableIO()
|
||||||
{
|
{
|
||||||
kern_return_t err;
|
ioperm(0,0xffff,0);
|
||||||
|
|
||||||
err = i386_io_port_remove(mach_thread_self (), io_port);
|
|
||||||
if( err )
|
|
||||||
{
|
|
||||||
errno = err;
|
|
||||||
FatalError("xf86DisableIO() can't i386_io_port_remove.(io_port) (%s)\n",strerror(errno));
|
|
||||||
}
|
|
||||||
mach_port_deallocate(mach_task_self(), io_port);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,8 @@ static Bool ExtendedEnabled = FALSE;
|
||||||
#elif !defined(__powerpc__) && \
|
#elif !defined(__powerpc__) && \
|
||||||
!defined(__mc68000__) && \
|
!defined(__mc68000__) && \
|
||||||
!defined(__sparc__) && \
|
!defined(__sparc__) && \
|
||||||
!defined(__mips__)
|
!defined(__mips__) && \
|
||||||
|
!defined(__arm__)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare
|
* Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare
|
||||||
|
@ -567,7 +568,7 @@ xf86EnableIO(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__)
|
#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__)
|
||||||
if (ioperm(0, 1024, 1) || iopl(3)) {
|
if (ioperm(0, 1024, 1) || iopl(3)) {
|
||||||
if (errno == ENODEV)
|
if (errno == ENODEV)
|
||||||
ErrorF("xf86EnableIOPorts: no I/O ports found\n");
|
ErrorF("xf86EnableIOPorts: no I/O ports found\n");
|
||||||
|
@ -603,73 +604,21 @@ xf86DisableIO(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
/***************************************************************************/
|
* Don't use these two functions. They can't possibly work. If you actually
|
||||||
/* Interrupt Handling section */
|
* need interrupts off for something, you ought to be doing it in the kernel
|
||||||
/***************************************************************************/
|
* anyway.
|
||||||
|
*/
|
||||||
/* XXX The #ifdefs should be made simpler. */
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
xf86DisableInterrupts()
|
xf86DisableInterrupts()
|
||||||
{
|
{
|
||||||
#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
|
|
||||||
if (!ExtendedEnabled)
|
|
||||||
if (iopl(3) || ioperm(0, 1024, 1))
|
|
||||||
return (FALSE);
|
|
||||||
#endif
|
|
||||||
#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || defined(__sparc__) || defined(__mips__) || defined(__arm__) || defined(__sh__) || defined(__ia64__) || defined(__hppa__) || defined(__s390__)
|
|
||||||
#else
|
|
||||||
# ifdef __GNUC__
|
|
||||||
# if defined(__ia64__)
|
|
||||||
# if 0
|
|
||||||
__asm__ __volatile__ (";; rsm psr.i;; srlz.d" ::: "memory");
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
__asm__ __volatile__("cli");
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
asm("cli");
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__ia64__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
|
|
||||||
if (!ExtendedEnabled) {
|
|
||||||
iopl(0);
|
|
||||||
ioperm(0, 1024, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
xf86EnableInterrupts()
|
xf86EnableInterrupts()
|
||||||
{
|
{
|
||||||
#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
|
|
||||||
if (!ExtendedEnabled)
|
|
||||||
if (iopl(3) || ioperm(0, 1024, 1))
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || defined(__sparc__) || defined(__mips__) || defined(__arm__) || defined(__sh__) || defined(__ia64__) || defined(__hppa__) || defined(__s390__)
|
|
||||||
#else
|
|
||||||
# ifdef __GNUC__
|
|
||||||
# if defined(__ia64__)
|
|
||||||
# if 0
|
|
||||||
__asm__ __volatile__ (";; ssm psr.i;; srlz.d" ::: "memory");
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
__asm__ __volatile__("sti");
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
asm("sti");
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__ia64__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
|
|
||||||
if (!ExtendedEnabled) {
|
|
||||||
iopl(0);
|
|
||||||
ioperm(0, 1024, 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,8 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
|
||||||
#if !defined(__sparc__) && \
|
#if !defined(__sparc__) && \
|
||||||
!defined(__powerpc__) && \
|
!defined(__powerpc__) && \
|
||||||
!defined(__mips__) && \
|
!defined(__mips__) && \
|
||||||
!defined(__ia64__)
|
!defined(__ia64__) && \
|
||||||
|
!defined(__arm__)
|
||||||
outb(0x80, 0x00);
|
outb(0x80, 0x00);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,7 @@ static xf86ConfigSymTabRec ModuleTab[] =
|
||||||
{
|
{
|
||||||
{ENDSECTION, "endsection"},
|
{ENDSECTION, "endsection"},
|
||||||
{LOAD, "load"},
|
{LOAD, "load"},
|
||||||
|
{DISABLE, "disable"},
|
||||||
{LOAD_DRIVER, "loaddriver"},
|
{LOAD_DRIVER, "loaddriver"},
|
||||||
{SUBSECTION, "subsection"},
|
{SUBSECTION, "subsection"},
|
||||||
{-1, ""},
|
{-1, ""},
|
||||||
|
@ -141,6 +142,13 @@ xf86parseModuleSection (void)
|
||||||
xf86addNewLoadDirective (ptr->mod_load_lst, val.str,
|
xf86addNewLoadDirective (ptr->mod_load_lst, val.str,
|
||||||
XF86_LOAD_MODULE, NULL);
|
XF86_LOAD_MODULE, NULL);
|
||||||
break;
|
break;
|
||||||
|
case DISABLE:
|
||||||
|
if (xf86getSubToken (&(ptr->mod_comment)) != STRING)
|
||||||
|
Error (QUOTE_MSG, "Disable");
|
||||||
|
ptr->mod_disable_lst =
|
||||||
|
xf86addNewLoadDirective (ptr->mod_disable_lst, val.str,
|
||||||
|
XF86_DISABLE_MODULE, NULL);
|
||||||
|
break;
|
||||||
case LOAD_DRIVER:
|
case LOAD_DRIVER:
|
||||||
if (xf86getSubToken (&(ptr->mod_comment)) != STRING)
|
if (xf86getSubToken (&(ptr->mod_comment)) != STRING)
|
||||||
Error (QUOTE_MSG, "LoadDriver");
|
Error (QUOTE_MSG, "LoadDriver");
|
||||||
|
@ -257,6 +265,15 @@ xf86freeModules (XF86ConfModulePtr ptr)
|
||||||
lptr = lptr->list.next;
|
lptr = lptr->list.next;
|
||||||
xf86conffree (prev);
|
xf86conffree (prev);
|
||||||
}
|
}
|
||||||
|
lptr = ptr->mod_disable_lst;
|
||||||
|
while (lptr)
|
||||||
|
{
|
||||||
|
TestFree (lptr->load_name);
|
||||||
|
TestFree (lptr->load_comment);
|
||||||
|
prev = lptr;
|
||||||
|
lptr = lptr->list.next;
|
||||||
|
xf86conffree (prev);
|
||||||
|
}
|
||||||
TestFree (ptr->mod_comment);
|
TestFree (ptr->mod_comment);
|
||||||
xf86conffree (ptr);
|
xf86conffree (ptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,7 @@ XF86ConfFilesRec, *XF86ConfFilesPtr;
|
||||||
/* Values for load_type */
|
/* Values for load_type */
|
||||||
#define XF86_LOAD_MODULE 0
|
#define XF86_LOAD_MODULE 0
|
||||||
#define XF86_LOAD_DRIVER 1
|
#define XF86_LOAD_DRIVER 1
|
||||||
|
#define XF86_DISABLE_MODULE 2
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -97,6 +98,7 @@ XF86LoadRec, *XF86LoadPtr;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
XF86LoadPtr mod_load_lst;
|
XF86LoadPtr mod_load_lst;
|
||||||
|
XF86LoadPtr mod_disable_lst;
|
||||||
char *mod_comment;
|
char *mod_comment;
|
||||||
}
|
}
|
||||||
XF86ConfModuleRec, *XF86ConfModulePtr;
|
XF86ConfModuleRec, *XF86ConfModulePtr;
|
||||||
|
|
|
@ -170,6 +170,7 @@ typedef enum {
|
||||||
/* Module tokens */
|
/* Module tokens */
|
||||||
LOAD,
|
LOAD,
|
||||||
LOAD_DRIVER,
|
LOAD_DRIVER,
|
||||||
|
DISABLE,
|
||||||
|
|
||||||
/* Device tokens */
|
/* Device tokens */
|
||||||
DRIVER,
|
DRIVER,
|
||||||
|
|
|
@ -32,10 +32,6 @@ Original mi code written by Keith Packard.
|
||||||
#include "xaa.h"
|
#include "xaa.h"
|
||||||
#include "xaalocal.h"
|
#include "xaalocal.h"
|
||||||
|
|
||||||
#ifdef ICEILTEMPDECL
|
|
||||||
ICEILTEMPDECL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DRAW_POINT(pScrn, x, y) \
|
#define DRAW_POINT(pScrn, x, y) \
|
||||||
if(hardClip) (*infoRec->SubsequentSolidFillRect)(pScrn, x, y, 1, 1); \
|
if(hardClip) (*infoRec->SubsequentSolidFillRect)(pScrn, x, y, 1, 1); \
|
||||||
else XAAPointHelper(pScrn, x, y)
|
else XAAPointHelper(pScrn, x, y)
|
||||||
|
|
|
@ -177,7 +177,7 @@ xglCompositeGeneral (CARD8 op,
|
||||||
{
|
{
|
||||||
if (!pSrc->transform && pSrc->filter != PictFilterConvolution)
|
if (!pSrc->transform && pSrc->filter != PictFilterConvolution)
|
||||||
{
|
{
|
||||||
if (pSrc->pDrawable && pSrc->repeat == RepeatNormal)
|
if (pSrc->pDrawable && pSrc->repeatType == RepeatNormal)
|
||||||
{
|
{
|
||||||
XGL_PIXMAP_PRIV ((PixmapPtr) pSrc->pDrawable);
|
XGL_PIXMAP_PRIV ((PixmapPtr) pSrc->pDrawable);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.\" $Xorg: Xnest.man,v 1.3 2000/08/17 19:53:28 cpqbld Exp $
|
.\" $Xorg: Xnest.man,v 1.3 2000/08/17 19:53:28 cpqbld Exp $
|
||||||
.\" Copyright (c) 1993, 1994 X Consortium
|
.\" Copyright (c) 1993, 1994 X Consortium
|
||||||
.\"
|
.\"
|
||||||
.\" Permission is hereby granted, free of charge, to any person obtaining
|
.\" Permission is hereby granted, free of charge, to any person obtaining
|
||||||
.\" a copy of this software and associated documentation files (the
|
.\" a copy of this software and associated documentation files (the
|
||||||
.\" "Software"), to deal in the Software without restriction, including
|
.\" "Software"), to deal in the Software without restriction, including
|
||||||
|
@ -8,10 +8,10 @@
|
||||||
.\" distribute, sublicense, and/or sell copies of the Software, and to
|
.\" distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
.\" permit persons to whom the Software is furnished to do so, subject to
|
.\" permit persons to whom the Software is furnished to do so, subject to
|
||||||
.\" the following conditions:
|
.\" the following conditions:
|
||||||
.\"
|
.\"
|
||||||
.\" The above copyright notice and this permission notice shall be included
|
.\" The above copyright notice and this permission notice shall be included
|
||||||
.\" in all copies or substantial portions of the Software.
|
.\" in all copies or substantial portions of the Software.
|
||||||
.\"
|
.\"
|
||||||
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
.\" 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
|
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
.\" OTHER DEALINGS IN THE SOFTWARE.
|
.\" OTHER DEALINGS IN THE SOFTWARE.
|
||||||
.\"
|
.\"
|
||||||
.\" Except as contained in this notice, the name of the X Consortium shall
|
.\" Except as contained in this notice, the name of the X Consortium shall
|
||||||
.\" not be used in advertising or otherwise to promote the sale, use or
|
.\" not be used in advertising or otherwise to promote the sale, use or
|
||||||
.\" other dealings in this Software without prior written authorization
|
.\" other dealings in this Software without prior written authorization
|
||||||
|
@ -27,238 +27,402 @@
|
||||||
.\"
|
.\"
|
||||||
.\" $XFree86: xc/programs/Xserver/hw/xnest/Xnest.man,v 1.6 2001/01/27 18:21:00 dawes Exp $
|
.\" $XFree86: xc/programs/Xserver/hw/xnest/Xnest.man,v 1.6 2001/01/27 18:21:00 dawes Exp $
|
||||||
.\"
|
.\"
|
||||||
.TH XNEST 1 __xorgversion__
|
.TH Xnest __appmansuffix__ __xorgversion__
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Xnest \- a nested X server
|
Xnest \- a nested X server
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B Xnest
|
.B Xnest
|
||||||
[-options]
|
[
|
||||||
|
.I options
|
||||||
|
]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
\fIXnest\fP is a client and a server. \fIXnest\fP is a client of the
|
.B Xnest
|
||||||
real server which manages windows and graphics requests on its behalf.
|
is both an X client and an X server.
|
||||||
\fIXnest\fP is a server to its own clients. \fIXnest\fP manages
|
.B Xnest
|
||||||
windows and graphics requests on their behalf. To these clients
|
is a client of the real server which manages windows and graphics requests on
|
||||||
\fIXnest\fP appears to be a conventional server.
|
its behalf.
|
||||||
|
.B Xnest
|
||||||
|
is a server to its own clients.
|
||||||
|
.B Xnest
|
||||||
|
manages windows and graphics requests on their behalf.
|
||||||
|
To these clients,
|
||||||
|
.B Xnest
|
||||||
|
appears to be a conventional server.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
\fIXnest\fP supports all standard options of the sample server
|
.B Xnest
|
||||||
implementation. For more details, please see the manual page on your
|
supports all standard options of the sample server implementation.
|
||||||
system for \fIXserver\fP. The following additional arguments are
|
For more details, please see
|
||||||
supported as well.
|
.BR Xserver (__appmansuffix__).
|
||||||
.TP 4
|
The following additional arguments are supported as well.
|
||||||
.B \-display \fIstring\fP
|
.TP
|
||||||
|
.BI "\-display " string
|
||||||
This option specifies the display name of the real server that
|
This option specifies the display name of the real server that
|
||||||
\fIXnest\fP should try to connect with. If it is not provided on the
|
.B Xnest
|
||||||
command line \fIXnest\fP will read the \fIDISPLAY\fP environment
|
should try to connect to.
|
||||||
variable in order to find out the same information.
|
If it is not provided on the command line,
|
||||||
.TP 4
|
.B Xnest
|
||||||
|
will read the
|
||||||
|
.I DISPLAY
|
||||||
|
environment variable in order to find out this information.
|
||||||
|
.TP
|
||||||
.B \-sync
|
.B \-sync
|
||||||
This option tells \fIXnest\fP to synchronize its window and graphics
|
This option tells
|
||||||
operations with the real server. This is a useful option for
|
.B Xnest
|
||||||
debugging, but it will slow down the performance considerably. It
|
to synchronize its window and graphics operations with the real server.
|
||||||
should not be used unless absolutely necessary.
|
This is a useful option for debugging, but it will slow down
|
||||||
.TP 4
|
.BR Xnest 's
|
||||||
|
performance considerably.
|
||||||
|
It should not be used unless absolutely necessary.
|
||||||
|
.TP
|
||||||
.B \-full
|
.B \-full
|
||||||
This option tells \fIXnest\fP to utilize full regeneration of real
|
This option tells
|
||||||
server objects and reopen a new connection to the real server each
|
.B Xnest
|
||||||
time the nested server regenerates. The sample server implementation
|
to utilize full regeneration of real server objects and reopen a new connection
|
||||||
regenerates all objects in the server when the last client of this
|
to the real server each time the nested server regenerates.
|
||||||
server terminates. When this happens, \fIXnest\fP by default
|
The sample server implementation regenerates all objects in the server when the
|
||||||
maintains the same top level window and the same real server
|
last client of this server terminates.
|
||||||
connection in each new generation. If the user selects full
|
When this happens,
|
||||||
regeneration, even the top level window and the connection to the real
|
.B Xnest
|
||||||
server will be regenerated for each server generation.
|
by default maintains the same top-level window and the same real server
|
||||||
.TP 4
|
connection in each new generation.
|
||||||
.B \-class \fIstring\fP
|
If the user selects full regeneration, even the top-level window and the
|
||||||
|
connection to the real server will be regenerated for each server generation.
|
||||||
|
.TP
|
||||||
|
.BI "\-class " string
|
||||||
This option specifies the default visual class of the nested server.
|
This option specifies the default visual class of the nested server.
|
||||||
It is similar to the \fI-cc\fP option from the set of standard options
|
It is similar to the
|
||||||
except that it will accept a string rather than a number for the
|
.B \-cc
|
||||||
visual class specification. The string must be one of the following
|
option from the set of standard options except that it will accept a string
|
||||||
six values: \fIStaticGray\fP, \fIGrayScale\fP, \fIStaticColor\fP,
|
rather than a number for the visual class specification.
|
||||||
\fIPseudoColor\fP, \fITrueColor\fP, or \fIDirectColor\fP. If both,
|
The
|
||||||
\fI-class\fP and \fI-cc\fP options are specified, the last instance of
|
.I string
|
||||||
either option assumes precedence. The class of the default visual of
|
must be one of the following six values:
|
||||||
the nested server need not be the same as the class of the default
|
.BR StaticGray ,
|
||||||
visual of the real server; although, it has to be supported by the
|
.BR GrayScale ,
|
||||||
real server. See \fIxdpyinfo\fP for a list of supported visual
|
.BR StaticColor ,
|
||||||
classes on the real server before starting \fIXnest\fP. If the user
|
.BR PseudoColor ,
|
||||||
chooses a static class, all the colors in the default colormap will be
|
.BR TrueColor ,
|
||||||
preallocated. If the user chooses a dynamic class, colors in the
|
or
|
||||||
default colormap will be available to individual clients for
|
.BR DirectColor .
|
||||||
allocation.
|
If both the
|
||||||
.TP 4
|
.B \-class
|
||||||
.B \-depth \fIint\fP
|
and
|
||||||
|
.B \-cc
|
||||||
|
options are specified, the last instance of either option takes precedence.
|
||||||
|
The class of the default visual of the nested server need not be the same as the
|
||||||
|
class of the default visual of the real server, but it must be supported by the
|
||||||
|
real server.
|
||||||
|
Use
|
||||||
|
.BR xdpyinfo (__appmansuffix__)
|
||||||
|
to obtain a list of supported visual classes on the real server before starting
|
||||||
|
.BR Xnest .
|
||||||
|
If the user chooses a static class, all the colors in the default color map will
|
||||||
|
be preallocated.
|
||||||
|
If the user chooses a dynamic class, colors in the default color map will be
|
||||||
|
available to individual clients for allocation.
|
||||||
|
.TP
|
||||||
|
.BI "\-depth " int
|
||||||
This option specifies the default visual depth of the nested server.
|
This option specifies the default visual depth of the nested server.
|
||||||
The depth of the default visual of the nested server need not be the
|
The depth of the default visual of the nested server need not be the same as the
|
||||||
same as the depth of the default visual of the real server; although,
|
depth of the default visual of the real server, but it must be supported by the
|
||||||
it has to be supported by the real server. See \fIxdpyinfo\fP for a
|
real server.
|
||||||
list of supported visual depths on the real server before starting
|
Use
|
||||||
\fIXnest\fP.
|
.BR xdpyinfo (__appmansuffix__)
|
||||||
.TP 4
|
to obtain a list of supported visual depths on the real server before starting
|
||||||
|
.BR Xnest .
|
||||||
|
.TP
|
||||||
.B \-sss
|
.B \-sss
|
||||||
This option tells \fIXnest\fP to use the software screen saver. By
|
This option tells
|
||||||
default \fIXnest\fP will use the screen saver that corresponds to the
|
.B Xnest
|
||||||
hardware screen saver in the real server. Of course, even this screen
|
to use the software screen saver.
|
||||||
saver is software generated since \fIXnest\fP does not control any
|
By default,
|
||||||
actual hardware. However, it is treated as a hardware screen saver
|
.B Xnest
|
||||||
within the sample server code.
|
will use the screen saver that corresponds to the hardware screen saver in the
|
||||||
.TP 4
|
real server.
|
||||||
.B \-geometry \fIWxH+X+Y\fP
|
Of course, even this screen saver is software-generated since
|
||||||
This option specifies geometry parameters for the top level
|
.B Xnest
|
||||||
\fIXnest\fP windows. These windows corresponds to the root windows of
|
does not control any actual hardware.
|
||||||
the nested server. The width and height specified with this option
|
However, it is treated as a hardware screen saver within the sample server code.
|
||||||
will be the maximum width and height of each top level \fIXnest\fP
|
.TP
|
||||||
window. \fIXnest\fP will allow the user to make any top level window
|
.B \-geometry \fIW\fBx\fIH\fB+\fIX\fB+\fIY\fP
|
||||||
smaller, but it will not actually change the size of the nested server
|
This option specifies the geometry parameters for the top-level
|
||||||
root window. As of yet, there is no mechanism within the sample
|
.B Xnest
|
||||||
server implementation to change the size of the root window after
|
window.
|
||||||
screen initialization. In order to do so, one would probably need to
|
See \(lqGEOMETRY SPECIFICATIONS\(rq in
|
||||||
extend the X protocol. Therefore, it is not likely that this will be
|
.BR X (__miscmansuffix__)
|
||||||
available any time soon. If this option is not specified \fIXnest\fP
|
for a discusson of this option's syntax.
|
||||||
will choose width and height to be 3/4 of the dimensions of the root
|
This window corresponds to the root window of the nested server.
|
||||||
window of the real server.
|
The width
|
||||||
.TP 4
|
.I W
|
||||||
.B \-bw \fIint\fP
|
and height
|
||||||
This option specifies the border width of the top level \fIXnest\fP
|
.I H
|
||||||
window. The integer parameter must be a positive number. The default
|
specified with this option will be the maximum width and height of each
|
||||||
border width is 1.
|
top-level
|
||||||
.TP 4
|
.B Xnest
|
||||||
.B \-name \fIstring\fP
|
window.
|
||||||
This option specifies the name of the top level \fIXnest\fP window.
|
.B Xnest
|
||||||
|
will allow the user to make any top-level window smaller, but it will not
|
||||||
|
actually change the size of the nested server root window.
|
||||||
|
.B Xnest
|
||||||
|
does not yet support the RANDR extension for resizing, rotation, and reflection
|
||||||
|
of the root window.
|
||||||
|
If this option is not specified,
|
||||||
|
.B Xnest
|
||||||
|
will choose
|
||||||
|
.I W
|
||||||
|
and
|
||||||
|
.I H
|
||||||
|
to be 3/4ths the dimensions of the root window of the real server.
|
||||||
|
.TP
|
||||||
|
.BI "\-bw " int
|
||||||
|
This option specifies the border width of the top-level
|
||||||
|
.B Xnest
|
||||||
|
window.
|
||||||
|
The integer parameter
|
||||||
|
.I int
|
||||||
|
must be positive.
|
||||||
|
The default border width is 1.
|
||||||
|
.TP
|
||||||
|
.BI "\-name " string
|
||||||
|
This option specifies the name of the top-level
|
||||||
|
.B Xnest
|
||||||
|
window as
|
||||||
|
.IR string .
|
||||||
The default value is the program name.
|
The default value is the program name.
|
||||||
.TP 4
|
.TP
|
||||||
.B \-scrns \fIint\fP
|
.BI "\-scrns " int
|
||||||
This option specifies the number of screens to create in the nested
|
This option specifies the number of screens to create in the nested server.
|
||||||
server. For each screen, \fIXnest\fP will create a separate top level
|
For each screen,
|
||||||
window. Each screen is referenced by the number after the dot in the
|
.B Xnest
|
||||||
client display name specification. For example, \fIxterm -display
|
will create a separate top-level window.
|
||||||
:1.1\fP will open an \fIxterm\fP client in the nested server with the
|
Each screen is referenced by the number after the dot in the client display name
|
||||||
display number \fI:1\fP on the second screen. The number of screens
|
specification.
|
||||||
is limited by the hard coded constant in the server sample code which
|
For example,
|
||||||
is usually 3.
|
.B xterm \-display :1.1
|
||||||
.TP 4
|
will open an
|
||||||
|
.BR xterm (__appmansuffix__)
|
||||||
|
client in the nested server with the display number
|
||||||
|
.B :1
|
||||||
|
on the second screen.
|
||||||
|
The number of screens is limited by the hard-coded constant in the server sample
|
||||||
|
code, which is usually 3.
|
||||||
|
.TP
|
||||||
.B \-install
|
.B \-install
|
||||||
This option tells \fIXnest\fP to do its own colormap installation by
|
This option tells
|
||||||
bypassing the real window manager. For it to work properly the user
|
.B Xnest
|
||||||
will probably have to temporarily quit the real window manager. By
|
to do its own color map installation by bypassing the real window manager.
|
||||||
default \fIXnest\fP will keep the nested client window whose colormap
|
For it to work properly, the user will probably have to temporarily quit the
|
||||||
should be installed in the real server in the
|
real window manager.
|
||||||
\fIWM\_COLORMAP\_WINDOWS\fP property of the top level \fIXnest\fP
|
By default,
|
||||||
window. If this colormap is of the same visual type as the root
|
.B Xnest
|
||||||
window of the nested server, \fIXnest\fP will associate this colormap
|
will keep the nested client window whose color map should be installed in the
|
||||||
with the top level \fIXnest\fP window as well. Since this does not
|
real server in the
|
||||||
have to be the case, window managers should look primarily at the
|
.I WM_COLORMAP_WINDOWS
|
||||||
\fIWM\_COLORMAP\_WINDOWS\fP property rather than the colormap
|
property of the top-level
|
||||||
associated with the top level \fIXnest\fP window. Unfortunately,
|
.B Xnest
|
||||||
window managers are not very good at doing that yet so this option
|
window.
|
||||||
might come in handy.
|
If this color map is of the same visual type as the root window of the nested
|
||||||
.TP 4
|
server,
|
||||||
.B \-parent \fIwindow_id\fP
|
.B Xnest
|
||||||
This option tells \fIXnest\fP to use the \fIwindow_id\fP as the
|
will associate this color map with the top-level
|
||||||
root window instead of creating a window. This option is used
|
.B Xnest
|
||||||
by the xrx xnestplugin.
|
window as well.
|
||||||
.SH USAGE
|
Since this does not have to be the case, window managers should look primarily
|
||||||
Starting up \fIXnest\fP is as simple as starting up \fIxclock\fP from
|
at the
|
||||||
a terminal emulator. If a user wishes to run \fIXnest\fP on the same
|
.I WM_COLORMAP_WINDOWS
|
||||||
workstation as the real server, it is important that the nested server
|
property rather than the color map associated with the top-level
|
||||||
is given its own listening socket address. Therefore, if there is a
|
.B Xnest
|
||||||
server already running on the user's workstation, \fIXnest\fP will
|
window.
|
||||||
have to be started up with a new display number. Since there is
|
.\" Is the following still true? This sentence is several years old.
|
||||||
usually no more than one server running on a workstation, specifying
|
Unfortunately, window managers are not very good at doing that yet so this
|
||||||
\fIXnest :1\fP on the command line will be sufficient for most users.
|
option might come in handy.
|
||||||
For each server running on the workstation the display number needs to
|
.TP
|
||||||
be incremented by one. Thus, if you wish to start another
|
.BI "\-parent " window_id
|
||||||
\fIXnest\fP, you will need to type \fIXnest :2\fP on the command line.
|
This option tells
|
||||||
|
.B Xnest
|
||||||
|
to use
|
||||||
|
.I window_id
|
||||||
|
as the root window instead of creating a window.
|
||||||
|
.\" XRX is dead, dead, dead.
|
||||||
|
.\" This option is used by the xrx xnestplugin.
|
||||||
|
.SH "EXTENDED DESCRIPTION"
|
||||||
|
Starting up
|
||||||
|
.B Xnest
|
||||||
|
is just as simple as starting up
|
||||||
|
.BR xclock (__appmansuffix__)
|
||||||
|
from a terminal emulator.
|
||||||
|
If a user wishes to run
|
||||||
|
.B Xnest
|
||||||
|
on the same
|
||||||
|
workstation as the real server, it is important that the nested server is given
|
||||||
|
its own listening socket address.
|
||||||
|
Therefore, if there is a server already running on the user's workstation,
|
||||||
|
.B Xnest
|
||||||
|
will have to be started up with a new display number.
|
||||||
|
Since there is usually no more than one server running on a workstation,
|
||||||
|
specifying
|
||||||
|
.RB \(oq "Xnest :1" \(cq
|
||||||
|
on the command line will be sufficient for most users.
|
||||||
|
For each server running on the workstation, the display number needs to be
|
||||||
|
incremented by one.
|
||||||
|
Thus, if you wish to start another
|
||||||
|
.BR Xnest ,
|
||||||
|
you will need to type
|
||||||
|
.RB \(oq "Xnest :2" \(cq
|
||||||
|
on the command line.
|
||||||
.PP
|
.PP
|
||||||
To run clients in the nested server each client needs to be given the
|
To run clients in the nested server, each client needs to be given the same
|
||||||
same display number as the nested server. For example, \fIxterm
|
display number as the nested server.
|
||||||
-display :1\fP will start up an \fIxterm\fP in the first nested server
|
For example,
|
||||||
and \fIxterm -display :2\fP will start an \fIxterm\fP in the second
|
.RB \(oq "xterm \-display :1" \(cq
|
||||||
nested server from the example above. Additional clients can be
|
will start up an
|
||||||
started from these \fIxterm\fPs in each nested server.
|
.B xterm
|
||||||
.SH XNEST AS A CLIENT
|
process in the first nested server
|
||||||
\fIXnest\fP behaves and looks to the real server and other real
|
and
|
||||||
clients as another real client. It is a rather demanding client,
|
.RB \(oq "xterm \-display :2" \(cq
|
||||||
however, since almost any window or graphics request from a nested
|
will start an
|
||||||
client will result in a window or graphics request from \fIXnest\fP to
|
.B xterm
|
||||||
the real server. Therefore, it is desirable that \fIXnest\fP and the
|
in the second nested server from the example above.
|
||||||
real server are on a local network, or even better, on the same
|
Additional clients can be started from these
|
||||||
machine. As of now, \fIXnest\fP assumes that the real server supports
|
.BR xterm s
|
||||||
the shape extension. There is no way to turn off this assumption
|
in each nested server.
|
||||||
dynamically. \fIXnest\fP can be compiled without the shape extension
|
.SS "Xnest as a client"
|
||||||
built in, and in that case the real server need not support it. The
|
.B Xnest
|
||||||
dynamic shape extension selection support should be considered in
|
behaves and looks to the real server and other real clients as another real
|
||||||
further development of \fIXnest\fP.
|
client.
|
||||||
|
It is a rather demanding client, however, since almost any window or graphics
|
||||||
|
request from a nested client will result in a window or graphics request from
|
||||||
|
.B Xnest
|
||||||
|
to the real server.
|
||||||
|
Therefore, it is desirable that
|
||||||
|
.B Xnest
|
||||||
|
and the real server are on a local network, or even better, on the same machine.
|
||||||
|
.B Xnest
|
||||||
|
assumes that the real server supports the SHAPE extension.
|
||||||
|
There is no way to turn off this assumption dynamically.
|
||||||
|
.B Xnest
|
||||||
|
can be compiled without the SHAPE extension built in, in which case the real
|
||||||
|
server need not support it.
|
||||||
|
Dynamic SHAPE extension selection support may be considered in further
|
||||||
|
development of
|
||||||
|
.BR Xnest .
|
||||||
.PP
|
.PP
|
||||||
Since \fIXnest\fP need not use the same default visual as the the real
|
Since
|
||||||
server, the top level window of the \fIXnest\fP client always has its
|
.B Xnest
|
||||||
own colormap. This implies that other windows' colors will not be
|
need not use the same default visual as the the real server, the top-level
|
||||||
displayed properly while the keyboard or pointer focus is in the
|
window of the
|
||||||
\fIXnest\fP window, unless the real server has support for more than
|
.B Xnest
|
||||||
one installed colormap at any time. The colormap associated with the
|
client always has its own color map.
|
||||||
top window of the \fIXnest\fP client need not be the appropriate
|
This implies that other windows' colors will not be displayed properly while the
|
||||||
colormap that the nested server wants installed in the real server.
|
keyboard or pointer focus is in the
|
||||||
In the case that a nested client attempts to install a colormap of a
|
.B Xnest
|
||||||
different visual from the default visual of the nested server,
|
window, unless the real server has support for more than one installed color map
|
||||||
\fIXnest\fP will put the top window of this nested client and all
|
at any time.
|
||||||
other top windows of the nested clients that use the same colormap
|
The color map associated with the top window of the
|
||||||
into the \fIWM\_COLORMAP\_WINDOWS\fP property of the top level
|
.B Xnest
|
||||||
\fIXnest\fP window on the real server. Thus, it is important that the
|
client need not be the appropriate color map that the nested server wants
|
||||||
real window manager that manages the \fIXnest\fP top level window
|
installed in the real server.
|
||||||
looks at the \fIWM\_COLORMAP\_WINDOWS\fP property rather than the
|
In the case that a nested client attempts to install a color map of a different
|
||||||
colormap associated with the top level \fIXnest\fP window. Since most
|
visual from the default visual of the nested server,
|
||||||
window managers appear to not implement this convention properly as of
|
.B Xnest
|
||||||
yet, \fIXnest\fP can optionally do direct installation of colormaps
|
will put the top window of this nested client and all other top windows of the
|
||||||
into the real server bypassing the real window manager. If the user
|
nested clients that use the same color map into the
|
||||||
chooses this option, it is usually necessary to temporarily disable
|
.I WM_COLORMAP_WINDOWS
|
||||||
the real window manager since it will interfere with the \fIXnest\fP
|
property of the top-level
|
||||||
scheme of colormap installation.
|
.B Xnest
|
||||||
|
window on the real server.
|
||||||
|
Thus, it is important that the real window manager that manages the
|
||||||
|
.B Xnest
|
||||||
|
top-level window looks at the
|
||||||
|
.I WM_COLORMAP_WINDOWS
|
||||||
|
property rather than the color map associated with the top-level
|
||||||
|
.B Xnest
|
||||||
|
window.
|
||||||
|
Since most window managers don't yet appear to implement this convention
|
||||||
|
properly,
|
||||||
|
.B Xnest
|
||||||
|
can optionally do direct installation of color maps into the real server
|
||||||
|
bypassing the real window manager.
|
||||||
|
If the user chooses this option, it is usually necessary to temporarily disable
|
||||||
|
the real window manager since it will interfere with the
|
||||||
|
.B Xnest
|
||||||
|
scheme of color map installation.
|
||||||
.PP
|
.PP
|
||||||
Keyboard and pointer control procedures of the nested server change
|
Keyboard and pointer control procedures of the nested server change the keyboard
|
||||||
the keyboard and pointer control parameters of the real server.
|
and pointer control parameters of the real server.
|
||||||
Therefore, after \fIXnest\fP is started up, it will change the
|
Therefore, after
|
||||||
keyboard and pointer controls of the real server to its own internal
|
.B Xnest
|
||||||
defaults. Perhaps there should be a command line option to tell
|
is started up, it will change the keyboard and pointer controls of the real
|
||||||
\fIXnest\fP to inherit the keyboard and pointer control parameters
|
server to its own internal defaults.
|
||||||
from the real server rather than imposing its own. This is a future
|
.SS "Xnest as a server"
|
||||||
consideration.
|
.B Xnest
|
||||||
.SH XNEST AS A SERVER
|
as a server looks exactly like a real server to its own clients.
|
||||||
\fIXnest\fP as a server looks exactly like a real server to its own
|
For the clients, there is no way of telling if they are running on a real or a
|
||||||
clients. For the clients there is no way of telling if they are
|
nested server.
|
||||||
running on a real or a nested server.
|
|
||||||
.PP
|
.PP
|
||||||
As already mentioned, \fIXnest\fP is a very user friendly server when
|
As already mentioned,
|
||||||
it comes to customization. \fIXnest\fP will pick up a number of
|
.B Xnest
|
||||||
command line arguments that can configure its default visual class and
|
is a very user-friendly server when it comes to customization.
|
||||||
depth, number of screens, etc. In the future, \fIXnest\fP should read
|
.B Xnest
|
||||||
a customization input file to provide even greater freedom and
|
will pick up a number of command-line arguments that can configure its default
|
||||||
simplicity in selecting the desired layout. Unfortunately, there is
|
visual class and depth, number of screens, etc.
|
||||||
no support for backing store and save under as of yet, but this should
|
|
||||||
also be considered in the future development of \fIXnest\fP.
|
|
||||||
.PP
|
.PP
|
||||||
The only apparent intricacy from the users' perspective about using
|
The only apparent intricacy from the users' perspective about using
|
||||||
\fIXnest\fP as a server is the selection of fonts. \fIXnest\fP
|
.B Xnest
|
||||||
manages fonts by loading them locally and then passing the font name
|
as a server is the selection of fonts.
|
||||||
to the real server and asking it to load that font remotely. This
|
.B Xnest
|
||||||
approach avoids the overload of sending the glyph bits across the
|
manages fonts by loading them locally and then passing the font name to the real
|
||||||
network for every text operation, although it is really a bug. The
|
server and asking it to load that font remotely.
|
||||||
proper implementation of fonts should be moved into the \fIos\fP
|
This approach avoids the overload of sending the glyph bits across the network
|
||||||
layer. The consequence of this approach is that the user will have to
|
for every text operation, although it is really a bug.
|
||||||
worry about two different font paths - a local one for the nested
|
The consequence of this approach is that the user will have to worry about two
|
||||||
server and a remote one for the real server - since \fIXnest\fP does
|
different font paths \(em a local one for the nested server and a remote one for
|
||||||
not propagate its font path to the real server. The reason for this
|
the real server \(em since
|
||||||
is because real and nested servers need not run on the same file
|
.B Xnest
|
||||||
system which makes the two font paths mutually incompatible. Thus, if
|
does not propagate its font path to the real server.
|
||||||
there is a font in the local font path of the nested server, there is
|
The reason for this is because real and nested servers need not run on the same
|
||||||
no guarantee that this font exists in the remote font path of the real
|
file system which makes the two font paths mutually incompatible.
|
||||||
server. \fIXlsfonts\fP client, if run on the nested server will list
|
Thus, if there is a font in the local font path of the nested server, there is
|
||||||
fonts in the local font path and if run on the real server will list
|
no guarantee that this font exists in the remote font path of the real server.
|
||||||
fonts in the remote font path. Before a font can be successfully
|
The
|
||||||
opened by the nested server it has to exist in local and remote font
|
.BR xlsfonts (__appmansuffix__)
|
||||||
paths. It is the users' responsibility to make sure that this is the
|
client, if run on the nested server, will list fonts in the local font path and,
|
||||||
case.
|
if run on the real server, will list fonts in the remote font path.
|
||||||
|
Before a font can be successfully opened by the nested server, it has to exist
|
||||||
|
in local and remote font paths.
|
||||||
|
It is the users' responsibility to make sure that this is the case.
|
||||||
|
.SH "FUTURE DIRECTIONS"
|
||||||
|
Make dynamic the requirement for the SHAPE extension in the real server, rather
|
||||||
|
than having to recompile
|
||||||
|
.B Xnest
|
||||||
|
to turn this requirement on and off.
|
||||||
|
.PP
|
||||||
|
Perhaps there should be a command-line option to tell
|
||||||
|
.B Xnest
|
||||||
|
to inherit the keyboard and pointer control parameters from the real server
|
||||||
|
rather than imposing its own.
|
||||||
|
.PP
|
||||||
|
.B Xnest
|
||||||
|
should read a customization input file to provide even greater freedom and
|
||||||
|
simplicity in selecting the desired layout.
|
||||||
|
.PP
|
||||||
|
There is no support for backing store and save unders, but this should also be
|
||||||
|
considered.
|
||||||
|
.PP
|
||||||
|
.\" Is the following still true now that client-side font rendering is
|
||||||
|
.\" considered the way to go?
|
||||||
|
The proper implementation of fonts should be moved into the
|
||||||
|
.I os
|
||||||
|
layer.
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
Won't run well on servers supporting different visual depths.
|
Doesn't run well on servers supporting different visual depths.
|
||||||
Still crashes randomly. Probably has some memory leaks.
|
.PP
|
||||||
|
Still crashes randomly.
|
||||||
|
.PP
|
||||||
|
Probably has some memory leaks.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Davor Matic, MIT X Consortium
|
Davor Matic, MIT X Consortium
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.BR Xserver (__appmansuffix__),
|
||||||
|
.BR xdpyinfo (__appmansuffix__),
|
||||||
|
.BR X (__miscmansuffix__)
|
||||||
|
|
|
@ -10,9 +10,9 @@ Xprt_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
|
||||||
|
|
||||||
Xprt_LDFLAGS = -L$(top_srcdir)
|
Xprt_LDFLAGS = -L$(top_srcdir)
|
||||||
Xprt_LDADD = @XPRINT_LIBS@ ps/libps.la raster/libraster.la \
|
Xprt_LDADD = @XPRINT_LIBS@ ps/libps.la raster/libraster.la \
|
||||||
pcl/libpcl.la pcl-mono/libpcl.la ../../fb/libfb.la \
|
pcl/libpcl.la pcl-mono/libpcl.la $(top_builddir)/fb/libfb.la \
|
||||||
../../render/librender.la ../../mi/libmi.la ../../Xext/libXext.la \
|
$(top_builddir)/render/librender.la $(top_builddir)/mi/libmi.la \
|
||||||
@FREETYPE_LIBS@
|
$(top_builddir)/Xext/libXext.la @FREETYPE_LIBS@
|
||||||
|
|
||||||
miinitext-wrapper.c:
|
miinitext-wrapper.c:
|
||||||
echo "#include \"$(top_srcdir)/mi/miinitext.c\"" >> $@
|
echo "#include \"$(top_srcdir)/mi/miinitext.c\"" >> $@
|
||||||
|
|
|
@ -100,9 +100,10 @@ winMouseProc (DeviceIntPtr pDeviceInt, int iState)
|
||||||
InitPointerDeviceStruct (pDevice,
|
InitPointerDeviceStruct (pDevice,
|
||||||
map,
|
map,
|
||||||
lngMouseButtons + lngWheelEvents,
|
lngMouseButtons + lngWheelEvents,
|
||||||
miPointerGetMotionEvents,
|
GetMotionHistory,
|
||||||
winMouseCtrl,
|
winMouseCtrl,
|
||||||
miPointerGetMotionBufferSize ());
|
GetMotionHistorySize(),
|
||||||
|
2);
|
||||||
free(map);
|
free(map);
|
||||||
|
|
||||||
#if defined(XFree86Server) && defined(XINPUT)
|
#if defined(XFree86Server) && defined(XINPUT)
|
||||||
|
|
|
@ -264,7 +264,7 @@ winMultiWindowGetTransientFor (WindowPtr pWin, WindowPtr *ppDaddy)
|
||||||
if (prop->propertyName == XA_WM_TRANSIENT_FOR)
|
if (prop->propertyName == XA_WM_TRANSIENT_FOR)
|
||||||
{
|
{
|
||||||
if (ppDaddy)
|
if (ppDaddy)
|
||||||
memcpy (*ppDaddy, prop->data, sizeof (WindowPtr *));
|
memcpy (*ppDaddy, prop->data, sizeof (WindowPtr));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -445,10 +445,7 @@ GetWindowName (Display *pDisplay, Window iWin, char **ppName)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XmbTextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum);
|
if (XmbTextPropertyToTextList (pDisplay, &xtpName, &ppList, &nNum) >= Success && nNum > 0 && *ppList)
|
||||||
|
|
||||||
/* */
|
|
||||||
if (nNum && ppList && *ppList)
|
|
||||||
{
|
{
|
||||||
*ppName = strdup (*ppList);
|
*ppName = strdup (*ppList);
|
||||||
XFreeStringList (ppList);
|
XFreeStringList (ppList);
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "winmultiwindowclass.h"
|
#include "winmultiwindowclass.h"
|
||||||
#include "winprefs.h"
|
#include "winprefs.h"
|
||||||
#include "winmsg.h"
|
#include "winmsg.h"
|
||||||
|
#include "inputstr.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* External global variables
|
* External global variables
|
||||||
|
@ -444,7 +445,7 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
||||||
/* Avoid the BitBlt's if the PAINTSTRUCT is bogus */
|
/* Avoid the BitBlt's if the PAINTSTRUCT is bogus */
|
||||||
if (ps.rcPaint.right==0 && ps.rcPaint.bottom==0 && ps.rcPaint.left==0 && ps.rcPaint.top==0)
|
if (ps.rcPaint.right==0 && ps.rcPaint.bottom==0 && ps.rcPaint.left==0 && ps.rcPaint.top==0)
|
||||||
{
|
{
|
||||||
EndPaint (hwndScreen, &ps);
|
EndPaint (hwnd, &ps);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,7 +475,7 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EndPaint frees the DC */
|
/* EndPaint frees the DC */
|
||||||
EndPaint (hwndScreen, &ps);
|
EndPaint (hwnd, &ps);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
|
@ -494,8 +495,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Has the mouse pointer crossed screens? */
|
/* Has the mouse pointer crossed screens? */
|
||||||
if (s_pScreen != miPointerCurrentScreen ())
|
if (s_pScreen != miPointerGetScreen(inputInfo.pointer))
|
||||||
miPointerSetNewScreen (s_pScreenInfo->dwScreen,
|
miPointerSetScreen (inputInfo.pointer, s_pScreenInfo->dwScreen,
|
||||||
ptMouse.x - s_pScreenInfo->dwXOffset,
|
ptMouse.x - s_pScreenInfo->dwXOffset,
|
||||||
ptMouse.y - s_pScreenInfo->dwYOffset);
|
ptMouse.y - s_pScreenInfo->dwYOffset);
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include "winmultiwindowclass.h"
|
#include "winmultiwindowclass.h"
|
||||||
#include "winmsg.h"
|
#include "winmsg.h"
|
||||||
|
#include "inputstr.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -538,8 +539,8 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Has the mouse pointer crossed screens? */
|
/* Has the mouse pointer crossed screens? */
|
||||||
if (pScreen != miPointerCurrentScreen ())
|
if (pScreen != miPointerGetScreen(inputInfo.pointer))
|
||||||
miPointerSetNewScreen (pScreenInfo->dwScreen,
|
miPointerSetScreen (inputInfo.pointer, pScreenInfo->dwScreen,
|
||||||
ptMouse.x - pScreenInfo->dwXOffset,
|
ptMouse.x - pScreenInfo->dwXOffset,
|
||||||
ptMouse.y - pScreenInfo->dwYOffset);
|
ptMouse.y - pScreenInfo->dwYOffset);
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "winprefs.h"
|
#include "winprefs.h"
|
||||||
#include "winconfig.h"
|
#include "winconfig.h"
|
||||||
#include "winmsg.h"
|
#include "winmsg.h"
|
||||||
|
#include "inputstr.h"
|
||||||
|
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
extern BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam);
|
extern BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam);
|
||||||
|
@ -723,8 +724,8 @@ winWindowProc (HWND hwnd, UINT message,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Has the mouse pointer crossed screens? */
|
/* Has the mouse pointer crossed screens? */
|
||||||
if (s_pScreen != miPointerCurrentScreen ())
|
if (s_pScreen != miPointerGetScreen(inputInfo.pointer))
|
||||||
miPointerSetNewScreen (s_pScreenInfo->dwScreen,
|
miPointerSetScreen (inputInfo.pointer, s_pScreenInfo->dwScreen,
|
||||||
GET_X_LPARAM(lParam)-s_pScreenInfo->dwXOffset,
|
GET_X_LPARAM(lParam)-s_pScreenInfo->dwXOffset,
|
||||||
GET_Y_LPARAM(lParam)-s_pScreenInfo->dwYOffset);
|
GET_Y_LPARAM(lParam)-s_pScreenInfo->dwYOffset);
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,9 @@
|
||||||
/* Define to 1 if you have the <byteswap.h> header file. */
|
/* Define to 1 if you have the <byteswap.h> header file. */
|
||||||
#undef HAVE_BYTESWAP_H
|
#undef HAVE_BYTESWAP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have cbrt */
|
||||||
|
#undef HAVE_CBRT
|
||||||
|
|
||||||
/* Define to 1 if you have the <dbm.h> header file. */
|
/* Define to 1 if you have the <dbm.h> header file. */
|
||||||
#undef HAVE_DBM_H
|
#undef HAVE_DBM_H
|
||||||
|
|
||||||
|
|
|
@ -209,10 +209,6 @@ extern int (* ProcVector[256]) (ClientPtr /*client*/);
|
||||||
|
|
||||||
extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
|
extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
|
||||||
|
|
||||||
#ifdef K5AUTH
|
|
||||||
extern int (*k5_Vector[256])(ClientPtr /*client*/);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern ReplySwapPtr ReplySwapVector[256];
|
extern ReplySwapPtr ReplySwapVector[256];
|
||||||
|
|
||||||
extern int ProcBadRequest(ClientPtr /*client*/);
|
extern int ProcBadRequest(ClientPtr /*client*/);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue