Skip to content
  • Chris Wilson's avatar
    uxa: Cache solid fills. · c1afc831
    Chris Wilson authored
    
    
    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: default avatarChris Wilson <chris@chris-wilson.co.uk>
    c1afc831