Improvement: --glx-swap-method & --fade-exclude

- GLX backend: Add --glx-swap-method, to reduce painting region if the
  driver uses exchange or copy buffer swaps. Untested.

- Add --fade-exclude, to disable fading on specific windows based on
  some conditions. Untested.

- Expose GLX backend options through configuration file. Add fetching of
  GLX backend options through D-Bus.

- Use NULL pointer instead of element count to delimit string arrays in
  parse_vsync()/parse_backend()/parse_glx_swap_method().

- Add documentation about "wintypes" section in configuration file.
This commit is contained in:
Richard Grenville
2013-04-21 22:30:22 +08:00
parent a053c0ac64
commit 85e7d18803
6 changed files with 130 additions and 10 deletions

View File

@ -545,10 +545,20 @@ glx_paint_pre(session_t *ps, XserverRegion *preg) {
ps->glx_z = 0.0;
// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Exchange swap is interested in the raw damaged region only
XserverRegion all_damage_last = ps->all_damage_last;
ps->all_damage_last = None;
if (SWAPM_EXCHANGE == ps->o.glx_swap_method && *preg)
ps->all_damage_last = copy_region(ps, *preg);
// OpenGL doesn't support partial repaint without GLX_MESA_copy_sub_buffer,
// we could redraw the whole screen or copy unmodified pixels from
// front buffer with --glx-copy-from-front.
if (ps->o.glx_use_copysubbuffermesa || !*preg) {
if (ps->o.glx_use_copysubbuffermesa || SWAPM_COPY == ps->o.glx_swap_method
|| !*preg) {
}
else if (SWAPM_EXCHANGE == ps->o.glx_swap_method && all_damage_last) {
XFixesUnionRegion(ps->dpy, *preg, *preg, all_damage_last);
}
else if (!ps->o.glx_copy_from_front) {
free_region(ps, preg);
@ -572,6 +582,8 @@ glx_paint_pre(session_t *ps, XserverRegion *preg) {
}
}
free_region(ps, &all_damage_last);
glx_set_clip(ps, *preg, NULL);
}