canvas: Move CompositionOrBlending and ellipse() from RaqoteBackend to Backend (#36790)

Small fixes of abstraction.

We do not need to generalize `CompositionOrBlending`, because it's from
canvas_traits.
Ellipse impl that uses arc is not backend specific, so it serves as good
trait default.

Reviewable per commit.


Testing: Only refactoring, but there are WPT tests

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev 2025-05-01 11:57:20 +02:00 committed by GitHub
parent cfc7115867
commit d1f7a90619
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 58 additions and 66 deletions

View file

@ -1183,7 +1183,7 @@ impl<'a, B: Backend> CanvasData<'a, B> {
self.state.draw_options.set_alpha(alpha);
}
pub(crate) fn set_global_composition(&mut self, op: B::CompositionOrBlending) {
pub(crate) fn set_global_composition(&mut self, op: CompositionOrBlending) {
self.backend.set_global_composition(op, &mut self.state);
}