Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: src/core/SkPM4fPriv.h

Issue 2339233003: Support Float32 output from SkColorSpaceXform (Closed)
Patch Set: Some fixes Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkPM4fPriv.h
diff --git a/src/core/SkPM4fPriv.h b/src/core/SkPM4fPriv.h
index 89a0caeb70ce0ff0994efbe3faf77f7f4a823268..f2d2557d3a780e57a84c1d86d4789dcf0cb861f9 100644
--- a/src/core/SkPM4fPriv.h
+++ b/src/core/SkPM4fPriv.h
@@ -55,20 +55,4 @@ static inline Sk4f Sk4f_from_SkColor(SkColor color) {
return swizzle_rb(Sk4f_fromS32(color));
}
-static inline void assert_unit(float x) {
- SkASSERT(0 <= x && x <= 1);
-}
-
-static inline float exact_srgb_to_linear(float srgb) {
- assert_unit(srgb);
- float linear;
- if (srgb <= 0.04045) {
- linear = srgb / 12.92f;
- } else {
- linear = powf((srgb + 0.055f) / 1.055f, 2.4f);
- }
- assert_unit(linear);
- return linear;
-}
-
#endif

Powered by Google App Engine
This is Rietveld 408576698