Fixes a few problems in Xgl

This commit is contained in:
David Reveman 2005-02-11 20:19:20 +00:00
parent 35bd81dfec
commit 046bdb1716
5 changed files with 16 additions and 24 deletions

View File

@ -288,11 +288,6 @@ xglInitPixmapFormats (ScreenPtr pScreen)
0, NULL, k++);
if (format && format->type == GLITZ_FORMAT_TYPE_COLOR)
{
/* formats must have an alpha channel, otherwise
filtering wont match the render spec. */
if (!format->color.alpha_size)
continue;
/* find best matching sufficient format */
if (format->color.red_size >= rs &&
format->color.green_size >= gs &&

View File

@ -170,9 +170,7 @@ xglComp (CARD8 op,
if (pSrc->repeat)
{
/* tile */
if (!pSrcPriv->acceleratedTile &&
(pSrc->pDrawable->width > 1 ||
pSrc->pDrawable->height > 1))
if (!pSrcPriv->acceleratedTile)
{
pGeometry =
xglTiledBoxGeometry ((PixmapPtr) pSrc->pDrawable,

View File

@ -137,9 +137,15 @@ xglGlyphCompareScore (xglAreaPtr pArea,
{
xglGlyphCachePtr pCache = (xglGlyphCachePtr) pArea->pRoot->closure;
GlyphPtr pGlyph = (GlyphPtr) closure2;
xglGlyphAreaPtr pAreaPriv;
XGL_GLYPH_PRIV (pCache->pScreen, pGlyph);
GLYPH_AREA_PRIV (pGlyphPriv->pArea);
/* this shouldn't be needed, seems like a bug in xglarea.c */
if (!pGlyphPriv->pArea)
return 1;
pAreaPriv = GLYPH_GET_AREA_PRIV (pGlyphPriv->pArea);
if (pAreaPriv->serial != glyphSerialNumber)
return 1;

View File

@ -97,11 +97,17 @@ xglPixmapSurfaceInit (PixmapPtr pPixmap,
if (width && height)
{
if (features & GLITZ_FEATURE_TEXTURE_BORDER_CLAMP_MASK)
if (width == 1 && height == 1)
{
pPixmapPriv->acceleratedTile = TRUE;
}
else if (features & GLITZ_FEATURE_TEXTURE_BORDER_CLAMP_MASK)
{
if ((features & GLITZ_FEATURE_TEXTURE_NON_POWER_OF_TWO_MASK) ||
(POWER_OF_TWO (width) && POWER_OF_TWO (height)))
pPixmapPriv->acceleratedTile = TRUE;
}
pPixmapPriv->target = xglPixmapTargetOut;
/*

View File

@ -120,19 +120,6 @@ xglCopyWindow (WindowPtr pWin,
REGION_INTERSECT (pWin->drawable.pScreen,
&rgnDst, &pWin->borderClip, prgnSrc);
#ifdef COMPOSITE
if (pPixmap->screen_x || pPixmap->screen_y)
{
REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
-pPixmap->screen_x, -pPixmap->screen_y);
box.x1 -= pPixmap->screen_x;
box.y1 -= pPixmap->screen_y;
box.x2 -= pPixmap->screen_x;
box.y2 -= pPixmap->screen_y;
}
#endif
fbCopyRegion (&pWin->drawable, &pWin->drawable,
0, &rgnDst, dx, dy, xglCopyProc, 0, (void *) &box);