canvas: Remove rect -> line handling (#37664)

This causes wrong rendering on vello. Current backends already handle
one dim zero correctly by themself (this was probably needed for azure),
but if we ever needed this, it should be implemented inside faulty
backend.

Testing: Existing WPT tests

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev 2025-06-24 16:13:58 +02:00 committed by GitHub
parent ef7be66c56
commit 4974b4a1f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 44 deletions

View file

@ -603,31 +603,6 @@ impl GenericDrawTarget<RaqoteBackend> for raqote::DrawTarget {
) {
self.stroke(path, &source(pattern), stroke_options, draw_options);
}
fn stroke_line(
&mut self,
start: Point2D<f32>,
end: Point2D<f32>,
pattern: &<RaqoteBackend as Backend>::Pattern<'_>,
stroke_options: &<RaqoteBackend as Backend>::StrokeOptions,
draw_options: &<RaqoteBackend as Backend>::DrawOptions,
) {
let mut pb = raqote::PathBuilder::new();
pb.move_to(start.x, start.y);
pb.line_to(end.x, end.y);
let mut stroke_options = stroke_options.clone();
let cap = match stroke_options.join {
raqote::LineJoin::Round => raqote::LineCap::Round,
_ => raqote::LineCap::Butt,
};
stroke_options.cap = cap;
self.stroke(
&pb.finish(),
&source(pattern),
&stroke_options,
draw_options,
);
}
fn stroke_rect(
&mut self,
rect: &Rect<f32>,