Home | History | Annotate | Download | only in tests

Lines Matching full:srgb

20 /** convert 0..1 srgb value to 0..1 linear */
21 float srgb_to_linear(float srgb) {
22 if (srgb <= 0.04045f) {
23 return srgb / 12.92f;
25 return powf((srgb + 0.055f) / 1.055f, 2.4f);
29 /** convert 0..1 linear value to 0..1 srgb */
99 static bool check_srgb_to_linear_conversion(uint32_t srgb, uint32_t linear, float error) {
100 return check_conversion<srgb_to_linear>(srgb, linear, error);
103 static bool check_linear_to_srgb_conversion(uint32_t linear, uint32_t srgb, float error) {
104 return check_conversion<linear_to_srgb>(linear, srgb, error);
145 // TODO: Add tests for copySurface between srgb/linear textures. Add tests for unpremul/premul
146 // conversion during read/write along with srgb/linear conversions.
237 // We expect the sRGB -> linear write to do no sRGB conversion (to match the behavior of
239 // sRGB encoded values.