Title: [271094] trunk/Source/WebCore
Revision
271094
Author
wei...@apple.com
Date
2020-12-27 10:34:31 -0800 (Sun, 27 Dec 2020)

Log Message

Generalize callWithColorType to work with either float or uint8_t color types
https://bugs.webkit.org/show_bug.cgi?id=220155

Reviewed by Dean Jackson.

* platform/graphics/ColorTypes.h:
(WebCore::callWithColorType):
Templatize the component type.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (271093 => 271094)


--- trunk/Source/WebCore/ChangeLog	2020-12-27 18:00:07 UTC (rev 271093)
+++ trunk/Source/WebCore/ChangeLog	2020-12-27 18:34:31 UTC (rev 271094)
@@ -1,5 +1,16 @@
 2020-12-27  Sam Weinig  <wei...@apple.com>
 
+        Generalize callWithColorType to work with either float or uint8_t color types
+        https://bugs.webkit.org/show_bug.cgi?id=220155
+
+        Reviewed by Dean Jackson.
+
+        * platform/graphics/ColorTypes.h:
+        (WebCore::callWithColorType):
+        Templatize the component type.
+
+2020-12-27  Sam Weinig  <wei...@apple.com>
+
         Remove one more place needed when adding new color types
         https://bugs.webkit.org/show_bug.cgi?id=220156
 

Modified: trunk/Source/WebCore/platform/graphics/ColorTypes.h (271093 => 271094)


--- trunk/Source/WebCore/platform/graphics/ColorTypes.h	2020-12-27 18:00:07 UTC (rev 271093)
+++ trunk/Source/WebCore/platform/graphics/ColorTypes.h	2020-12-27 18:34:31 UTC (rev 271094)
@@ -370,7 +370,7 @@
     return !(a == b);
 }
 
-template<typename Functor> constexpr decltype(auto) callWithColorType(const ColorComponents<float>& components, ColorSpace colorSpace, Functor&& functor)
+template<typename T, typename Functor> constexpr decltype(auto) callWithColorType(const ColorComponents<T>& components, ColorSpace colorSpace, Functor&& functor)
 {
     switch (colorSpace) {
     case ColorSpace::SRGB:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to