Skip to content

Commit

Permalink
split out ColorComponents implementation to fix Android build
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlntn committed Jan 8, 2024
1 parent 4b6a0e8 commit 53aba9b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "ColorComponents.h"

namespace facebook::react {

static ColorSpace defaultColorSpace = ColorSpace::sRGB;

ColorSpace getDefaultColorSpace() {
return defaultColorSpace;
}

void setDefaultColorSpace(ColorSpace newColorSpace) {
defaultColorSpace = newColorSpace;
}

} // namespace facebook::react
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ namespace facebook::react {

enum class ColorSpace { sRGB, DisplayP3 };

static ColorSpace defaultColorSpace = ColorSpace::sRGB;
ColorSpace getDefaultColorSpace() {
return defaultColorSpace;
}
void setDefaultColorSpace(ColorSpace newColorSpace) {
defaultColorSpace = newColorSpace;
}
// Declare the functions without providing definitions
ColorSpace getDefaultColorSpace();
void setDefaultColorSpace(ColorSpace newColorSpace);

struct ColorComponents {
float red{0};
Expand Down

0 comments on commit 53aba9b

Please sign in to comment.