canvas: Use vello_cpu as default canvas backend (#38844)

We really want to remove font-kit from dep tree, so this is the first
step into removing raqote from servo. While vello_cpu is not perfect
replacement, I am confident that we will resolve all issues eventually:
https://github.com/servo/servo/issues/38345 (most important ones already
have PRs).

Reviewable per commit.

Testing: Existing WPT tests.
Try run: https://github.com/sagudev/servo/actions/runs/17138369290

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Sam 2025-08-27 09:22:20 +02:00 committed by GitHub
parent e126f09b25
commit 3dc9184121
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
109 changed files with 193 additions and 202 deletions

View file

@ -313,6 +313,12 @@ impl Canvas {
.to_lowercase()
.as_str()
{
#[cfg(feature = "vello_cpu")]
"" | "auto" | "vello_cpu" => Some(Self::VelloCPU(CanvasData::new(
size,
compositor_api,
font_context,
))),
#[cfg(feature = "raqote")]
"" | "auto" | "raqote" => Some(Self::Raqote(CanvasData::new(
size,
@ -325,12 +331,6 @@ impl Canvas {
compositor_api,
font_context,
))),
#[cfg(feature = "vello_cpu")]
"" | "auto" | "vello_cpu" => Some(Self::VelloCPU(CanvasData::new(
size,
compositor_api,
font_context,
))),
s => {
warn!("Unknown 2D canvas backend: `{s}`");
None

View file

@ -21,7 +21,7 @@ bluetooth = [
"script/bluetooth",
"script_traits/bluetooth",
]
default = ["clipboard", "raqote"]
default = ["clipboard", "vello_cpu"]
clipboard = ["dep:arboard"]
crown = ["script/crown"]
debugmozjs = ["script/debugmozjs"]