Remove the vello_cpu compilation option and enable it by default#41820
Conversation
|
I am pretty sure that at one point it was allowed to disable both vello_cpu and vello and servo would still compiled, |
I suspect this was possible when we still had the |
I tried to find where we lost the ability but I couldn't determine exactly. The biggest problem why we lost it is because we never tested in CI. In the future we should probably do build with no (or minimal if some are required) feature enabled (maybe as part of MSRV/libservo check). |
|
So we do have runtime support for no canvas backend: OK /_mozilla/mozilla/canvas/invalid.html |
f706557 to
7ce91f9
Compare
|
I've just gone ahead and removed this test since it is not valid any longer. |
7ce91f9 to
478c0a6
Compare
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 CPU 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. Fixes: servo#40779 Signed-off-by: Martin Robinson <[email protected]>
478c0a6 to
13075a4
Compare
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