Yuxuan Shui
2bc180c2a7
core: don't request vblank events when we are not rendering
...
Previously everytime we receive a vblank event, we always request a new
one. This made the logic somewhat simpler. But this generated many
useless vblank events, and wasted power. We only need vblank events for
two things:
1. after we rendered a frame, we need to know when it has been displayed
on the screen.
2. estimating the refresh rate.
This commit makes sure we only request vblank events when it's actually
needed.
Fixes #1079
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-19 09:59:46 +00:00
Yuxuan Shui
580889488f
core: simplify the pacing logic a little bit
...
Make it simpler to stop requesting PresentCompleteNotify when there is
nothing to render.
Related: #1079
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-19 09:59:43 +00:00
Yuxuan Shui
ce160cf432
core: don't call schedule_render too early
...
I mistakenly assumed that PresentCompleteNotify event signifies the end
of a vblank (or the start of scanout). But actually this event can in
theory in sent at any point during a vblank, with its timestamp pointing
to when the end of vblank is. (that's why we often find the timestamp to
be in the future).
Add a delay so schedule_render is actually called at the end of vblank,
so it doesn't mistakenly think the render is too slow to complete.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-18 04:37:03 +00:00
Yuxuan Shui
e60cb65672
log: give verbose log level a color
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-18 04:18:18 +00:00
Yuxuan Shui
c7ec4c2c16
log: fix printing and parsing of the verbose log level
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-18 04:15:27 +00:00
Yuxuan Shui
aed2a205ed
log: add a new log level, verbose
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-18 04:11:18 +00:00
Yuxuan Shui
7366553be2
core: distinguish preprocess failure and no window to render
...
paint_process would return NULL for both of these cases, but we should exit in
the failure case, and continue going in the other.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-17 23:44:56 +00:00
Yuxuan Shui
268e1d890a
core: exit if paint_preprocess fails
...
This usually means there is another compositor running. If we don't do
this picom will spin forever.
Fixes #1104
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-17 23:34:34 +00:00
Yuxuan Shui
e92745671b
compiler: use C23 auto when available
...
One annoying thing is C23 still defines auto as a storage class despite
it now being used for type inference. As a consequence we must write
"auto const" instead of the more natural "const auto".
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-17 08:55:23 +00:00
Yuxuan Shui
1b97f18e5f
compiler: bring the unreachable macro in line with C23
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-17 08:51:22 +00:00
Yuxuan Shui
47bb825b2c
backend: glx: don't return false from a function returning void *
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2023-12-17 08:51:20 +00:00
Yuxuan Shui
e90757a6ec
Merge pull request #1107 from absolutelynothelix/name-default-backend-operation-implementations-consistently
2023-12-16 22:03:14 +00:00
Yuxuan Shui
40d5f42f00
Merge pull request #1110 from colonelpanic8/nix_flake
2023-12-16 21:25:40 +00:00
Yuxuan Shui
a26e4df85d
Merge pull request #1105 from absolutelynothelix/backend-init-target-window-parameter
2023-12-16 17:28:24 +00:00
Yuxuan Shui
8b7c3ffb8b
Merge pull request #1124 from absolutelynothelix/premultiply-shadow-color
2023-12-16 17:27:22 +00:00
Maxim Solovyov
a6b4e285f8
backend: xrender: don't leak the mask picture in the blur function
2023-10-17 01:10:27 +03:00
Maxim Solovyov
e07b1d7a12
backend: gl: convert the shadow color to the premultiplied format
...
to respect the globally set glBlendFunc and thus get the correct and
expected result
2023-09-24 01:16:15 +03:00
Maxim Solovyov
44800ed845
backend: remove default implementations of obsolete backend operations
2023-09-24 01:15:42 +03:00
Maxim Solovyov
bd3134efd9
backend: xrender: remove obsolete commented out backend operations
2023-09-24 01:15:42 +03:00
Maxim Solovyov
8bf82857c4
backend: name default backend operation implementations consistently
2023-09-24 01:15:42 +03:00
Maxim Solovyov
156423c010
backend: dummy: change type of ps parameter to session_t in dummy_init
2023-09-24 01:14:55 +03:00
Maxim Solovyov
825cc563e1
backend: egl: simplify usage of the target window parameter in egl_init
2023-09-24 01:14:55 +03:00
Maxim Solovyov
249f681857
backend: make target window a parameter of the init backend operation
...
to address a todo
2023-09-24 01:14:55 +03:00
Maxim Solovyov
751f30578e
readme: update the discord badge's link
2023-09-23 00:36:19 +03:00
Maxim Solovyov
fbc803b983
c2: address some clang-tidy issues, run clang-format
2023-09-15 00:57:33 +03:00
Maxim Solovyov
a9914cda11
log: address some clang-tidy issues, run clang-format
2023-09-15 00:47:41 +03:00
Maxim Solovyov
0cd72bf61a
opengl: address some clang-tidy issues
2023-09-15 00:43:15 +03:00
Maxim Solovyov
c6abb4e270
picom.sample.conf: remove the dbus option duplicate
...
closes #1128
2023-09-15 00:20:59 +03:00
Maxim Solovyov
d9e5795818
Merge pull request #1106 from absolutelynothelix/use-root-visual-and-depth-directly-in-xrender-init
...
backend: xrender: don't use root picture format in backend_xrender_init
2023-09-10 22:46:48 +03:00
Maxim Solovyov
9e6842c607
Merge pull request #1102 from absolutelynothelix/drop-kawase-blur-method
...
config: drop kawase blur method
2023-09-10 22:44:56 +03:00
Maxim Solovyov
8cc5090a6c
string_utils: address some clang-tidy issues
2023-08-11 01:47:43 +03:00
Maxim Solovyov
f773e723be
options: address some clang-tidy issues
2023-08-11 01:40:47 +03:00
Maxim Solovyov
34024092d7
picom: address some clang-tidy issues
2023-08-11 01:38:22 +03:00
Maxim Solovyov
ae3c77b1a5
render: address some clang-tidy issues
2023-08-11 01:15:20 +03:00
Maxim Solovyov
c8627989ad
win: address some clang-tidy issues, run clang-format
2023-08-11 01:09:56 +03:00
Maxim Solovyov
72ede90147
dbus: address some clang-tidy issues
2023-08-11 01:04:58 +03:00
Maxim Solovyov
b528b87cc8
kernel: address some clang-tidy issues
2023-08-11 00:50:57 +03:00
Maxim Solovyov
8c29fb046b
region: address some clang-tidy issues, run clang-format
2023-08-11 00:47:14 +03:00
Ivan Malison
71782da245
Add nix flake
2023-08-06 17:51:18 -06:00
Maxim Solovyov
5d6957d3da
Merge pull request #1108 from absolutelynothelix/synchronize-readme-and-ci-packages
...
synchronize packages in readme with packages installed by ci
2023-08-03 23:19:32 +03:00
Maxim Solovyov
013c03c9a5
don't require the libevdev-dev package in readme and install by ci
...
it doesn't seem to be used
2023-08-03 22:58:02 +03:00
Maxim Solovyov
fd15a05166
synchronize packages in readme with packages installed by ci
...
some packages installed by ci were not listed (e.g. libxcb-util-dev) or
different (e.g. libgl1-mesa-dev) in readme
2023-08-03 22:48:08 +03:00
Maxim Solovyov
7713432927
backend: xrender: don't use root picture format in backend_xrender_init
...
use root visual and depth directly instead
2023-08-03 01:27:27 +03:00
Maxim Solovyov
6f868e54b9
meson.build: sort required packages alphabetically
...
and add a comment on why some xcb packages are in the required_packages
array instead of the required_xcb_packages one
2023-07-22 15:28:07 +03:00
Maxim Solovyov
d03cb4ea24
config_libconfig: address some clang-tidy issues, run clang-format
2023-07-22 02:17:13 +03:00
Maxim Solovyov
4a8b937c90
config: refactor the parse_blur_method function
...
sort blur methods alphabetically and address some clang-tidy issues
2023-07-22 01:19:22 +03:00
Maxim Solovyov
2c83fb821b
config: drop kawase blur method
...
it was added with intention to remove it later almost three years ago in
33c5a5a36b
2023-07-22 01:04:18 +03:00
Maxim Solovyov
bd47a47275
config: address some clang-tidy issues
2023-07-22 00:51:46 +03:00
Maxim Solovyov
599594465c
backend: address some clang-tidy issues
2023-07-22 00:22:02 +03:00
Maxim Solovyov
dc8def0492
backend: gl: address some clang-tidy issues
2023-07-22 00:16:31 +03:00