This should marginally speed up pixmap binding for the glx backend (we
don't need FBConfigs for egl).
Fix a long running complaint in #381 (unrelated issue, but there is
complaint in there about glXChooseFBConfig being called whenever we bind
a new pixmap).
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
to avoid creating and destroying it every frame
(cherry picked from commit 5a1990b236c85f1222098ef147398855cbb3af69)
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
it sets an x region to a pixman region
(cherry picked from commit efb7a1430f2c530c7b9cc0cb6d6d6cff95d8a4d9)
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Basically we won't call xcb_damage_subtract if show_all_xerrors is set,
which is very bad.
Fixes that, and also make sure the damage subtract request is flushed in
all branches.
Fixes: 1307d9ec70
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Instead of change window attributes back and forth, calculate the evmask
and set it just once. And also make sure the request is flushed.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
There is actually no specification what symbols are exported from a
libGL implementation. The (extremely outdated) OpenGL ABI specification
says only GL 1.2 functions are guaranteed. Don't know how relevant that
is now, but different libGL implementations do export different set of
symbols. On Linux we are most likely to be linked with libglvnd, which
has everything we need. But on other platforms this is not necessarily
the case, for example on OpenBSD we are missing glGetQueryObjectui64v.
Use libepoxy so we can outsource this problem and never worry about it
ever again. Plus it also saves us from calling GetProcAddress ourselves.
Changes other than trivial build fixes I have to make:
1. Can't use eglCreatePlatformWindowSurface/eglGetPlatformDisplay.
libepoxy checks for EGL 1.5 when resolving these functions. But
without a current context, libepoxy assumes we only have EGL 1.4.
This creates a chicken and egg problem - we need a display to call
eglGetPlatformDisplay. We have to use the *EXT version instead.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
I think I was trying to avoid introducing pthread as a dependency, but
now we are using pthread for SGI_video_sync thread anyway. Let's remove
the ifdefs.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
OpenBSD don't have support for sched_getparam(), sched_setparam(), or
sched_setscheduler() functions (yet). In this case, we need use
pthead-equivalents for real-time sched for picom. Theses changes add
this support.
Authored-by: Jose Maldonado aka Yukiteru <josemald89@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Image decouple should keep all the image properies from the source
image, so shader must be copied. And there are also some internal
properties what should be inherited but wasn't.
In particular this prevents images from losing their shaders when
alpha is applied.
Fixes#1174