[webkit-changes] [WebKit/WebKit] f5c941: [Skia] Implement outset drop shadows

Georges Basile Stavracas Neto noreply at github.com
Sat Feb 17 14:20:07 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f5c941fbf0500ebfc89755fb40d972d2f226cea6
      https://github.com/WebKit/WebKit/commit/f5c941fbf0500ebfc89755fb40d972d2f226cea6
  Author: Georges Basile Stavracas Neto <feaneron at igalia.com>
  Date:   2024-02-17 (Sat, 17 Feb 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp

  Log Message:
  -----------
  [Skia] Implement outset drop shadows
https://bugs.webkit.org/show_bug.cgi?id=269596

Reviewed by Nikolas Zimmermann.

Whenever the GraphicsContext has a drop shadow set, use that to create
and set a SkImageFilters::DropShadow() image effect to the fill paint.
Stroke paints are unaffected.

The SkImageFilters::DropShadow() receives a blur sigma instead of radius
and the formal definition of that [1] states that sigma is half of the
blur radius, so convert between these values.

This only implements outset shadows. Inset shadows won't be rendered
anyway because GraphicsContextSkia::fillRectWithRoundedHole() is not
implemented yet.

[1] https://html.spec.whatwg.org/multipage/canvas.html#shadows

* Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContextSkia::createFillPaint const):

Canonical link: https://commits.webkit.org/274928@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list