Commit Graph

13 Commits

Author SHA1 Message Date
Yuxuan Shui 3707f792fb
new_backend: New interface
Move more logic out of the backend. The backends are now more agnostic
to what happens in compton.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-03-03 22:18:34 +00:00
Yuxuan Shui a826e0ce79
Window state tracking refactor
Window state tracking is basically the back bond of window fading. We
add a new enum field to the win struct to track the state of the window,
instead of using a set of boolean variables. We also remove the fading
callbacks, since it is only used for fading, so the potential of code
reuse is lost. And it makes the code slightly harder to understand.

Also fixed a problem that --no-fading-openclose is not behaving as
advertised (from my observation, enabling this flag disables fading
entirely, instead of just diabling it for open/close).

Also uses double for opacity everywhere internally. Use opacity_t only
when setting X opacity prop.

TODO: Remove win::*_last

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-02-17 16:37:28 +00:00
Yuxuan Shui b1d8687b31
Add copyright notice to backend/**
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-02-03 18:47:36 +00:00
Yuxuan Shui 7ac351e5b5
Move some default_* functions to backend_common.c
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-02-03 18:41:02 +00:00
Yuxuan Shui 22f0d10c65
Make backend_info_t::buffer_age optional
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-27 19:32:07 +00:00
Yuxuan Shui b50f15c835
Adapt paint_all_new to new interface
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-27 19:29:02 +00:00
Yuxuan Shui e898526afb
Add glx_backend to backend_list
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-27 19:28:15 +00:00
Yuxuan Shui 99b3c4575f
Fix handling of region == NULL in paint_all_new
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-27 18:21:42 +00:00
Yuxuan Shui f649a949e2
Even more includes
Expand the modulemap to cover some of the system headers too.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-20 22:09:22 +00:00
Yuxuan Shui 916e23861a
Improve the header includes, cont'd
Also check in the modulemap file, and add a option to build with clang's
-fmodules.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-20 17:10:06 +00:00
Yuxuan Shui 82e8b09d56
Move paint_all_new to backend.c
Fix build with -Dnew_backends=false. And more build test for this case.

Fixes #83

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-02 20:36:33 +00:00
Yuxuan Shui 86713c8170
Add make_shadow and paint_all_new to backend_common.c
Also made make_shadow private in render.c

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 14:30:58 +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