aboutsummaryrefslogtreecommitdiff
path: root/pgo (follow)
Commit message (Collapse)AuthorAgeLines
* fdm: add support for managing signalsDaniel Eklöf2021-02-12-1/+1
| | | | | | | | | | | | | | | | | | Add fdm_signal_add() and fdm_signal_del(). Signals added to the fdm will be monitored, and the provided callback called as “soon as possible” from the main context (i.e not from the signal handler context). Monitored signals are *blocked* by default. We use epoll_pwait() to unblock them while we’re polling. This allows us to do race-free signal detection. We use a single handler for all monitored signals; the handler simply updates the signal’s slot in a global array (sized to fit SIGRTMAX signals). When epoll_pwait() returns EINTR, we loop the global array. The callback associated with each signal that fired is called.
* shm: unbreak build without memfd_createJan Beich2021-01-23-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New FreeBSD versions have memfd_create but other BSDs don't. pgo/pgo.c:260:22: error: implicit declaration of function 'memfd_create' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int mem_fd = memfd_create("foot-pgo-ptmx", MFD_CLOEXEC); ^ pgo/pgo.c:260:52: error: use of undeclared identifier 'MFD_CLOEXEC' int mem_fd = memfd_create("foot-pgo-ptmx", MFD_CLOEXEC); ^ shm.c:13:10: fatal error: 'linux/mman.h' file not found #include <linux/mman.h> ^~~~~~~~~~~~~~ shm.c:277:15: error: implicit declaration of function 'memfd_create' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pool_fd = memfd_create("foot-wayland-shm-buffer-pool", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ shm.c:277:60: error: use of undeclared identifier 'MFD_CLOEXEC' pool_fd = memfd_create("foot-wayland-shm-buffer-pool", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ shm.c:277:74: error: use of undeclared identifier 'MFD_ALLOW_SEALING' pool_fd = memfd_create("foot-wayland-shm-buffer-pool", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ shm.c:339:15: error: use of undeclared identifier 'F_SEAL_GROW' F_SEAL_GROW | F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0) ^ shm.c:339:29: error: use of undeclared identifier 'F_SEAL_SHRINK' F_SEAL_GROW | F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0) ^ shm.c:339:71: error: use of undeclared identifier 'F_SEAL_SEAL' F_SEAL_GROW | F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0) ^ shm.c:338:24: error: use of undeclared identifier 'F_ADD_SEALS' if (fcntl(pool_fd, F_ADD_SEALS, ^
* pgo: stub implementation of reaper_del()Daniel Eklöf2021-01-21-0/+1
|
* terminal: shutdown (or --hold) when the client process terminatesDaniel Eklöf2021-01-21-0/+4
| | | | | | | | | Shutdown the terminal when the client process terminates, not when the ptmx file descriptor is closed. This fixes an issue where the terminal remains running after the client process has terminated, if it spawned child processes that inherited the ptmx file descriptor.
* notify: break out desktop notifications from osc.cDaniel Eklöf2020-12-10-0/+5
|
* ime: add functions to enable/disable IME, simplify code that enables IMEDaniel Eklöf2020-12-07-0/+3
| | | | | | | | | | | | | | | | | We may want to be able to enable/disable IME run-time, even though we have received an ‘enter’ IME event. This enables us to do that. Also add functions to enable/disable IME on a per-terminal instance basis. A terminal may have multiple seats focusing it, and enabling/disabling IME in a terminal instance enables/disables IME on all those seats. Finally, the code to enable IME is simplified; the *only* surface that can ever receive ‘enter’ IME events is the main grid. All other surfaces are sub-surfaces, without their own keyboard focus.
* sixel: change default max size to 10000x10000Daniel Eklöf2020-11-23-1/+7
| | | | | It used to be the size of the window. This caused images to be cropped when the application emitting them didn’t change the max size.
* pgo: feed VT data through fdm_ptmx(), not vt_from_slave()Daniel Eklöf2020-11-22-6/+61
| | | | | | | | | | | | | | | | | fdm_ptmx(), the FDM callback handler for ptmx data, is just as much in the hot path as vt_from_slave(). It is also slightly more complicated than a read() followed by a call to vt_from_slave(). As a result, some benchmarks performed significantly worse in a partial PGO build than in a full PGO build, since fdm_ptmx() wasn’t PGO:d. To be able to feed data through fdm_ptmx(), we need to set up the delayed rendering timer FDs, configure the timeout values, and provide a readable FD it can read the VT data from. The latter is done with a memory FD. This ensures *all* VT data is loaded into memory before we feed it to the parser.
* pgo: initialize (mouse) selectionDaniel Eklöf2020-11-22-0/+4
|
* pgo: initialize a dummy wayland backendDaniel Eklöf2020-11-22-0/+11
| | | | | | * Empty seat list * Empty monitor list * Add dummy terminal instance to terminal list
* remove pre-generated input corpus for PGODaniel Eklöf2020-11-22-1/+0
|
* pgo: updated stimuli (256-indexed colors)Daniel Eklöf2020-11-22-262144/+1
|
* pgo: pull in selection.c in pgolibDaniel Eklöf2020-11-22-63/+3
| | | | | Some of the selection functions are in the hot path, so this makes a huge difference!
* pgo: support for specifying multiple stimuli filesDaniel Eklöf2020-11-22-14/+56
|
* pgo: move pgo.c and pgo stimuli to pgo directoryDaniel Eklöf2020-11-22-0/+262377