Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d16383b4c526cd199501368e69f9d1b8b744ba75
      
https://github.com/WebKit/WebKit/commit/d16383b4c526cd199501368e69f9d1b8b744ba75
  Author: Simon Fraser <[email protected]>
  Date:   2022-11-26 (Sat, 26 Nov 2022)

  Changed paths:
    M Source/WebCore/platform/graphics/ColorMatrix.h
    M Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm

  Log Message:
  -----------
  Add some helpers to ColorMatrix to generate some filter matrices
https://bugs.webkit.org/show_bug.cgi?id=248348

Reviewed by Sam Weinig.

Add some static functions that create a ColorMatrix<> equivalent to some common
filter operations (including those described in the CSS Filters spec as 
FEComponentTransfer
operations).

Use them when setting up CALayer filters.

* Source/WebCore/platform/graphics/ColorMatrix.h:
(WebCore::brightnessColorMatrix):
(WebCore::contrastColorMatrix):
(WebCore::invertColorMatrix):
(WebCore::opacityColorMatrix):
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::caColorMatrixFromColorMatrix):
(WebCore::PlatformCAFilters::colorMatrixValueForFilter):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to