Skip to content

Commit

Permalink
Deprecate --vsync-aggressive
Browse files Browse the repository at this point in the history
Original developer's word in man page: "Reported to work pretty terribly".

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
  • Loading branch information
yshui committed Mar 10, 2019
1 parent 22da176 commit e7de442
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 22 deletions.
3 changes: 0 additions & 3 deletions man/compton.1.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ OPTIONS
(Note some VSync methods may not be enabled at compile time.)
--

*--vsync-aggressive*::
Attempt to send painting request before VBlank and do XFlush() during VBlank. Reported to work pretty terribly. This switch may be lifted out at any moment.

*--sw-opti*::
Limit compton to repaint at most once every 1 / 'refresh_rate' second to boost performance. This should not be used with *--vsync* drm/opengl/opengl-oml as they essentially does *--sw-opti*'s job already, unless you wish to specify a lower refresh rate than the actual value.
Expand Down
1 change: 0 additions & 1 deletion src/compton.c
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,6 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
.refresh_rate = 0,
.sw_opti = false,
.vsync = VSYNC_NONE,
.vsync_aggressive = false,

.shadow_red = 0.0,
.shadow_green = 0.0,
Expand Down
6 changes: 0 additions & 6 deletions src/dbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,6 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) {
cdbus_m_opts_get_do(redirected_force, cdbus_reply_enum);
cdbus_m_opts_get_do(stoppaint_force, cdbus_reply_enum);
cdbus_m_opts_get_do(logpath, cdbus_reply_string);
cdbus_m_opts_get_stub(synchronize, cdbus_reply_bool, false);

cdbus_m_opts_get_do(refresh_rate, cdbus_reply_int32);
cdbus_m_opts_get_do(sw_opti, cdbus_reply_bool);
Expand All @@ -1004,8 +1003,6 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) {
cdbus_reply_string(ps, msg, BACKEND_STRS[ps->o.backend]);
return true;
}
cdbus_m_opts_get_stub(dbe, cdbus_reply_bool, false);
cdbus_m_opts_get_do(vsync_aggressive, cdbus_reply_bool);

cdbus_m_opts_get_do(shadow_red, cdbus_reply_double);
cdbus_m_opts_get_do(shadow_green, cdbus_reply_double);
Expand All @@ -1014,7 +1011,6 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) {
cdbus_m_opts_get_do(shadow_offset_x, cdbus_reply_int32);
cdbus_m_opts_get_do(shadow_offset_y, cdbus_reply_int32);
cdbus_m_opts_get_do(shadow_opacity, cdbus_reply_double);
cdbus_m_opts_get_stub(clear_shadow, cdbus_reply_bool, true);
cdbus_m_opts_get_do(xinerama_shadow_crop, cdbus_reply_bool);

cdbus_m_opts_get_do(fade_delta, cdbus_reply_int32);
Expand All @@ -1034,8 +1030,6 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) {
cdbus_m_opts_get_do(detect_client_leader, cdbus_reply_bool);

#ifdef CONFIG_OPENGL
cdbus_m_opts_get_stub(glx_use_copysubbuffermesa, cdbus_reply_bool, false);
cdbus_m_opts_get_stub(glx_copy_from_front, cdbus_reply_bool, false);
cdbus_m_opts_get_do(glx_no_stencil, cdbus_reply_bool);
cdbus_m_opts_get_do(glx_no_rebind_pixmap, cdbus_reply_bool);
cdbus_m_opts_get_do(glx_swap_method, cdbus_reply_int32);
Expand Down
7 changes: 5 additions & 2 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ static const struct option longopts[] = {
{"dbe", no_argument, NULL, 272},
{"paint-on-overlay", no_argument, NULL, 273},
{"sw-opti", no_argument, NULL, 274},
{"vsync-aggressive", no_argument, NULL, 275},
{"use-ewmh-active-win", no_argument, NULL, 276},
{"respect-prop-shadow", no_argument, NULL, 277},
{"unredir-if-possible", no_argument, NULL, 278},
Expand Down Expand Up @@ -632,7 +631,11 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
"when possible");
break;
P_CASEBOOL(274, sw_opti);
P_CASEBOOL(275, vsync_aggressive);
case 275:
// --vsync-aggressive
log_warn("--vsync-aggressive has been deprecated, please remove it"
" from the command line options");
break;
P_CASEBOOL(276, use_ewmh_active_win);
P_CASEBOOL(277, respect_prop_shadow);
P_CASEBOOL(278, unredir_if_possible);
Expand Down
10 changes: 0 additions & 10 deletions src/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,13 +950,6 @@ void paint_all(session_t *ps, win *const t, bool ignore_damage) {
#endif
}

// Wait for VBlank. We could do it aggressively (send the painting
// request and XFlush() on VBlank) or conservatively (send the request
// only on VBlank).
// TODO Investigate and potentially remove this option
if (!ps->o.vsync_aggressive)
vsync_wait(ps);

switch (ps->o.backend) {
case BKEND_XRENDER:
if (ps->o.monitor_repaint) {
Expand Down Expand Up @@ -1016,9 +1009,6 @@ void paint_all(session_t *ps, win *const t, bool ignore_damage) {
default: assert(0);
}

if (ps->o.vsync_aggressive)
vsync_wait(ps);

x_sync(ps->c);

#ifdef CONFIG_OPENGL
Expand Down

0 comments on commit e7de442

Please sign in to comment.