mirror of
https://github.com/servo/servo
synced 2026-05-14 19:06:31 +02:00
There is currently no way to disable canvas on the whole in Servo, so one canvas backend must be enabled for the build to succeed. Currently, the Vello GPU backend is much slower than the CPU backend, as it downloads pixels to CPU memory before reuploading them and displaying them. Fixing that requires allowing rendering Vello GPU contents to a OpenGL texture or some kind of surface that can be represented by an OpenGL texture during display. Historically, the approach that other browsers have taken with regard to GPU canvas is that CPU canvas is used as a fallback until the GPU version can be counted on to be reliably faster. I think that Servo should take the same approach. We should always expose a CPU version of canvas and a GPU version. Embedders should not care about how these are implemented, just that they work as expected and perform well. Testing: This change just adjusts the build configuration option, so no tests are necessary. Fixes: #40779 Signed-off-by: Martin Robinson <mrobinson@igalia.com>
15 lines
423 B
Rust
15 lines
423 B
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
#![deny(unsafe_code)]
|
|
#![allow(clippy::too_many_arguments)]
|
|
|
|
mod backend;
|
|
pub mod canvas_data;
|
|
pub mod canvas_paint_thread;
|
|
mod peniko_conversions;
|
|
#[cfg(feature = "vello")]
|
|
mod vello_backend;
|
|
mod vello_cpu_backend;
|