diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index 6e6fb2b0a76..906fa84b434 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -11,10 +11,10 @@ name = "canvas" path = "lib.rs" [features] -azure_backend = ["azure"] -default = ["azure_backend"] +canvas2d-azure = ["azure"] +canvas2d-raqote = ["raqote"] +default = ["canvas2d-azure"] webgl_backtrace = ["canvas_traits/webgl_backtrace"] -raqote_backend = ["raqote"] no_wgl = ["offscreen_gl_context/no_wgl"] [dependencies] diff --git a/components/canvas/canvas_data.rs b/components/canvas/canvas_data.rs index 79adbee7df8..aa6539ebbb9 100644 --- a/components/canvas/canvas_data.rs +++ b/components/canvas/canvas_data.rs @@ -281,92 +281,92 @@ pub trait GenericDrawTarget { #[derive(Clone)] pub enum ExtendMode { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::ExtendMode), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } pub enum GradientStop { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::AzGradientStop), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } pub enum GradientStops { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::GradientStops), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } #[derive(Clone)] pub enum Color { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::Color), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } #[derive(Clone)] pub enum CompositionOp { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::CompositionOp), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } pub enum SurfaceFormat { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::SurfaceFormat), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } #[derive(Clone)] pub enum SourceSurface { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::SourceSurface), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } pub enum Path { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::Path), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } #[derive(Clone)] pub enum Pattern { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::Pattern), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } pub enum DrawSurfaceOptions { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::DrawSurfaceOptions), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } #[derive(Clone)] pub enum DrawOptions { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::DrawOptions), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(()), } #[derive(Clone)] pub enum StrokeOptions<'a> { - #[cfg(feature = "azure_backend")] + #[cfg(feature = "canvas2d-azure")] Azure(azure::azure_hl::StrokeOptions<'a>), - #[cfg(feature = "raqote_backend")] + #[cfg(feature = "canvas2d-raqote")] Raqote(PhantomData<&'a ()>), } @@ -391,12 +391,12 @@ pub struct CanvasData<'a> { pub canvas_id: CanvasId, } -#[cfg(feature = "azure_backend")] +#[cfg(feature = "canvas2d-azure")] fn create_backend() -> Box { Box::new(crate::azure_backend::AzureBackend) } -#[cfg(feature = "raqote_backend")] +#[cfg(feature = "canvas2d-raqote")] fn create_backend() -> Box { Box::new(crate::raqote_backend::RaqoteBackend) } diff --git a/components/canvas/lib.rs b/components/canvas/lib.rs index 28dd1e04f5d..ba10f02636c 100644 --- a/components/canvas/lib.rs +++ b/components/canvas/lib.rs @@ -7,10 +7,10 @@ #[macro_use] extern crate log; -#[cfg(feature = "azure_backend")] +#[cfg(feature = "canvas2d-azure")] mod azure_backend; -#[cfg(feature = "raqote_backend")] +#[cfg(feature = "canvas2d-raqote")] mod raqote_backend; pub mod canvas_data; diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml index 0831cd33b0c..718e537e64b 100644 --- a/components/constellation/Cargo.toml +++ b/components/constellation/Cargo.toml @@ -11,8 +11,8 @@ name = "constellation" path = "lib.rs" [features] -azure_backend = ["canvas/azure_backend"] -raqote_backend = ["canvas/raqote_backend"] +canvas2d-azure = ["canvas/canvas2d-azure"] +canvas2d-raqote = ["canvas/canvas2d-raqote"] no_wgl = ["canvas/no_wgl"] [dependencies] diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 86189c78f6b..9afcfe05a84 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -12,7 +12,8 @@ path = "lib.rs" crate-type = ["rlib"] [features] -azure_backend = ["canvas/azure_backend"] +canvas2d-azure = ["canvas/canvas2d-azure"] +canvas2d-raqote = ["canvas/canvas2d-raqote"] debugmozjs = ["script/debugmozjs"] energy-profiling = ["profile_traits/energy-profiling"] profilemozjs = ["script/profilemozjs"] @@ -21,7 +22,6 @@ js_backtrace = ["script/js_backtrace"] max_log_level = ["log/release_max_level_info"] native-bluetooth = ["bluetooth/native-bluetooth"] no_wgl = ["canvas/no_wgl"] -raqote_backend = ["canvas/raqote_backend"] uwp = ["servo_config/uwp"] webrender_debugger = ["webrender/debugger"] no_static_freetype = ["webrender/no_static_freetype"] diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index 74aedd06688..781e9191974 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -183,7 +183,7 @@ def linux_tidy_unit_docs(): ./mach build --dev ./mach test-unit ./mach package --dev - ./mach build --dev --features raqote_backend + ./mach build --dev --features canvas2d-raqote ./mach build --dev --libsimpleservo ./mach test-tidy --no-progress --self-test diff --git a/ports/glutin/Cargo.toml b/ports/glutin/Cargo.toml index 0caa2a1dede..303f0ef8956 100644 --- a/ports/glutin/Cargo.toml +++ b/ports/glutin/Cargo.toml @@ -27,7 +27,8 @@ OriginalFilename = "servo.exe" ProductName = "Servo" [features] -azure_backend = ["libservo/azure_backend"] +canvas2d-azure = ["libservo/canvas2d-azure"] +canvas2d-raqote = ["libservo/canvas2d-raqote"] default = ["webdriver", "max_log_level"] energy-profiling = ["libservo/energy-profiling"] debugmozjs = ["libservo/debugmozjs"] @@ -35,7 +36,6 @@ js_backtrace = ["libservo/js_backtrace"] max_log_level = ["log/release_max_level_info"] native-bluetooth = ["libservo/native-bluetooth"] profilemozjs = ["libservo/profilemozjs"] -raqote_backend = ["libservo/raqote_backend"] webdriver = ["libservo/webdriver"] webgl_backtrace = ["libservo/webgl_backtrace"] webrender_debugger = ["libservo/webrender_debugger"] diff --git a/ports/libmlservo/Cargo.toml b/ports/libmlservo/Cargo.toml index f2b92ed6349..5a8049e3929 100644 --- a/ports/libmlservo/Cargo.toml +++ b/ports/libmlservo/Cargo.toml @@ -13,8 +13,8 @@ test = false bench = false [features] -azure_backend = ["simpleservo/azure_backend"] -raqote_backend = ["simpleservo/raqote_backend"] +canvas2d-azure = ["simpleservo/canvas2d-azure"] +canvas2d-raqote = ["simpleservo/canvas2d-raqote"] [dependencies] libservo = { path = "../../components/servo", features = ["no_static_freetype"] } diff --git a/ports/libsimpleservo/api/Cargo.toml b/ports/libsimpleservo/api/Cargo.toml index 6d618d14b14..68f0b7f1816 100644 --- a/ports/libsimpleservo/api/Cargo.toml +++ b/ports/libsimpleservo/api/Cargo.toml @@ -26,7 +26,8 @@ libloading = "0.5" gl_generator = "0.11" [features] -azure_backend = ["libservo/azure_backend"] +canvas2d-azure = ["libservo/canvas2d-azure"] +canvas2d-raqote = ["libservo/canvas2d-raqote"] default = ["webdriver", "max_log_level"] debugmozjs = ["libservo/debugmozjs"] energy-profiling = ["libservo/energy-profiling"] @@ -37,7 +38,6 @@ native-bluetooth = ["libservo/native-bluetooth"] no_static_freetype = ["libservo/no_static_freetype"] no_wgl = ["libservo/no_wgl"] oculusvr = ["libservo/oculusvr"] -raqote_backend = ["libservo/raqote_backend"] webdriver = ["libservo/webdriver"] uwp = ["libservo/uwp"] webgl_backtrace = ["libservo/webgl_backtrace"] diff --git a/ports/libsimpleservo/capi/Cargo.toml b/ports/libsimpleservo/capi/Cargo.toml index 2e4a894e4f5..8bcf34aad0b 100644 --- a/ports/libsimpleservo/capi/Cargo.toml +++ b/ports/libsimpleservo/capi/Cargo.toml @@ -21,7 +21,8 @@ env_logger = "0.6" cbindgen = "0.8" [features] -azure_backend = ["simpleservo/azure_backend"] +canvas2d-azure = ["simpleservo/canvas2d-azure"] +canvas2d-raqote = ["simpleservo/canvas2d-raqote"] debugmozjs = ["simpleservo/debugmozjs"] default = ["webdriver", "max_log_level"] energy-profiling = ["simpleservo/energy-profiling"] @@ -31,7 +32,6 @@ max_log_level = ["simpleservo/max_log_level"] native-bluetooth = ["simpleservo/native-bluetooth"] no_wgl = ["simpleservo/no_wgl"] oculusvr = ["simpleservo/oculusvr"] -raqote_backend = ["simpleservo/raqote_backend"] uwp = ["simpleservo/uwp"] webdriver = ["simpleservo/webdriver"] webgl_backtrace = ["simpleservo/webgl_backtrace"] diff --git a/ports/libsimpleservo/jniapi/Cargo.toml b/ports/libsimpleservo/jniapi/Cargo.toml index 5804832dd39..98838fafcb3 100644 --- a/ports/libsimpleservo/jniapi/Cargo.toml +++ b/ports/libsimpleservo/jniapi/Cargo.toml @@ -26,7 +26,8 @@ simpleservo = { path = "../api" } cc = "1.0" [features] -azure_backend = ["simpleservo/azure_backend"] +canvas2d-azure = ["simpleservo/canvas2d-azure"] +canvas2d-raqote = ["simpleservo/canvas2d-raqote"] debugmozjs = ["simpleservo/debugmozjs"] default = ["webdriver", "max_log_level"] energy-profiling = ["simpleservo/energy-profiling"] @@ -35,6 +36,5 @@ js_backtrace = ["simpleservo/js_backtrace"] max_log_level = ["simpleservo/max_log_level"] native-bluetooth = ["simpleservo/native-bluetooth"] oculusvr = ["simpleservo/oculusvr"] -raqote_backend = ["simpleservo/raqote_backend"] webdriver = ["simpleservo/webdriver"] webgl_backtrace = ["simpleservo/webgl_backtrace"] diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 2010bfbce9b..997b0f319de 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -294,7 +294,7 @@ class MachCommands(CommandBase): features += ["profilemozjs"] if with_raqote: - features += ["raqote_backend"] + features += ["canvas2d-raqote"] if without_wgl: features += ["no_wgl"] @@ -304,8 +304,8 @@ class MachCommands(CommandBase): if self.config["build"]["dom-backtrace"]: features += ["dom-backtrace"] - if "raqote_backend" not in features: - features += ["azure_backend"] + if "canvas2d-raqote" not in features: + features += ["canvas2d-azure"] if features: opts += ["--features", "%s" % ' '.join(features)] diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index 42e2ad84cb4..61a575b2db1 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -264,7 +264,7 @@ class PostBuildCommands(CommandBase): else: copy2(full_name, destination) - params += ["--features", "azure_backend"] + params += ["--features", "canvas2d-azure"] returncode = self.call_rustup_run( ["cargo", "doc", "--manifest-path", self.ports_glutin_manifest()] + params,