Index: src/core/SkPM4fPriv.h |
diff --git a/src/core/SkPM4fPriv.h b/src/core/SkPM4fPriv.h |
index 48fdde7acd0df0ad178f7d5062de751e0452d47f..b75dc71654e9a99023e43f060794186b1b89230a 100644 |
--- a/src/core/SkPM4fPriv.h |
+++ b/src/core/SkPM4fPriv.h |
@@ -11,6 +11,8 @@ |
#include "SkColorPriv.h" |
#include "SkPM4f.h" |
+extern bool gTreatSkColorAsSRGB; |
+ |
static inline float get_alpha(const Sk4f& f4) { |
return f4[SkPM4f::A]; |
} |
@@ -42,6 +44,14 @@ static inline Sk4f linear_to_srgb(const Sk4f& l4) { |
return set_alpha(l4.sqrt(), get_alpha(l4)); |
} |
+static inline float srgb_to_linear(float x) { |
+ return x * x; |
+} |
+ |
+static inline float linear_to_srgb(float x) { |
+ return sqrtf(x); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
static inline Sk4f Sk4f_fromL32(uint32_t src) { |