summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2009-06-08 21:14:14 -0400
committerEric Anholt <eric@anholt.net>2009-06-09 10:28:27 -0700
commitee539e58c3bf39766c560d625f6e4158d419e64e (patch)
tree1aa127333f7eebe1f096dbf59e910664d3d8c59c
parent4698b3bd79452ae2066a3d195cf58dd5e30c93f3 (diff)
Fall back to fb pixmaps for backing glyph pictures
GEM pads pixmaps to 512 byte stride and backs them with a kernel side buffer objects. We typically don't render out of glyph pictures, so we're incurring a lot of overhead per glyph by allocating a GEM pixmap per glyph. By looking at the usage hint, we can fall back to fbCreatePixmap for pixmaps backing glyph pictures, which gives us a nice tight malloced pixmap. The fast path for text rendering is compositing from the glyph cache pixmap to the destination, which shouldn't be significantly affected. Quick bit of testing: (firefox-20090601) xlib-rgba-before 384512.49: 1.01x xlib-rgba-after 389633.94: 1.00x The difference being within the margin of error for the benchmark. Signed-off-by: Eric Anholt <eric@anholt.net> Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/i830_exa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/i830_exa.c b/src/i830_exa.c
index d0ada02f..eb35014e 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -598,6 +598,9 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
if (w > 32767 || h > 32767)
return NullPixmap;
+ if (usage == CREATE_PIXMAP_USAGE_GLYPH_PICTURE)
+ return fbCreatePixmap (screen, w, h, depth, usage);
+
pixmap = fbCreatePixmap (screen, 0, 0, depth, usage);
if (w && h)