diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-12-07 21:27:56 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-12-07 21:37:31 +0000 |
commit | c1afc831c8fe4cbececee7dfa23506a6746c2425 (patch) | |
tree | d15f586c68af3150aa6c09a45954daba9d88521d /uxa/uxa-priv.h | |
parent | cd475bad23c02130d11c49882c11261c9f0d4ef1 (diff) |
uxa: Cache solid fills.
Maintain a small cache of pixmaps to hold SolidFill pictures. Currently
we create a pixmap the size of the damaged region and fill that using
pixman before downloading it to the GPU and compositing. Needless to say
this is extremely expensive compared to simply emitting the solid
colour. To mitigate this cost, we maintain a small cache of 1x1R
pictures which is recognised by the driver as being a solid, but at the
very least is maintained as a GPU ready pixmap.
This gives a good boost to cairo-xcb (which uses solid fills) on a gm45:
Before:
gnome-terminal-vim: 41.9s
After:
gnome-terminal-vim: 31.7s
Compare with using a cache of 1x1R pixmaps in cairo-xcb:
gnome-terminal-vim: 31.6s
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa/uxa-priv.h')
-rw-r--r-- | uxa/uxa-priv.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h index 35961aa5..c1f3688c 100644 --- a/uxa/uxa-priv.h +++ b/uxa/uxa-priv.h @@ -135,6 +135,13 @@ typedef struct { #define UXA_NUM_GLYPH_CACHES 4 +typedef struct { + uint32_t color; + PicturePtr picture; +} uxa_solid_cache_t; + +#define UXA_NUM_SOLID_CACHE 16 + typedef void (*EnableDisableFBAccessProcPtr) (int, Bool); typedef struct { uxa_driver_t *info; @@ -162,6 +169,10 @@ typedef struct { unsigned offScreenCounter; uxa_glyph_cache_t glyphCaches[UXA_NUM_GLYPH_CACHES]; + + PicturePtr solid_clear, solid_black, solid_white; + uxa_solid_cache_t solid_cache[UXA_NUM_SOLID_CACHE]; + int solid_cache_size; } uxa_screen_t; /* |