Commit Graph

7 Commits

Author SHA1 Message Date
Yuxuan Shui 7c15a1438a
chore: tweak .clang-tidy
1. Increase cognitive complexity threshold to 50. The default value of
   25 marks a lot of functions, which is too noisy to be useful.
2. Ignore int8_t in signed char to integer conversion check.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2024-02-16 15:43:52 +00:00
Yuxuan Shui a252cbf028
clang-tidy: disable some noisy warnings
Also fix some of the warnings

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-23 05:19:06 +01:00
Yuxuan Shui 21dfe20794
backend: rename copy -> clone_image
This feels more appropriate as this operation doesn't necessarily copy
data.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-06-14 01:58:30 +01:00
Yuxuan Shui d9c9742132
backend: xrender: implement read_pixel
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-06-09 01:51:33 +01:00
Yuxuan Shui 06c58d0b8e
render: avoid left shifting negative values
It's undefined behavior.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-16 22:55:33 +00:00
Yuxuan Shui dc37370a66
x: remove the last bit of Xlib dependency
Of course, we still use GLX, so we can't completely remove Xlib yet. But
this removes all Xlib uses outside of the backends.

This drops support for COMPOUND_TEXT Xorg strings, so people how wants
multilingual support has to use UTF8, which should be fine since most of
the applications support that.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 07:58:01 +01:00
Yuxuan Shui cdb9765802
Add a .clang-tidy file
We currently don't use it for anything. We could add a CI pass in the
future.

We don't enable clang-analyzer checks. The checks enabled here should
mostly be syntax/style linting only, and should be cheap to run.
clang-analyzer checks are usually compute-intensive, and can easily be run
separately anyway, with scan-build and such.

The list of checks definitely isn't final.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-08-30 14:42:39 +01:00