- zbuffer routines from scrap/zbuf.h
- gfx_margins should handle RLE compressed case, which should catuall be rather fast.
- Outline generator and ability to draw outline after blitting.
  Outline can be useful for unit selection and font border, when say white font is drawn agaisnt white background. If allowed to be retrieved, it can also be used for morphing and magic effects (I.e. precise auras around units).
- new_rle_gfx doesn't appear to copy gamma properly.
- There is a bug with gfx_recolor_xs returning gfx->recolors, which is then being overwritten in master thread, while slave thread could still need older values.
- We can draw some sprites using two threads, instead locking.
- A way to reuse previous blit settings: save bflags.
- Support for user-defined opaque handle.
- If RLE/rect quad texture mapping gets used a lot, we can probably cache the results, but it will require proper caching, because rect can be different.