diff options
author | Richard Grenville <[email protected]> | 2013-03-17 12:14:00 +0800 |
---|---|---|
committer | Richard Grenville <[email protected]> | 2013-03-17 12:14:00 +0800 |
commit | 17f7d31a5282d55182aec8938d52e13379dcc2bb (patch) | |
tree | fd396115887adb289b7a763f38520b91cfbf6fdf /compton.h | |
parent | 74792903de7a88eda20aad031ca1f36cb56e2c2b (diff) | |
download | tdebase-17f7d31a5282d55182aec8938d52e13379dcc2bb.tar.gz tdebase-17f7d31a5282d55182aec8938d52e13379dcc2bb.zip |
Bug fix: GLX backend incompatibility with VirtualBox & others
- GLX backend: Fix a bug that window content does not get updated on
VirtualBox, by rebinding texture when window content changes. This may
have a negative effect on performance.
- GLX backend: Add --glx-no-stencil to restore the old clipping method,
just in case.
- GLX backend: Apply stricter checks on texture-pixmap binding.
- GLX backend: Fix a bug that glx_set_clip() behaves incorrectly when
None is passed in.
- GLX backend: Use glEnable()/glDisable() to toggle stencil tests, in
hope to increase performance.
- Move window pixmap/picture fetching to win_paint_win(), in hope to
increase performance.
- Intersect shadow painting region with its bounding rectangle, in hope
to increase performance.
Diffstat (limited to 'compton.h')
-rw-r--r-- | compton.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -169,7 +169,7 @@ paint_isvalid(session_t *ps, const paint_t *ppaint) { return false; #ifdef CONFIG_VSYNC_OPENGL - if (BKEND_GLX == ps->o.backend && !glx_tex_binded(ppaint->ptex)) + if (BKEND_GLX == ps->o.backend && !glx_tex_binded(ppaint->ptex, None)) return false; #endif @@ -179,10 +179,12 @@ paint_isvalid(session_t *ps, const paint_t *ppaint) { * Bind texture in paint_t if we are using GLX backend. */ static inline bool -paint_bind_tex(session_t *ps, paint_t *ppaint, int wid, int hei, int depth) { +paint_bind_tex(session_t *ps, paint_t *ppaint, int wid, int hei, int depth, + bool force) { #ifdef CONFIG_VSYNC_OPENGL // TODO: Make sure we have the same Pixmap binded? - if (BKEND_GLX == ps->o.backend && !glx_tex_binded(ppaint->ptex)) { + if (BKEND_GLX == ps->o.backend + && (force || !glx_tex_binded(ppaint->ptex, ppaint->pixmap))) { return glx_bind_pixmap(ps, &ppaint->ptex, ppaint->pixmap, wid, hei, depth); } #endif |