Yuxuan Shui
198dcdb987
gl_common: fix coordinate mismatch
...
Xorg uses top left as origin, OpenGL uses lower left. So we need to flip
the y axis, and make sure we are using the right points as origin of
windows.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-28 01:14:41 +00:00
Yuxuan Shui
3b21365e94
gl_common: fix rendering
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-28 00:48:26 +00:00
Yuxuan Shui
6e454adff1
glx (new backend): Add some missing functions
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-28 00:04:01 +00:00
Yuxuan Shui
8c71f3fcbe
Move some macros around
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-27 23:57:43 +00:00
Yuxuan Shui
5364c8ac9b
Add backend_info_t::max_buffer_age
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-27 19:45:40 +00:00
Yuxuan Shui
d92a546beb
Fix includes and typos in new backends
2019-01-27 19:34:26 +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
yshui
5a1975909a
Merge pull request #93 from yshui/gl-reuse
...
Reuse some code from the new gl backend
2019-01-27 18:18:51 +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
290ec7fb04
Don't pretend that we have glStringMarker
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-27 17:45:38 +00:00
Yuxuan Shui
6c6dd6ad7d
Remove unused session_t argument from gl_has_extension
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-26 23:08:32 +00:00
Yuxuan Shui
031356069a
new glx: Add glx_present
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-26 18:01:24 +00:00
yshui
4bc2870ddf
Merge pull request #86 from yshui/damage-ring
...
Make buffer age not glx specific
2019-01-26 15:11:13 +00:00
Yuxuan Shui
e80ff8530e
Make buffer age not glx specific
...
Buffer age is not a glx specific concept. xrender backend can have
buffer age too, if double buffering is used (required if we want to use
Present). So, make buffer age a generic concept in compton is required
for further backend improvements.
Moved buffer age based damage aggragation out of glx as well.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-26 15:07:09 +00:00
Yuxuan Shui
5e49ab0861
Make sure draw_idle is stopped in all cases
...
Previously, compton fails to stop draw_idle in some cases when sw_opti
is enabled.
sw_opti is a feature that limits the draw frequence to vblank frequence.
It adds a delay to drawing when the screen is updated more frequently
than the vblank frequence. However when the delay is not used (i.e. the
screen is updated infrequent enough), compton will start drawing the
frame directly without using the delay. And specically in this case,
compton will fail to stop the draw_idle, causing a callback to be called
once per loop of the mainloop, resulting in high CPU usage.
Fixes #92
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-25 00:35:24 +00:00
yshui
377b18a00f
Merge pull request #89 from yshui/fmodules
...
Even more includes
2019-01-20 22:14:00 +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
yshui
4bdbd48e55
Merge pull request #88 from yshui/fmodules
...
Improve the header includes, cont'd
2019-01-20 17:12:48 +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
1e0deea57f
Improve the include situation
...
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>
2019-01-18 23:30:44 +00:00
Yuxuan Shui
c93789f5e9
Enable the glStringMarker logger when available
...
glStringMarker is usually only available when running under some
kind of GL debugger, and can be used to insert strings into the
GL command string. Writing logs using it can be useful, since it
lets us correspond GL calls with what happens in compton.
More info about the extension can be found here:
https://www.khronos.org/registry/OpenGL/extensions/GREMEDY/GREMEDY_string_marker.txt
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-09 21:58:16 +00:00
Yuxuan Shui
fed4634250
Check in .clang-format
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-08 22:14:09 +00:00
Yuxuan Shui
dd02ea31ae
Fix copying damage region with wrong size
...
Fortunately this hasn't caused problems...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-08 21:34:56 +00:00
Yuxuan Shui
72e3468694
Add backend_info_t::buffer_age
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-08 21:32:54 +00:00
Yuxuan Shui
3e475d00b3
Enable more build tests
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-02 20:43:01 +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
34eb14fb0f
Tweak the default shadow-radius
...
We need to make the radius 1.5x bigger to achieve the same effect.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-02 11:14:27 +00:00
Yuxuan Shui
6d3ea3564b
Implement vsync for the new xrender backend
...
We use the Present extension for that, since it is the best option we
have.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-01 14:59:56 +00:00
Yuxuan Shui
6413ccbd71
Improve XSync extension detection
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-01 14:09:55 +00:00
Yuxuan Shui
428c24a6fa
Speed up shadow generation for small windows
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-01 11:35:59 +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
4aeffa36b8
Refactor shadow generation
...
Trying to make the code easier to understand. The logic is unchanged.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-01 10:54:21 +00:00
Yuxuan Shui
edb1139507
Add some comments to backend.h
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 23:30:45 +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
3b2e149369
Add missing include in x.h
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 14:30:53 +00:00
Yuxuan Shui
0b94bde004
Remove unused variable in backend/xrender.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 14:08:35 +00:00
Yuxuan Shui
6226ab1228
Fix memory leak in backend/xrender.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 08:22:57 +00:00
Yuxuan Shui
cb12430633
Use options_t::shadow_radius for shadow size calculation
...
No need to access gaussian_map
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 08:15:36 +00:00
Yuxuan Shui
4039a6db64
Remove all use of psglx from backend/glx.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 07:37:49 +00:00
Yuxuan Shui
a2022661e6
Move glx_init_blur to gl_common.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 07:18:38 +00:00
Yuxuan Shui
8629fee78f
Fix some static analyzer complains in glx.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 06:54:59 +00:00
Yuxuan Shui
f322bd4a53
Remove backend/gl/glx.h
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 01:53:25 +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
3e7b7bd608
Move glx_fbconfig_t to opengl.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 00:38:13 +00:00
Yuxuan Shui
e7a8adf2cc
Clear ps->sync_fence after error, part 2
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-30 22:13:30 +00:00
Yuxuan Shui
14f357ea2b
Clean up ps->sync_fence after error
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-30 08:05:16 +00:00
Yuxuan Shui
d12b3c1e1d
Add missing header files
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-30 08:00:22 +00:00