Add -Dnoscanout debug option

This can help debugging direct scan-out issues, such as [1].

[1]: https://github.com/swaywm/wlroots/issues/3185
master
Simon Ser 3 years ago committed by Kenny Levinsen
parent 033061aee6
commit 82d5f12914

@ -119,6 +119,7 @@ struct sway_debug {
bool noatomic; // Ignore atomic layout updates bool noatomic; // Ignore atomic layout updates
bool txn_timings; // Log verbose messages about transactions bool txn_timings; // Log verbose messages about transactions
bool txn_wait; // Always wait for the timeout before applying bool txn_wait; // Always wait for the timeout before applying
bool noscanout; // Disable direct scan-out
enum { enum {
DAMAGE_DEFAULT, // Default behaviour DAMAGE_DEFAULT, // Default behaviour

@ -507,7 +507,7 @@ static int output_repaint_timer_handler(void *data) {
fullscreen_con = workspace->current.fullscreen; fullscreen_con = workspace->current.fullscreen;
} }
if (fullscreen_con && fullscreen_con->view) { if (fullscreen_con && fullscreen_con->view && !debug.noscanout) {
// Try to scan-out the fullscreen view // Try to scan-out the fullscreen view
static bool last_scanned_out = false; static bool last_scanned_out = false;
bool scanned_out = bool scanned_out =

@ -182,6 +182,8 @@ void enable_debug_flag(const char *flag) {
debug.txn_timings = true; debug.txn_timings = true;
} else if (strncmp(flag, "txn-timeout=", 12) == 0) { } else if (strncmp(flag, "txn-timeout=", 12) == 0) {
server.txn_timeout_ms = atoi(&flag[12]); server.txn_timeout_ms = atoi(&flag[12]);
} else if (strcmp(flag, "noscanout") == 0) {
debug.noscanout = true;
} else { } else {
sway_log(SWAY_ERROR, "Unknown debug flag: %s", flag); sway_log(SWAY_ERROR, "Unknown debug flag: %s", flag);
} }

Loading…
Cancel
Save