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
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
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
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
4bfed7f7e3
Use one global XSync fence
...
And only sync once per frame.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-30 07:43:24 +00:00
Yuxuan Shui
80847dd3fa
Refactor the XSync fence code
...
Use a temporary fence everytime. Convert the Xlib XSync functions to use
xcb_sync_*.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-30 07:06:47 +00:00
Yuxuan Shui
51d03132bf
A bit more xcb conversion
...
None -> XCB_NONE
Window -> xcb_window_t
Atom -> xcb_atom_t
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-27 20:45:38 +00:00
Yuxuan Shui
db5a78790c
Make make_shadow() public
...
Some the refactored backends can use it.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-22 00:30:45 +00:00
Yuxuan Shui
6c00d46d7a
Some new x helper functions
...
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>
2018-12-21 23:47:31 +00:00
Yuxuan Shui
cb7d852b0f
Clean up options/config file parsing
...
* Pass a options_t, not session_t
* Slightly improve error handling when setting vsync method via dbus
The goal here is to limit the scope of what a given function can access.
And session_t contains basically everything, so don't pass it around.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-21 17:21:52 +00:00
Yuxuan Shui
832601354a
Convert printf_* in render.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 17:03:27 +00:00
Yuxuan Shui
22669889eb
Don't report allocation failure via logging
...
They will be reported by allocchk and will abort the program. There is
no point to log them.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 14:23:06 +00:00
Yuxuan Shui
e58cbf8add
Convert non-mandatory attributes to macros
...
They're shorter and more portable.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-19 20:50:02 +00:00
Yuxuan Shui
50ea3617ef
Move some deinitialization to render.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-16 03:00:56 +00:00
Yuxuan Shui
e7a15ba846
Format changes
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-16 02:50:39 +00:00
Yuxuan Shui
404a6b47ad
Move presum_gaussian to render.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-16 02:49:41 +00:00
Yuxuan Shui
a48e1f65a9
Fix building with opengl, again
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-16 02:48:02 +00:00
Yuxuan Shui
9ce1387f52
Move a few more functions into render.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-16 00:53:54 +00:00
Yuxuan Shui
baeb4572ff
Move rendering related functions out of compton.c
...
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>
2018-12-16 00:50:46 +00:00