<NME> main.rs
<BEF> use slog::{crit, o, Drain};

static POSSIBLE_BACKENDS: &[&str] = &[
    #[cfg(feature = "winit")]
    "--winit : Run anvil as a X11 or Wayland client using winit.",
    #[cfg(feature = "udev")]
    "--tty-udev : Run anvil as a tty udev client (requires root if without logind).",
    #[cfg(feature = "x11")]
    "--x11 : Run anvil as an X11 client.",
];


#[macro_use]
mod shaders;
mod glium_drawer;
mod input_handler;
mod shell;
            o!(),
        )
    };

    let _guard = slog_scope::set_global_logger(log.clone());
    slog_stdlog::init().expect("Could not setup log backend");

    let arg = ::std::env::args().nth(1);
    match arg.as_ref().map(|s| &s[..]) {
        #[cfg(feature = "winit")]
        Some("--winit") => {
            slog::info!(log, "Starting anvil with winit backend");
            anvil::winit::run_winit(log);
        }
        #[cfg(feature = "udev")]
        Some("--tty-udev") => {
            slog::info!(log, "Starting anvil on a tty using udev");
            anvil::udev::run_udev(log);
        }
        #[cfg(feature = "x11")]
        Some("--x11") => {
            slog::info!(log, "Starting anvil with x11 backend");
            anvil::x11::run_x11(log);
        }
        Some(other) => {
            crit!(log, "Unknown backend: {}", other);
        }
        None => {
            println!("USAGE: anvil --backend");
            println!();
            println!("Possible backends are:");
            for b in POSSIBLE_BACKENDS {
                println!("\t{}", b);
            }
        }
    }
}

<MSG> anvil: add BufferUtils

A helper struct which currently contains only a method for retrieving
buffer dimensions. Will be used for getting the buffer dimensions early,
before rendering, to always have up-to-date size which is not zero.

<DFF> @@ -12,6 +12,7 @@ use smithay::reexports::{calloop::EventLoop, wayland_server::Display};
 
 #[macro_use]
 mod shaders;
+mod buffer_utils;
 mod glium_drawer;
 mod input_handler;
 mod shell;

anvil: add BufferUtils