diff options
author | Rémi Cardona <remi@gentoo.org> | 2010-03-14 22:37:49 +0000 |
---|---|---|
committer | Rémi Cardona <remi@gentoo.org> | 2010-03-14 22:37:49 +0000 |
commit | 1bd5076ff49ec47311e54b6b8ef039929d040b9b (patch) | |
tree | 0497dbfac62cd2e6c0aeea49f8361fd6caf5f689 /x11-drivers/xf86-video-intel/files | |
parent | x11-drivers/xf86-video-intel: drop old ebuilds (diff) | |
download | gentoo-2-1bd5076ff49ec47311e54b6b8ef039929d040b9b.tar.gz gentoo-2-1bd5076ff49ec47311e54b6b8ef039929d040b9b.tar.bz2 gentoo-2-1bd5076ff49ec47311e54b6b8ef039929d040b9b.zip |
x11-drivers/xf86-video-intel: new 2.10.0 ebuild from the overlay, fixes bugs #299907, #308501 and #309067
(Portage version: 2.2_rc67/cvs/Linux i686)
Diffstat (limited to 'x11-drivers/xf86-video-intel/files')
-rw-r--r-- | x11-drivers/xf86-video-intel/files/2.10.0-0001-Extract-pixel-value-for-all-formats-to-avoid-hitting.patch | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/x11-drivers/xf86-video-intel/files/2.10.0-0001-Extract-pixel-value-for-all-formats-to-avoid-hitting.patch b/x11-drivers/xf86-video-intel/files/2.10.0-0001-Extract-pixel-value-for-all-formats-to-avoid-hitting.patch new file mode 100644 index 000000000000..27f6fd782314 --- /dev/null +++ b/x11-drivers/xf86-video-intel/files/2.10.0-0001-Extract-pixel-value-for-all-formats-to-avoid-hitting.patch @@ -0,0 +1,140 @@ +From 6fd45abb31807dea0b9ebe708d840b1369353a8c Mon Sep 17 00:00:00 2001 +From: Chris Wilson <chris@chris-wilson.co.uk> +Date: Mon, 25 Jan 2010 15:15:04 +0000 +Subject: [PATCH 1/1] Extract pixel value for all formats to avoid hitting fallbacks. + +On failing to extract the pixel value for an alpha-only solid we +actually triggered a fallback. Since this path is commonly hitting +whilst fading in images, for example cairo_paint_with_alpha(), the +fallback was detected during the Moblin boot sequence where it was +adding a second to the overall boot time. + +See + fallback intel: Moblin startup is hitting a composite fallback, costing + a ton of performance + https://bugs.freedesktop.org/show_bug.cgi?id=26189 + +Based on the initial patch by Arjan van de Van. + +Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> +(cherry picked from commit 197cb08a2d54cabbfe97454d7db85cfe1f5f27ba) +--- + uxa/uxa-render.c | 64 ++++++++++++++++++++++++++++++++--------------------- + 1 files changed, 39 insertions(+), 25 deletions(-) + +diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c +index 525f75b..52ebb62 100644 +--- a/uxa/uxa-render.c ++++ b/uxa/uxa-render.c +@@ -138,11 +138,6 @@ uxa_get_pixel_from_rgba(CARD32 * pixel, + int rbits, bbits, gbits, abits; + int rshift, bshift, gshift, ashift; + +- *pixel = 0; +- +- if (!PICT_FORMAT_COLOR(format)) +- return FALSE; +- + rbits = PICT_FORMAT_R(format); + gbits = PICT_FORMAT_G(format); + bbits = PICT_FORMAT_B(format); +@@ -150,6 +145,14 @@ uxa_get_pixel_from_rgba(CARD32 * pixel, + if (abits == 0) + abits = PICT_FORMAT_BPP(format) - (rbits+gbits+bbits); + ++ if (PICT_FORMAT_TYPE(format) == PICT_TYPE_A) { ++ *pixel = alpha >> (16 - abits); ++ return TRUE; ++ } ++ ++ if (!PICT_FORMAT_COLOR(format)) ++ return FALSE; ++ + if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) { + bshift = 0; + gshift = bbits; +@@ -162,6 +165,7 @@ uxa_get_pixel_from_rgba(CARD32 * pixel, + ashift = bshift + bbits; + } + ++ *pixel = 0; + *pixel |= (blue >> (16 - bbits)) << bshift; + *pixel |= (red >> (16 - rbits)) << rshift; + *pixel |= (green >> (16 - gbits)) << gshift; +@@ -179,43 +183,53 @@ uxa_get_rgba_from_pixel(CARD32 pixel, + int rbits, bbits, gbits, abits; + int rshift, bshift, gshift, ashift; + +- if (!PICT_FORMAT_COLOR(format)) +- return FALSE; +- + rbits = PICT_FORMAT_R(format); + gbits = PICT_FORMAT_G(format); + bbits = PICT_FORMAT_B(format); + abits = PICT_FORMAT_A(format); + +- if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) { ++ if (PICT_FORMAT_TYPE(format) == PICT_TYPE_A) { ++ rshift = gshift = bshift = ashift = 0; ++ } else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) { + bshift = 0; + gshift = bbits; + rshift = gshift + gbits; + ashift = rshift + rbits; +- } else { /* PICT_TYPE_ABGR */ ++ } else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ABGR) { + rshift = 0; + gshift = rbits; + bshift = gshift + gbits; + ashift = bshift + bbits; ++ } else { ++ return FALSE; + } + +- *red = ((pixel >> rshift) & ((1 << rbits) - 1)) << (16 - rbits); +- while (rbits < 16) { +- *red |= *red >> rbits; +- rbits <<= 1; +- } ++ if (rbits) { ++ *red = ((pixel >> rshift) & ((1 << rbits) - 1)) << (16 - rbits); ++ while (rbits < 16) { ++ *red |= *red >> rbits; ++ rbits <<= 1; ++ } ++ } else ++ *red = 0; + +- *green = ((pixel >> gshift) & ((1 << gbits) - 1)) << (16 - gbits); +- while (gbits < 16) { +- *green |= *green >> gbits; +- gbits <<= 1; +- } ++ if (gbits) { ++ *green = ((pixel >> gshift) & ((1 << gbits) - 1)) << (16 - gbits); ++ while (gbits < 16) { ++ *green |= *green >> gbits; ++ gbits <<= 1; ++ } ++ } else ++ *green = 0; + +- *blue = ((pixel >> bshift) & ((1 << bbits) - 1)) << (16 - bbits); +- while (bbits < 16) { +- *blue |= *blue >> bbits; +- bbits <<= 1; +- } ++ if (bbits) { ++ *blue = ((pixel >> bshift) & ((1 << bbits) - 1)) << (16 - bbits); ++ while (bbits < 16) { ++ *blue |= *blue >> bbits; ++ bbits <<= 1; ++ } ++ } else ++ *blue = 0; + + if (abits) { + *alpha = +-- +1.7.0.2 + |