From 046234b3ebdfe221de9e87d70d287f69a6f59d6e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 9 Oct 2005 02:03:22 +0000 Subject: [PATCH] Don't try the accelerated glyphs path for component-alpha text (which I don't expect drivers to be able to accelerate without exa assistance). Instead, drop back to plain old miGlyphs for a 62.5% +/- 1.5% reduction in runtime of my ls -lR test (n=5) with component alpha. While a reasonable approach would seem to be making a better test to see whether the entire path would be accelerated and force migration appropriately, my attempt at this made the situation much worse. --- exa/exa_render.c | 7 +++++-- hw/xfree86/exa/exa_render.c | 7 +++++-- hw/xfree86/exa/exapict.c | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/exa/exa_render.c b/exa/exa_render.c index 380d5f232..16ffcdcf6 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -600,9 +600,12 @@ exaGlyphs (CARD8 op, CARD32 component_alpha; /* If the driver doesn't support accelerated composite, there's no point in - * going to this extra work. + * going to this extra work. Assume that no driver will be able to do + * component-alpha, which is likely accurate (at least until we make a CA + * helper). */ - if (!pExaScr->info->accel.PrepareComposite) { + if (!pExaScr->info->accel.PrepareComposite || + (maskFormat && NeedsComponent(maskFormat->format))) { miGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); return; } diff --git a/hw/xfree86/exa/exa_render.c b/hw/xfree86/exa/exa_render.c index 380d5f232..16ffcdcf6 100644 --- a/hw/xfree86/exa/exa_render.c +++ b/hw/xfree86/exa/exa_render.c @@ -600,9 +600,12 @@ exaGlyphs (CARD8 op, CARD32 component_alpha; /* If the driver doesn't support accelerated composite, there's no point in - * going to this extra work. + * going to this extra work. Assume that no driver will be able to do + * component-alpha, which is likely accurate (at least until we make a CA + * helper). */ - if (!pExaScr->info->accel.PrepareComposite) { + if (!pExaScr->info->accel.PrepareComposite || + (maskFormat && NeedsComponent(maskFormat->format))) { miGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); return; } diff --git a/hw/xfree86/exa/exapict.c b/hw/xfree86/exa/exapict.c index 380d5f232..16ffcdcf6 100644 --- a/hw/xfree86/exa/exapict.c +++ b/hw/xfree86/exa/exapict.c @@ -600,9 +600,12 @@ exaGlyphs (CARD8 op, CARD32 component_alpha; /* If the driver doesn't support accelerated composite, there's no point in - * going to this extra work. + * going to this extra work. Assume that no driver will be able to do + * component-alpha, which is likely accurate (at least until we make a CA + * helper). */ - if (!pExaScr->info->accel.PrepareComposite) { + if (!pExaScr->info->accel.PrepareComposite || + (maskFormat && NeedsComponent(maskFormat->format))) { miGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); return; }