summaryrefslogtreecommitdiff
path: root/hw/xfree86/exa
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-10-09 02:03:22 +0000
committerEric Anholt <anholt@freebsd.org>2005-10-09 02:03:22 +0000
commit046234b3ebdfe221de9e87d70d287f69a6f59d6e (patch)
tree0c8d68d0257f8aa187a6a0d127d89462656519d4 /hw/xfree86/exa
parent526d1502df8db6799c9d1155b86ce79cef90872b (diff)
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.
Diffstat (limited to 'hw/xfree86/exa')
-rw-r--r--hw/xfree86/exa/exa_render.c7
-rw-r--r--hw/xfree86/exa/exapict.c7
2 files changed, 10 insertions, 4 deletions
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;
}