Improvement: GLX: Cache region contents & --glx-no-rebind-pixmap

- Cache region contents in is_region_empty(), mostly useful only for GLX
  backend to save one roundtrip to X.

- GLX backend: Add --glx-no-rebind-pixmap, which prevents rebinding of
  GLX texture to pixmap on content change. It doesn't work on some
  drivers, but it saves some CPU on those where it does.

- Wrap XFree() with a new function cxfree() since its man page claims
  NULL pointers are not acceptable (although in fact it does...).

- Use macro to save some code in get_cfg(). Code clean-up.
This commit is contained in:
Richard Grenville
2013-04-05 21:05:19 +08:00
parent 6ef23e066f
commit e3a15d5f94
5 changed files with 132 additions and 164 deletions

View File

@@ -1183,7 +1183,7 @@ c2_match_once_leaf(session_t *ps, win *w, const c2_l_t *pleaf,
// Free the string after usage, if necessary
if (tgt_free) {
if (C2_L_TATOM == pleaf->type)
XFree(tgt_free);
cxfree(tgt_free);
else
free(tgt_free);
}