Skip to content

Commit

Permalink
Remove the old backends
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Jul 26, 2019
1 parent 357968c commit 2338e67
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 3,188 deletions.
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,6 @@ We also try to fix bugs.

The original README can be found [here](README_orig.md)

## Call for testers

### `--experimental-backends`

This flag enables the refactored/partially rewritten backends.

Currently new backends features better vsync with the xrender backend, improved input lag with the glx backend (for non-NVIDIA users). The performance should be on par with the old backends.

New backend features will only be implemented on the new backends from now on, and the old backends will eventually be phased out after the new backends stabilizes.

To test the new backends, add the `--experimental-backends` flag to the command line you used to run compton. This flag is not available from the configuration file.

To report issues with the new backends, please state explicitly you are using the new backends in your report.

## Change Log

See [Releases](https://github.com/yshui/compton/releases)
Expand Down
4 changes: 0 additions & 4 deletions man/compton.1.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ OPTIONS
*--log-file*::
Set the log file. If *--log-file* is never specified, logs will be written to stderr. Otherwise, logs will to written to the given file, though some of the early logs might still be written to the stderr. When setting this option from the config file, it is recommended to use an absolute path.

*--experimental-backends*::
Use the new, reimplemented version of the backends. The new backends are HIGHLY UNSTABLE at this point, you have been warned. This option is not available in the config file.

*--show-all-xerrors*::
Show all X errors (for debugging).

Expand Down Expand Up @@ -395,7 +392,6 @@ Available options of the 'blur' section are: ::
*method*:::
A string. Controls the blur method. Corresponds to the `--blur-method` command line option. Available choices are:
'none' to disable blurring; 'gaussian' for gaussian blur; 'box' for box blur; 'kernel' for convolution blur with a custom kernel.
Note: 'gaussian' and 'box' blur methods are only supported by the experimental backends.
*size*:::
An integer. The size of the blur kernel, required by 'gaussian' and 'box' blur methods. For the 'kernel' method, the size is included in the kernel. Corresponds to the `--blur-size` command line option.
Expand Down
2 changes: 0 additions & 2 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ option('sanitize', type: 'boolean', value: false, description: 'Compile compton
option('config_file', type: 'boolean', value: true, description: 'Enable config file support')
option('regex', type: 'boolean', value: true, description: 'Enable regex support in window conditions')

option('vsync_drm', type: 'boolean', value: false, description: 'Enable support for using drm for vsync')

option('opengl', type: 'boolean', value: true, description: 'Enable features that require opengl (opengl backend, and opengl vsync methods)')
option('dbus', type: 'boolean', value: true, description: 'Enable support for D-Bus remote control')

Expand Down
2 changes: 2 additions & 0 deletions src/backend/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ srcs += [ files('backend_common.c', 'xrender/xrender.c', 'backend.c', 'driver.c'
# enable opengl
if get_option('opengl')
srcs += [ files('gl/gl_common.c', 'gl/glx.c') ]
cflags += ['-DCONFIG_OPENGL', '-DGL_GLEXT_PROTOTYPES']
deps += [ dependency('gl', required: true) ]
endif
66 changes: 0 additions & 66 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
#include <pixman.h>

#include "uthash_extra.h"
#ifdef CONFIG_OPENGL
#include "backend/gl/glx.h"
#endif

// X resource checker
#ifdef DEBUG_XRC
Expand Down Expand Up @@ -81,37 +78,6 @@ typedef struct _ignore {
unsigned long sequence;
} ignore_t;

#ifdef CONFIG_OPENGL
#ifdef DEBUG_GLX_DEBUG_CONTEXT
typedef GLXContext (*f_glXCreateContextAttribsARB)(Display *dpy, GLXFBConfig config,
GLXContext share_context, Bool direct,
const int *attrib_list);
typedef void (*GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity,
GLsizei length, const GLchar *message, GLvoid *userParam);
typedef void (*f_DebugMessageCallback)(GLDEBUGPROC, void *userParam);
#endif

typedef struct glx_prog_main {
/// GLSL program.
GLuint prog;
/// Location of uniform "opacity" in window GLSL program.
GLint unifm_opacity;
/// Location of uniform "invert_color" in blur GLSL program.
GLint unifm_invert_color;
/// Location of uniform "tex" in window GLSL program.
GLint unifm_tex;
} glx_prog_main_t;

#define GLX_PROG_MAIN_INIT \
{ .prog = 0, .unifm_opacity = -1, .unifm_invert_color = -1, .unifm_tex = -1, }

#else
struct glx_prog_main {};
#endif

#define PAINT_INIT \
{ .pixmap = XCB_NONE, .pict = XCB_NONE }

/// Linked list type of atoms.
typedef struct _latom {
xcb_atom_t atom;
Expand Down Expand Up @@ -175,28 +141,12 @@ typedef struct session {
xcb_window_t debug_window;
/// Whether the root tile is filled by compton.
bool root_tile_fill;
/// Picture of the root window background.
paint_t root_tile_paint;
/// The backend data the root pixmap bound to
void *root_image;
/// A region of the size of the screen.
region_t screen_reg;
/// Picture of root window. Destination of painting in no-DBE painting
/// mode.
xcb_render_picture_t root_picture;
/// A Picture acting as the painting target.
xcb_render_picture_t tgt_picture;
/// Temporary buffer to paint to before sending to display.
paint_t tgt_buffer;
/// Window ID of the window we register as a symbol.
xcb_window_t reg_win;
#ifdef CONFIG_OPENGL
/// Pointer to GLX data.
struct glx_session *psglx;
/// Custom GLX program used for painting window.
// XXX should be in struct glx_session
glx_prog_main_t glx_prog_win;
#endif
/// Sync fence to sync draw operations
xcb_sync_fence_t sync_fence;

Expand Down Expand Up @@ -284,12 +234,6 @@ typedef struct session {
/// Nanosecond offset of the first painting.
long paint_tm_offset;

#ifdef CONFIG_VSYNC_DRM
// === DRM VSync related ===
/// File descriptor of DRI device file. Used for DRM VSync.
int drm_fd;
#endif

// === X extension related ===
/// Event base number for X Fixes extension.
int xfixes_event;
Expand Down Expand Up @@ -323,14 +267,6 @@ typedef struct session {
int randr_error;
/// Whether X Present extension exists.
bool present_exists;
#ifdef CONFIG_OPENGL
/// Whether X GLX extension exists.
bool glx_exists;
/// Event base number for X GLX extension.
int glx_event;
/// Error base number for X GLX extension.
int glx_error;
#endif
/// Whether X Xinerama extension exists.
bool xinerama_exists;
/// Xinerama screen regions.
Expand All @@ -357,8 +293,6 @@ typedef struct session {
// === DBus related ===
void *dbus_data;
#endif

int (*vsync_wait)(session_t *);
} session_t;

/// Enumeration for window event hints.
Expand Down
Loading

0 comments on commit 2338e67

Please sign in to comment.