Break EXA ABI while we still can. Add coordinates to the UploadToScreen
hook so we can upload a subset of a pixmap, and convert the current drivers to respect that. Use this support to directly UploadToScreen in exaGlyphs, providing a 47.4% +/-2.4% decrease in wall time for ls -lR programs/Xserver in an antialiased gnome-terminal on an M6 (n=3, caches hot). I would have bumped major version, only I can't tell what the EXA_VERSION_* is supposed to be doing as opposed to the module version.
This commit is contained in:
parent
074913c8a9
commit
a1bcf25a1f
|
@ -250,7 +250,10 @@ exaMoveInPixmap (PixmapPtr pPixmap)
|
|||
|
||||
if (pExaScr->info->accel.UploadToScreen)
|
||||
{
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, src, src_pitch))
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, 0, 0,
|
||||
pPixmap->drawable.width,
|
||||
pPixmap->drawable.height,
|
||||
src, src_pitch))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -153,6 +153,10 @@ typedef struct _ExaAccelInfo {
|
|||
* in-framebuffer pDst beginning at x,y and of width w,h. May fail.
|
||||
*/
|
||||
Bool (*UploadToScreen) (PixmapPtr pDst,
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
int h,
|
||||
char *src,
|
||||
int src_pitch);
|
||||
Bool (*UploadToScratch) (PixmapPtr pSrc,
|
||||
|
|
|
@ -250,7 +250,10 @@ exaMoveInPixmap (PixmapPtr pPixmap)
|
|||
|
||||
if (pExaScr->info->accel.UploadToScreen)
|
||||
{
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, src, src_pitch))
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, 0, 0,
|
||||
pPixmap->drawable.width,
|
||||
pPixmap->drawable.height,
|
||||
src, src_pitch))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,10 @@ exaMoveInPixmap (PixmapPtr pPixmap)
|
|||
|
||||
if (pExaScr->info->accel.UploadToScreen)
|
||||
{
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, src, src_pitch))
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, 0, 0,
|
||||
pPixmap->drawable.width,
|
||||
pPixmap->drawable.height,
|
||||
src, src_pitch))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -692,19 +692,26 @@ exaGlyphs (CARD8 op,
|
|||
glyph = *glyphs++;
|
||||
|
||||
(*pScreen->ModifyPixmapHeader) (pScratchPixmap,
|
||||
glyph->info.width, glyph->info.height,
|
||||
glyph->info.width,
|
||||
glyph->info.height,
|
||||
0, 0, -1, (pointer) (glyph + 1));
|
||||
pScratchPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
|
||||
/* Copy the glyph data into the proper pixmap instead of a fake.
|
||||
* We ought to make exaCopyNtoN (the guts of exaCopyArea) handle
|
||||
* uploads from memory to screen using UploadToScreen, which will
|
||||
* be the steady state for this.
|
||||
* First we try to use UploadToScreen, if we can, then we fall back
|
||||
* to a plain exaCopyArea in case of failure.
|
||||
*/
|
||||
(*pGC->ops->CopyArea) (&pScratchPixmap->drawable, &pPixmap->drawable, pGC,
|
||||
0, 0, glyph->info.width, glyph->info.height, 0, 0);
|
||||
/*exaCopyArea (&pScratchPixmap->drawable, &pPixmap->drawable, pGC,
|
||||
0, 0, glyph->info.width, glyph->info.height, 0, 0);*/
|
||||
if (!pExaScr->info->accel.UploadToScreen ||
|
||||
!exaPixmapIsOffscreen(pPixmap) ||
|
||||
!(*pExaScr->info->accel.UploadToScreen) (pPixmap, 0, 0,
|
||||
glyph->info.width,
|
||||
glyph->info.height,
|
||||
pScratchPixmap->devPrivate.ptr,
|
||||
pScratchPixmap->devKind))
|
||||
{
|
||||
exaCopyArea (&pScratchPixmap->drawable, &pPixmap->drawable, pGC,
|
||||
0, 0, glyph->info.width, glyph->info.height, 0, 0);
|
||||
}
|
||||
|
||||
if (maskFormat)
|
||||
{
|
||||
|
|
|
@ -250,7 +250,10 @@ exaMoveInPixmap (PixmapPtr pPixmap)
|
|||
|
||||
if (pExaScr->info->accel.UploadToScreen)
|
||||
{
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, src, src_pitch))
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, 0, 0,
|
||||
pPixmap->drawable.width,
|
||||
pPixmap->drawable.height,
|
||||
src, src_pitch))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -153,6 +153,10 @@ typedef struct _ExaAccelInfo {
|
|||
* in-framebuffer pDst beginning at x,y and of width w,h. May fail.
|
||||
*/
|
||||
Bool (*UploadToScreen) (PixmapPtr pDst,
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
int h,
|
||||
char *src,
|
||||
int src_pitch);
|
||||
Bool (*UploadToScratch) (PixmapPtr pSrc,
|
||||
|
|
|
@ -250,7 +250,10 @@ exaMoveInPixmap (PixmapPtr pPixmap)
|
|||
|
||||
if (pExaScr->info->accel.UploadToScreen)
|
||||
{
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, src, src_pitch))
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, 0, 0,
|
||||
pPixmap->drawable.width,
|
||||
pPixmap->drawable.height,
|
||||
src, src_pitch))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,10 @@ exaMoveInPixmap (PixmapPtr pPixmap)
|
|||
|
||||
if (pExaScr->info->accel.UploadToScreen)
|
||||
{
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, src, src_pitch))
|
||||
if (pExaScr->info->accel.UploadToScreen(pPixmap, 0, 0,
|
||||
pPixmap->drawable.width,
|
||||
pPixmap->drawable.height,
|
||||
src, src_pitch))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -692,19 +692,26 @@ exaGlyphs (CARD8 op,
|
|||
glyph = *glyphs++;
|
||||
|
||||
(*pScreen->ModifyPixmapHeader) (pScratchPixmap,
|
||||
glyph->info.width, glyph->info.height,
|
||||
glyph->info.width,
|
||||
glyph->info.height,
|
||||
0, 0, -1, (pointer) (glyph + 1));
|
||||
pScratchPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
|
||||
/* Copy the glyph data into the proper pixmap instead of a fake.
|
||||
* We ought to make exaCopyNtoN (the guts of exaCopyArea) handle
|
||||
* uploads from memory to screen using UploadToScreen, which will
|
||||
* be the steady state for this.
|
||||
* First we try to use UploadToScreen, if we can, then we fall back
|
||||
* to a plain exaCopyArea in case of failure.
|
||||
*/
|
||||
(*pGC->ops->CopyArea) (&pScratchPixmap->drawable, &pPixmap->drawable, pGC,
|
||||
0, 0, glyph->info.width, glyph->info.height, 0, 0);
|
||||
/*exaCopyArea (&pScratchPixmap->drawable, &pPixmap->drawable, pGC,
|
||||
0, 0, glyph->info.width, glyph->info.height, 0, 0);*/
|
||||
if (!pExaScr->info->accel.UploadToScreen ||
|
||||
!exaPixmapIsOffscreen(pPixmap) ||
|
||||
!(*pExaScr->info->accel.UploadToScreen) (pPixmap, 0, 0,
|
||||
glyph->info.width,
|
||||
glyph->info.height,
|
||||
pScratchPixmap->devPrivate.ptr,
|
||||
pScratchPixmap->devKind))
|
||||
{
|
||||
exaCopyArea (&pScratchPixmap->drawable, &pPixmap->drawable, pGC,
|
||||
0, 0, glyph->info.width, glyph->info.height, 0, 0);
|
||||
}
|
||||
|
||||
if (maskFormat)
|
||||
{
|
||||
|
|
|
@ -692,19 +692,26 @@ exaGlyphs (CARD8 op,
|
|||
glyph = *glyphs++;
|
||||
|
||||
(*pScreen->ModifyPixmapHeader) (pScratchPixmap,
|
||||
glyph->info.width, glyph->info.height,
|
||||
glyph->info.width,
|
||||
glyph->info.height,
|
||||
0, 0, -1, (pointer) (glyph + 1));
|
||||
pScratchPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
|
||||
|
||||
/* Copy the glyph data into the proper pixmap instead of a fake.
|
||||
* We ought to make exaCopyNtoN (the guts of exaCopyArea) handle
|
||||
* uploads from memory to screen using UploadToScreen, which will
|
||||
* be the steady state for this.
|
||||
* First we try to use UploadToScreen, if we can, then we fall back
|
||||
* to a plain exaCopyArea in case of failure.
|
||||
*/
|
||||
(*pGC->ops->CopyArea) (&pScratchPixmap->drawable, &pPixmap->drawable, pGC,
|
||||
0, 0, glyph->info.width, glyph->info.height, 0, 0);
|
||||
/*exaCopyArea (&pScratchPixmap->drawable, &pPixmap->drawable, pGC,
|
||||
0, 0, glyph->info.width, glyph->info.height, 0, 0);*/
|
||||
if (!pExaScr->info->accel.UploadToScreen ||
|
||||
!exaPixmapIsOffscreen(pPixmap) ||
|
||||
!(*pExaScr->info->accel.UploadToScreen) (pPixmap, 0, 0,
|
||||
glyph->info.width,
|
||||
glyph->info.height,
|
||||
pScratchPixmap->devPrivate.ptr,
|
||||
pScratchPixmap->devKind))
|
||||
{
|
||||
exaCopyArea (&pScratchPixmap->drawable, &pPixmap->drawable, pGC,
|
||||
0, 0, glyph->info.width, glyph->info.height, 0, 0);
|
||||
}
|
||||
|
||||
if (maskFormat)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue