leftovers:
1) config file path. Has to implement compatibility functionalities before
we can change it.
2) links in man pages. Has to migrate the repo first.
3) _COMPTON_SHADOW, it has become a defacto standard, so we have to keep
supporting it.
4) dbus names, undecided whether we should/could change it.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
During normalization of the kernel, the center element is added to the
sum twice, causing the resulting elements to be smaller than they should
be.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
After converting from struct conv to xorg format, cache the result to
save CPU time.
And remove an unused function.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Instead of storing them as an array of xfixed.
Might cause some performance overhead for the new backend, because
it is allocating a buffer to do the conversion every frame. Will fix
later.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
As a global variable, since they shouldn't change during the period
compton is running. Also limit the scope of the variable to x.c.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Slightly clean up header inclusion with the help of clang's module system.
It's better for files to include the things you need directly.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
They should be useful for the refactored backends.
Renamed x_create_picture to x_create_picture_with_pictfmt.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
And improve some of the log messages. Like, when compton exits because
of unsupported options, explain which options are causing compton to
quit.
Convert some debugging messages that are guarded behind ifdef's to log_trace,
so user don't need to re-compile to enabled them.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Moved:
* Blur kernel related functions to kernel.c
* Vsync related functions to vsync.c
* paint related functions to render.c
This will make the `split-backend` branch easier to rebase.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This should give us sane item size, i.e. the item has the same number of
bits their format says they have.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This reverts commit 50e2259404.
Temporarily revert the removal until we have more information about this whole
thing.
Turns out a couple of drivers don't work properly without the sync fence,
including intel, llvmpipe and NVIDIA.
Although sync fence is needed, from the information I have gathered (looking
at old bug reports, protocol specifications, look at other compositors' code),
compton's usage of it is not proper. So we need to rewrite it in the future,
after we get more information from driver developers.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This was a dubious "fix" for a Nvidia driver problem. The problem was
never fully understood, and the then developers took a shotgun approach
and implemented xsync fences as a fix. Which somehow fixed the problem.
Again, I don't see any indication that the developers understood why
this "fix" worked.
(for details, see chjj/compton#152 and chjj/compton#181)
The driver problem should have been fixed almost 5 years ago. So this
shouldn't be needed anymore. In addition the way compton uses xsync fences
is apparently wrong according to the xsync spec (fences are attached to
screen, but compton uses them as if they were attached to drawables).
So, I will try removing it and see if anyone will complain. If there are
real concrete reasons why fences are needed, it will be brought back.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
IANAL, but I think I am allowed to add missing copyright notices for
someone else. And I did my best job using git history to figure out who
wrote which functions. So I hope everything is fine.
Instead use win_has_alpha to check for alpha channel, window mode is
reserved for determine if the window is possibly transparent.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>