commit
a650de8620
21
.travis.yml
21
.travis.yml
|
@ -52,9 +52,16 @@ env:
|
||||||
# test all features simultaneously
|
# test all features simultaneously
|
||||||
- FEATURES="all"
|
- FEATURES="all"
|
||||||
# test our house compositor
|
# test our house compositor
|
||||||
- FEATURES="anvil"
|
- FEATURES="anvil" ANVIL_FEATURES=""
|
||||||
|
- FEATURES="anvil" ANVIL_FEATURES="egl"
|
||||||
|
- FEATURES="anvil" ANVIL_FEATURES="winit"
|
||||||
|
- FEATURES="anvil" ANVIL_FEATURES="udev"
|
||||||
|
- FEATURES="anvil" ANVIL_FEATURES="logind"
|
||||||
|
- FEATURES="anvil" ANVIL_FEATURES="default"
|
||||||
|
- FEATURES="anvil" ANVIL_FEATURES="all"
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
# special features for lint & fmt
|
# special features for lint & fmt
|
||||||
- rust: stable
|
- rust: stable
|
||||||
|
@ -91,7 +98,17 @@ script:
|
||||||
vagga cargo-$TRAVIS_RUST_VERSION clippy --all-features -- -D warnings
|
vagga cargo-$TRAVIS_RUST_VERSION clippy --all-features -- -D warnings
|
||||||
;;
|
;;
|
||||||
"anvil")
|
"anvil")
|
||||||
vagga cargo-$TRAVIS_RUST_VERSION test -p anvil --all-features
|
cd anvil
|
||||||
|
case $ANVIL_FEATURES in
|
||||||
|
"all")
|
||||||
|
vagga cargo-$TRAVIS_RUST_VERSION test --all-features
|
||||||
|
;;
|
||||||
|
"default")
|
||||||
|
vagga cargo-$TRAVIS_RUST_VERSION test
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
vagga cargo-$TRAVIS_RUST_VERSION check --no-default-features --features "$ANVIL_FEATURES"
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
vagga cargo-$TRAVIS_RUST_VERSION check --tests --no-default-features --features "$FEATURES" &&
|
vagga cargo-$TRAVIS_RUST_VERSION check --tests --no-default-features --features "$FEATURES" &&
|
||||||
|
|
|
@ -17,7 +17,7 @@ xkbcommon = "0.2.1"
|
||||||
[dependencies.smithay]
|
[dependencies.smithay]
|
||||||
path = ".."
|
path = ".."
|
||||||
default-features = false
|
default-features = false
|
||||||
features = [ "renderer_glium" ]
|
features = [ "renderer_glium", "backend_egl" ]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
gl_generator = "0.9"
|
gl_generator = "0.9"
|
||||||
|
|
|
@ -24,6 +24,7 @@ use shell::init_shell;
|
||||||
pub fn run_winit(display: &mut Display, event_loop: &mut EventLoop<()>, log: Logger) -> Result<(), ()> {
|
pub fn run_winit(display: &mut Display, event_loop: &mut EventLoop<()>, log: Logger) -> Result<(), ()> {
|
||||||
let (renderer, mut input) = winit::init(log.clone()).map_err(|_| ())?;
|
let (renderer, mut input) = winit::init(log.clone()).map_err(|_| ())?;
|
||||||
|
|
||||||
|
#[cfg(feature = "egl")]
|
||||||
let egl_display = Rc::new(RefCell::new(
|
let egl_display = Rc::new(RefCell::new(
|
||||||
if let Ok(egl_display) = renderer.bind_wl_display(&display) {
|
if let Ok(egl_display) = renderer.bind_wl_display(&display) {
|
||||||
info!(log, "EGL hardware-acceleration enabled");
|
info!(log, "EGL hardware-acceleration enabled");
|
||||||
|
@ -34,7 +35,10 @@ pub fn run_winit(display: &mut Display, event_loop: &mut EventLoop<()>, log: Log
|
||||||
));
|
));
|
||||||
|
|
||||||
let (w, h) = renderer.get_framebuffer_dimensions();
|
let (w, h) = renderer.get_framebuffer_dimensions();
|
||||||
|
#[cfg(feature = "egl")]
|
||||||
let drawer = GliumDrawer::init(renderer, egl_display, log.clone());
|
let drawer = GliumDrawer::init(renderer, egl_display, log.clone());
|
||||||
|
#[cfg(not(feature = "egl"))]
|
||||||
|
let drawer = GliumDrawer::init(renderer, log.clone());
|
||||||
|
|
||||||
let name = display.add_socket_auto().unwrap().into_string().unwrap();
|
let name = display.add_socket_auto().unwrap().into_string().unwrap();
|
||||||
info!(log, "Listening on wayland socket"; "name" => name.clone());
|
info!(log, "Listening on wayland socket"; "name" => name.clone());
|
||||||
|
|
Loading…
Reference in New Issue