LibWeb: Enable anti-aliasing in DisplayListPlayerSkia::fill_rect

Set SkPaint anti-aliasing to true when filling rectangles
This improves rendering quality by smoothing jagged edges

update clip-path-transformed.html and ref image with anti-aliasing

Partially fixes #5909
This commit is contained in:
mikiubo 2025-09-21 19:29:46 +02:00 committed by Alexander Kalenik
parent e41cfb92e2
commit 43978ba459
3 changed files with 2 additions and 1 deletions

View File

@ -122,6 +122,7 @@ void DisplayListPlayerSkia::fill_rect(FillRect const& command)
auto const& rect = command.rect;
auto& canvas = surface().canvas();
SkPaint paint;
paint.setAntiAlias(true);
paint.setColor(to_skia_color(command.color));
canvas.drawRect(to_skia_rect(rect), paint);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<link rel="match" href="../expected/clip-path-transformed-ref.html" />
<meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-15">
<meta name="fuzzy" content="maxDifference=0-2;totalPixels=0-907">
<style>
body {
font-size: 0;