Skip to content

Commit e7de442

Browse files
committed
Deprecate --vsync-aggressive
Original developer's word in man page: "Reported to work pretty terribly". Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
1 parent 22da176 commit e7de442

File tree

5 files changed

+5
-22
lines changed

5 files changed

+5
-22
lines changed

man/compton.1.asciidoc

-3
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ OPTIONS
144144
(Note some VSync methods may not be enabled at compile time.)
145145
--
146146

147-
*--vsync-aggressive*::
148-
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.
149-
150147
*--sw-opti*::
151148
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.
152149

src/compton.c

-1
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,6 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
22272227
.refresh_rate = 0,
22282228
.sw_opti = false,
22292229
.vsync = VSYNC_NONE,
2230-
.vsync_aggressive = false,
22312230

22322231
.shadow_red = 0.0,
22332232
.shadow_green = 0.0,

src/dbus.c

-6
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,6 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) {
990990
cdbus_m_opts_get_do(redirected_force, cdbus_reply_enum);
991991
cdbus_m_opts_get_do(stoppaint_force, cdbus_reply_enum);
992992
cdbus_m_opts_get_do(logpath, cdbus_reply_string);
993-
cdbus_m_opts_get_stub(synchronize, cdbus_reply_bool, false);
994993

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

10101007
cdbus_m_opts_get_do(shadow_red, cdbus_reply_double);
10111008
cdbus_m_opts_get_do(shadow_green, cdbus_reply_double);
@@ -1014,7 +1011,6 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) {
10141011
cdbus_m_opts_get_do(shadow_offset_x, cdbus_reply_int32);
10151012
cdbus_m_opts_get_do(shadow_offset_y, cdbus_reply_int32);
10161013
cdbus_m_opts_get_do(shadow_opacity, cdbus_reply_double);
1017-
cdbus_m_opts_get_stub(clear_shadow, cdbus_reply_bool, true);
10181014
cdbus_m_opts_get_do(xinerama_shadow_crop, cdbus_reply_bool);
10191015

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

10361032
#ifdef CONFIG_OPENGL
1037-
cdbus_m_opts_get_stub(glx_use_copysubbuffermesa, cdbus_reply_bool, false);
1038-
cdbus_m_opts_get_stub(glx_copy_from_front, cdbus_reply_bool, false);
10391033
cdbus_m_opts_get_do(glx_no_stencil, cdbus_reply_bool);
10401034
cdbus_m_opts_get_do(glx_no_rebind_pixmap, cdbus_reply_bool);
10411035
cdbus_m_opts_get_do(glx_swap_method, cdbus_reply_int32);

src/options.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ static const struct option longopts[] = {
382382
{"dbe", no_argument, NULL, 272},
383383
{"paint-on-overlay", no_argument, NULL, 273},
384384
{"sw-opti", no_argument, NULL, 274},
385-
{"vsync-aggressive", no_argument, NULL, 275},
386385
{"use-ewmh-active-win", no_argument, NULL, 276},
387386
{"respect-prop-shadow", no_argument, NULL, 277},
388387
{"unredir-if-possible", no_argument, NULL, 278},
@@ -632,7 +631,11 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
632631
"when possible");
633632
break;
634633
P_CASEBOOL(274, sw_opti);
635-
P_CASEBOOL(275, vsync_aggressive);
634+
case 275:
635+
// --vsync-aggressive
636+
log_warn("--vsync-aggressive has been deprecated, please remove it"
637+
" from the command line options");
638+
break;
636639
P_CASEBOOL(276, use_ewmh_active_win);
637640
P_CASEBOOL(277, respect_prop_shadow);
638641
P_CASEBOOL(278, unredir_if_possible);

src/render.c

-10
Original file line numberDiff line numberDiff line change
@@ -950,13 +950,6 @@ void paint_all(session_t *ps, win *const t, bool ignore_damage) {
950950
#endif
951951
}
952952

953-
// Wait for VBlank. We could do it aggressively (send the painting
954-
// request and XFlush() on VBlank) or conservatively (send the request
955-
// only on VBlank).
956-
// TODO Investigate and potentially remove this option
957-
if (!ps->o.vsync_aggressive)
958-
vsync_wait(ps);
959-
960953
switch (ps->o.backend) {
961954
case BKEND_XRENDER:
962955
if (ps->o.monitor_repaint) {
@@ -1016,9 +1009,6 @@ void paint_all(session_t *ps, win *const t, bool ignore_damage) {
10161009
default: assert(0);
10171010
}
10181011

1019-
if (ps->o.vsync_aggressive)
1020-
vsync_wait(ps);
1021-
10221012
x_sync(ps->c);
10231013

10241014
#ifdef CONFIG_OPENGL

0 commit comments

Comments
 (0)