Commit Graph

11 Commits

Author SHA1 Message Date
Yuxuan Shui 5a72b5755d
backends: add egl backend
This needs the EGL_KHR_image_pixmap and the GL_EXT_EGL_image_storage
extensions, which unfortunately aren't available on NVIDIA cards.

Don't add documentation for these, for now.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-09-29 08:03:12 +01:00
Yuxuan Shui e2d990dc3d
backend: gl: split code into multiple files
gl_common.c is getting too big.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-25 13:31:54 +01:00
Yuxuan Shui 8eb9d07fa8
Add dummy backend
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-08-04 17:52:45 +01:00
Yuxuan Shui 685a583f84
backend: add preliminary support for driver detection
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-05-21 20:15:31 +01:00
Yuxuan Shui a2d0d5c826
xrender: move into its own folder
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-05-21 20:15:31 +01:00
Yuxuan Shui b0c5db9f5a
Let old/new backends co-exist
Now both the old and the new backends are compiled in, the user can
choose which one to use with a command line switch.

Lower the barrier for testing.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-02-20 17:52:24 +00:00
Yuxuan Shui 8922312e42
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>
2019-02-03 18:41:47 +00:00
Yuxuan Shui 061dd8e52e
Reuse some code from the new gl backend
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-27 18:16:28 +00:00
Yuxuan Shui 3686bf7a33
Use functions in backend/backend_common.c
Build backend_common.c even when new_backend=false.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-01 11:01:47 +00:00
Yuxuan Shui 61f55f69a6
Add backend/gl/glx.c to build
Still a long way to go for the glx backend.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 01:32:31 +00:00
Yuxuan Shui 0c4b690b2b
First step of split backend into modules
This commit introduced a new, modular backend interface. The interface
is not very good, since I don't think I fully understand all the
requirements writing a backend have. But this is a good first step.

This commit also includes an initial xrender backend written using the
new interface, and some opengl backend related helper functions, which
are taken from the old opengl backend.

However, there is not integration with the core compton yet. compton
will still use the old backend code. This commit is here so we can get
the automated build test.

What is implemented in the new xrender backend:

* Windows with transparency
* Shadow
* Opacity
* Wallpaper (getting the root pixmap)
* Blur

Known problem with the xrender backend:

* It is slower

Things that still need to be figured out:

* What is the better way to add vsync to the new backends

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-22 00:50:25 +00:00