From eb9c38849265bf0df814b10526dcc2a9ee98ebec Mon Sep 17 00:00:00 2001 From: Jorge Cabiedes Acosta Date: Thu, 27 Jun 2024 09:43:39 -0700 Subject: [PATCH] Update Filter header (#45151) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45151 This change was missed when fixing hue-rotate and adding drop-shadow. I believe the only issue with this was stacking context was not being created for these two filters. Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D58965245 fbshipit-source-id: e6bfdb738a8bc8caa878f60420cfe8b421f64aa4 --- .../ReactCommon/react/renderer/graphics/Filter.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/Filter.h b/packages/react-native/ReactCommon/react/renderer/graphics/Filter.h index 406fffd4efd..8eec8fafa6c 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/Filter.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/Filter.h @@ -24,7 +24,8 @@ enum class FilterType { Invert, Opacity, Saturate, - Sepia + Sepia, + DropShadow }; struct FilterPrimitive { @@ -43,7 +44,7 @@ inline FilterType filterTypeFromString(std::string_view filterName) { return FilterType::Contrast; } else if (filterName == "grayscale") { return FilterType::Grayscale; - } else if (filterName == "hueRotate") { + } else if (filterName == "hue-rotate") { return FilterType::HueRotate; } else if (filterName == "invert") { return FilterType::Invert; @@ -53,6 +54,8 @@ inline FilterType filterTypeFromString(std::string_view filterName) { return FilterType::Saturate; } else if (filterName == "sepia") { return FilterType::Sepia; + } else if (filterName == "drop-shadow") { + return FilterType::DropShadow; } else { throw std::invalid_argument(std::string(filterName)); }