[PATCH] windowscodecs: Move from_sRGB_component into the same section as its sole user.

Dmitry Timoshkov dmitry at baikal.ru
Sun Jul 14 20:30:50 CDT 2019


Gerald Pfeifer <gerald at pfeifer.com> wrote:

> -/* https://www.w3.org/Graphics/Color/srgb */
> -static inline float from_sRGB_component(float f)
> -{
> -    if (f <= 0.04045f) return f / 12.92f;
> -    return powf((f + 0.055f) / 1.055f, 2.4f);
> -}
> -
>  static inline float to_sRGB_component(float f)
>  {
>      if (f <= 0.0031308f) return 12.92f * f;
> @@ -98,6 +91,13 @@ static inline float to_sRGB_component(float f)
>  }
>  
>  #if 0 /* FIXME: enable once needed */
> +/* https://www.w3.org/Graphics/Color/srgb */
> +static inline float from_sRGB_component(float f)
> +{
> +    if (f <= 0.04045f) return f / 12.92f;
> +    return powf((f + 0.055f) / 1.055f, 2.4f);
> +}

Please leave the comment where it is now, it belongs to all of these
helpers, not just the moved one.

-- 
Dmitry.



More information about the wine-devel mailing list