| Index: src/core/SkLinearBitmapPipeline_core.h
|
| diff --git a/src/core/SkLinearBitmapPipeline_core.h b/src/core/SkLinearBitmapPipeline_core.h
|
| index 2759f0bb8ccc728472bb68a23d72c8bedf073007..0ced1a70b9815160d82ba2014260382f80c0deca 100644
|
| --- a/src/core/SkLinearBitmapPipeline_core.h
|
| +++ b/src/core/SkLinearBitmapPipeline_core.h
|
| @@ -185,6 +185,19 @@ void span_fallback(Span span, Stage* stage) {
|
| stage->pointListFew(count, xs, ys);
|
| }
|
| }
|
| +
|
| +class sRGBFast {
|
| +public:
|
| + static Sk4f VECTORCALL sRGBToLinear(Sk4f pixel) {
|
| + Sk4f l = pixel * pixel;
|
| + return Sk4f{l[0], l[1], l[2], pixel[3]};
|
| + }
|
| + static Sk4f VECTORCALL LinearTosRGB(Sk4f pixel) {
|
| + Sk4f s = pixel.sqrt();
|
| + return Sk4f{s[0], s[1], s[2], pixel[3]};
|
| + }
|
| +};
|
| +
|
| } // namespace
|
|
|
| #endif // SkLinearBitmapPipeline_core_DEFINED
|
|
|