mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Use blur_radius / 2 as sigma to blur text shadow using Skia
This change is needed to match behavior of default Gfx::Painter. Fixes Tests/LibWeb/Ref/text-shadow.html
This commit is contained in:
committed by
Andreas Kling
parent
3270df476d
commit
be644e5d5d
@@ -795,7 +795,7 @@ CommandResult DisplayListPlayerSkia::paint_inner_box_shadow(PaintInnerBoxShadow
|
||||
CommandResult DisplayListPlayerSkia::paint_text_shadow(PaintTextShadow const& command)
|
||||
{
|
||||
auto& canvas = surface().canvas();
|
||||
auto blur_image_filter = SkImageFilters::Blur(command.blur_radius, command.blur_radius, nullptr);
|
||||
auto blur_image_filter = SkImageFilters::Blur(command.blur_radius / 2, command.blur_radius / 2, nullptr);
|
||||
SkPaint blur_paint;
|
||||
blur_paint.setImageFilter(blur_image_filter);
|
||||
canvas.saveLayer(SkCanvas::SaveLayerRec(nullptr, &blur_paint, nullptr, 0));
|
||||
|
||||
Reference in New Issue
Block a user