summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorRichard Grenville <[email protected]>2013-03-17 12:14:00 +0800
committerRichard Grenville <[email protected]>2013-03-17 12:14:00 +0800
commit17f7d31a5282d55182aec8938d52e13379dcc2bb (patch)
treefd396115887adb289b7a763f38520b91cfbf6fdf /common.h
parent74792903de7a88eda20aad031ca1f36cb56e2c2b (diff)
downloadtdebase-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 'common.h')
-rw-r--r--common.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/common.h b/common.h
index f36edf4ba..77aa582f6 100644
--- a/common.h
+++ b/common.h
@@ -339,6 +339,8 @@ typedef struct {
char *display;
/// The backend in use.
enum backend backend;
+ /// Whether to avoid using stencil buffer under GLX backend. Might be unsafe.
+ bool glx_no_stencil;
/// Whether to try to detect WM windows and mark them as focused.
bool mark_wmwin_focused;
/// Whether to mark override-redirect windows as focused.
@@ -724,6 +726,8 @@ typedef struct _win {
winmode_t mode;
/// Whether the window has been damaged at least once.
bool damaged;
+ /// Whether the window was damaged after last paint.
+ bool pixmap_damaged;
/// Damage of the window.
Damage damage;
/// Paint info of the window.
@@ -1574,9 +1578,13 @@ glx_bind_pixmap(session_t *ps, glx_texture_t **pptex, Pixmap pixmap,
void
glx_release_pixmap(session_t *ps, glx_texture_t *ptex);
+/**
+ * Check if a texture is binded, or is binded to the given pixmap.
+ */
static inline bool
-glx_tex_binded(const glx_texture_t *ptex) {
- return ptex && ptex->glpixmap && ptex->texture;
+glx_tex_binded(const glx_texture_t *ptex, Pixmap pixmap) {
+ return ptex && ptex->glpixmap && ptex->texture
+ && (!pixmap || pixmap == ptex->pixmap);
}
void