diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.cpp b/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.cpp deleted file mode 100644 index e0c6d7fbc569d4..00000000000000 --- a/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "ColorComponents.h" - -namespace facebook::react { - -static ColorSpace defaultColorSpace = ColorSpace::sRGB; - -ColorSpace getDefaultColorSpace() { - return defaultColorSpace; -} - -void setDefaultColorSpace(ColorSpace newColorSpace) { - defaultColorSpace = newColorSpace; -} - -} // namespace facebook::react \ No newline at end of file diff --git a/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.h b/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.h index 382045ecaa868b..178e4dad66ce5b 100644 --- a/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.h +++ b/packages/react-native/ReactCommon/react/renderer/graphics/ColorComponents.h @@ -11,9 +11,13 @@ namespace facebook::react { enum class ColorSpace { sRGB, DisplayP3 }; -// Declare the functions without providing definitions -ColorSpace getDefaultColorSpace(); -void setDefaultColorSpace(ColorSpace newColorSpace); +static ColorSpace defaultColorSpace = ColorSpace::sRGB; +ColorSpace getDefaultColorSpace() { + return defaultColorSpace; +} +void setDefaultColorSpace(ColorSpace newColorSpace) { + defaultColorSpace = newColorSpace; +} struct ColorComponents { float red{0};