Refactor FBConfig lookup
Background: To bind a Xorg window content to a OpenGL FBConfig, which has to match the color format the Xorg window is using. Previously, compton just find a FBConfig that has the same depth. This led to chjj/compton#477, which has been fixed by a ugly hack. The commit refactor the lookup mechanism to take as much into consideration as we reasonably can. Hopefully preventing similar breakages in the future. Also, some code sharing between the old and new glx backend. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -221,7 +221,6 @@ struct _glx_texture {
|
||||
GLenum target;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
unsigned depth;
|
||||
bool y_inverted;
|
||||
};
|
||||
|
||||
@ -310,8 +309,6 @@ typedef struct {
|
||||
f_ImportSyncEXT glImportSyncEXT;
|
||||
/// Current GLX Z value.
|
||||
int z;
|
||||
/// FBConfig-s for GLX pixmap of different depths.
|
||||
glx_fbconfig_t *fbconfigs[OPENGL_MAX_DEPTH + 1];
|
||||
#ifdef CONFIG_OPENGL
|
||||
glx_blur_pass_t blur_passes[MAX_BLUR_PASS];
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user