/third_party/skia/tests/ |
D | SkColorSpaceXformStepsTest.cpp | 13 auto srgb = SkColorSpace::MakeSRGB(), in DEF_TEST() local 16 srgb1 = srgb ->makeLinearGamma(), in DEF_TEST() 37 { adobe, srgb, premul, premul, in DEF_TEST() 45 { srgb, adobe, premul, premul, true,true,true,true,true }, in DEF_TEST() 48 { adobe, srgb, unpremul, premul, false,true,true,true,true }, in DEF_TEST() 49 { srgb, adobe, unpremul, premul, false,true,true,true,true }, in DEF_TEST() 52 { adobe, srgb, opaque, premul, false,true,true,true,false }, in DEF_TEST() 53 { srgb, adobe, opaque, premul, false,true,true,true,false }, in DEF_TEST() 57 { srgb, srgb22, premul, premul, in DEF_TEST() 65 { srgb22, srgb, premul, premul, true,true,false,true,true }, in DEF_TEST() [all …]
|
D | NonlinearBlendingTest.cpp | 14 auto srgb = SkColorSpace::MakeSRGB(); in DEF_TEST() local 18 srgb->toProfile(&srgb_profile); in DEF_TEST() 39 SkColorSpaceXformSteps steps(srgb.get(), kUnpremul_SkAlphaType, in DEF_TEST() 62 srgb.get(), kPremul_SkAlphaType); in DEF_TEST()
|
D | ColorSpaceTest.cpp | 150 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); in DEF_TEST() local 182 REPORTER_ASSERT(r, SkColorSpace::Equals(srgb.get(), srgb.get())); in DEF_TEST() 187 REPORTER_ASSERT(r, !SkColorSpace::Equals(nullptr, srgb.get())); in DEF_TEST() 188 REPORTER_ASSERT(r, !SkColorSpace::Equals(srgb.get(), nullptr)); in DEF_TEST() 189 REPORTER_ASSERT(r, !SkColorSpace::Equals(z30.get(), srgb.get())); in DEF_TEST() 192 REPORTER_ASSERT(r, !SkColorSpace::Equals(srgb.get(), rgb4.get())); in DEF_TEST() 293 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); in DEF_TEST() local 306 REPORTER_ASSERT(r, srgb->toXYZD50Hash() == strange->toXYZD50Hash()); in DEF_TEST() 327 sk_sp<SkColorSpace> srgb = SkColorSpace::Make(*skcms_sRGB_profile()); in DEF_TEST() local 328 REPORTER_ASSERT(r, srgb->isSRGB()); in DEF_TEST()
|
D | SRGBReadWritePixelsTest.cpp | 22 float srgb_to_linear(float srgb) { in srgb_to_linear() argument 23 if (srgb <= 0.04045f) { in srgb_to_linear() 24 return srgb / 12.92f; in srgb_to_linear() 26 return powf((srgb + 0.055f) / 1.055f, 2.4f); in srgb_to_linear() 100 static bool check_srgb_to_linear_conversion(uint32_t srgb, uint32_t linear, float error) { in check_srgb_to_linear_conversion() argument 101 return check_conversion<srgb_to_linear>(srgb, linear, error); in check_srgb_to_linear_conversion() 104 static bool check_linear_to_srgb_conversion(uint32_t linear, uint32_t srgb, float error) { in check_linear_to_srgb_conversion() argument 105 return check_conversion<linear_to_srgb>(linear, srgb, error); in check_linear_to_srgb_conversion()
|
D | ApplyGammaTest.cpp | 43 static float srgb_to_linear(float srgb) { in srgb_to_linear() argument 44 if (srgb <= 0.04045f) { in srgb_to_linear() 45 return srgb / 12.92f; in srgb_to_linear() 47 return powf((srgb + 0.055f) / 1.055f, 2.4f); in srgb_to_linear()
|
/third_party/flutter/skia/tests/ |
D | SkColorSpaceXformStepsTest.cpp | 13 auto srgb = SkColorSpace::MakeSRGB(), in DEF_TEST() local 16 srgb1 = srgb ->makeLinearGamma(), in DEF_TEST() 36 { adobe, srgb, premul, premul, in DEF_TEST() 44 { srgb, adobe, premul, premul, true,true,true,true,true }, in DEF_TEST() 47 { adobe, srgb, unpremul, premul, false,true,true,true,true }, in DEF_TEST() 48 { srgb, adobe, unpremul, premul, false,true,true,true,true }, in DEF_TEST() 51 { adobe, srgb, opaque, premul, false,true,true,true,false }, in DEF_TEST() 52 { srgb, adobe, opaque, premul, false,true,true,true,false }, in DEF_TEST() 56 { srgb, srgb22, premul, premul, in DEF_TEST() 64 { srgb22, srgb, premul, premul, true,true,false,true,true }, in DEF_TEST() [all …]
|
D | NonlinearBlendingTest.cpp | 14 auto srgb = SkColorSpace::MakeSRGB(); in DEF_TEST() local 18 srgb->toProfile(&srgb_profile); in DEF_TEST() 39 SkColorSpaceXformSteps steps(srgb.get(), kUnpremul_SkAlphaType, in DEF_TEST() 62 srgb.get(), kPremul_SkAlphaType); in DEF_TEST()
|
D | ColorSpaceTest.cpp | 150 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); in DEF_TEST() local 182 REPORTER_ASSERT(r, SkColorSpace::Equals(srgb.get(), srgb.get())); in DEF_TEST() 187 REPORTER_ASSERT(r, !SkColorSpace::Equals(nullptr, srgb.get())); in DEF_TEST() 188 REPORTER_ASSERT(r, !SkColorSpace::Equals(srgb.get(), nullptr)); in DEF_TEST() 189 REPORTER_ASSERT(r, !SkColorSpace::Equals(z30.get(), srgb.get())); in DEF_TEST() 192 REPORTER_ASSERT(r, !SkColorSpace::Equals(srgb.get(), rgb4.get())); in DEF_TEST() 293 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); in DEF_TEST() local 306 REPORTER_ASSERT(r, srgb->toXYZD50Hash() == strange->toXYZD50Hash()); in DEF_TEST() 327 sk_sp<SkColorSpace> srgb = SkColorSpace::Make(*skcms_sRGB_profile()); in DEF_TEST() local 328 REPORTER_ASSERT(r, srgb->isSRGB()); in DEF_TEST()
|
D | SRGBReadWritePixelsTest.cpp | 21 float srgb_to_linear(float srgb) { in srgb_to_linear() argument 22 if (srgb <= 0.04045f) { in srgb_to_linear() 23 return srgb / 12.92f; in srgb_to_linear() 25 return powf((srgb + 0.055f) / 1.055f, 2.4f); in srgb_to_linear() 99 static bool check_srgb_to_linear_conversion(uint32_t srgb, uint32_t linear, float error) { in check_srgb_to_linear_conversion() argument 100 return check_conversion<srgb_to_linear>(srgb, linear, error); in check_srgb_to_linear_conversion() 103 static bool check_linear_to_srgb_conversion(uint32_t linear, uint32_t srgb, float error) { in check_linear_to_srgb_conversion() argument 104 return check_conversion<linear_to_srgb>(linear, srgb, error); in check_linear_to_srgb_conversion()
|
D | ApplyGammaTest.cpp | 43 static float srgb_to_linear(float srgb) { in srgb_to_linear() argument 44 if (srgb <= 0.04045f) { in srgb_to_linear() 45 return srgb / 12.92f; in srgb_to_linear() 47 return powf((srgb + 0.055f) / 1.055f, 2.4f); in srgb_to_linear()
|
/third_party/pixman/pixman/ |
D | make-srgb.pl | 36 my $srgb = int(linear_to_srgb($linear / 4095.0) * 255.0 + 0.5); 37 push @linear_to_srgb, $srgb; 41 for my $srgb (0 .. 255) 43 my $linear = int(srgb_to_linear($srgb / 255.0) * 65535.0 + 0.5); 52 for my $srgb (0 .. $#srgb_to_linear) 57 my $linear = $srgb_to_linear[$srgb]; 59 last if $srgb == $srgb_lossy; 62 $srgb_to_linear[$srgb] ++; 65 die "Too many adds at $srgb" if $add > 5; 102 for my $srgb (0 .. $#srgb_to_linear) [all …]
|
/third_party/flutter/engine/flutter/flow/ |
D | raster_cache_unittests.cc | 35 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); in TEST() local 36 ASSERT_FALSE(cache.Prepare(NULL, picture.get(), matrix, srgb.get(), true, in TEST() 39 ASSERT_FALSE(cache.Prepare(NULL, picture.get(), matrix, srgb.get(), true, in TEST() 42 ASSERT_TRUE(cache.Prepare(NULL, picture.get(), matrix, srgb.get(), true, in TEST() 57 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); in TEST() local 58 ASSERT_FALSE(cache.Prepare(NULL, picture.get(), matrix, srgb.get(), true, in TEST() 61 ASSERT_FALSE(cache.Prepare(NULL, picture.get(), matrix, srgb.get(), true, in TEST() 64 ASSERT_FALSE(cache.Prepare(NULL, picture.get(), matrix, srgb.get(), true, in TEST() 79 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); in TEST() local 80 ASSERT_FALSE(cache.Prepare(NULL, picture.get(), matrix, srgb.get(), true, in TEST() [all …]
|
/third_party/flutter/skia/third_party/externals/dawn/src/common/ |
D | Math.cpp | 117 float SRGBToLinear(float srgb) { in SRGBToLinear() argument 119 if (srgb <= 0.0f) { in SRGBToLinear() 121 } else if (srgb > 1.0f) { in SRGBToLinear() 125 if (srgb < 0.04045f) { in SRGBToLinear() 126 return srgb / 12.92f; in SRGBToLinear() 128 return std::pow((srgb + 0.055f) / 1.055f, 2.4f); in SRGBToLinear()
|
/third_party/flutter/skia/gm/ |
D | makecolorspace.cpp | 42 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); in make_color_space() local 44 srgb = SkColorSpace::MakeSRGBLinear(); in make_color_space() 46 return xform->reinterpretColorSpace(std::move(srgb)); in make_color_space() 142 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); variable 143 sk_sp<SkColorSpace> spin = srgb->makeColorSpin(); 153 canvas->drawImage(image->makeColorSpace(spin)->reinterpretColorSpace(srgb), 256.0f, 0.0f); 161 canvas->drawImage(image->makeColorSpace(spin)->reinterpretColorSpace(srgb), 256.0f, 0.0f); 172 canvas->drawImage(image->makeColorSpace(spin)->reinterpretColorSpace(srgb), 256.0f, 0.0f);
|
D | color4f.cpp | 100 auto srgb = SkColorSpace::MakeSRGB(); variable 101 auto spin = srgb->makeColorSpin(); // RGB -> GBR 116 SkShaders::Color(c4, srgb),
|
/third_party/flutter/skia/tools/fiddle/ |
D | fiddle_main.h | 39 DrawOptions(int w, int h, bool r, bool g, bool p, bool k, bool srgb, bool f16, in DrawOptions() 51 , srgb(srgb) in DrawOptions() 61 SkASSERT(srgb || !f16); in DrawOptions() 68 bool srgb; member
|
/third_party/skia/tools/fiddle/ |
D | fiddle_main.h | 40 DrawOptions(int w, int h, bool r, bool g, bool p, bool k, bool srgb, bool f16, in DrawOptions() 52 , srgb(srgb) in DrawOptions() 61 SkASSERT(srgb || !f16); in DrawOptions() 68 bool srgb; member
|
/third_party/skia/gm/ |
D | makecolorspace.cpp | 40 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); in make_color_space() local 42 srgb = SkColorSpace::MakeSRGBLinear(); in make_color_space() 44 return xform->reinterpretColorSpace(std::move(srgb)); in make_color_space() 142 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); variable 143 sk_sp<SkColorSpace> spin = srgb->makeColorSpin(); 153 canvas->drawImage(image->makeColorSpace(spin, nullptr)->reinterpretColorSpace(srgb), 162 canvas->drawImage(image->makeColorSpace(spin, nullptr)->reinterpretColorSpace(srgb), 175 canvas->drawImage(image->makeColorSpace(spin, direct)->reinterpretColorSpace(srgb),
|
D | color4f.cpp | 100 auto srgb = SkColorSpace::MakeSRGB(); variable 101 auto spin = srgb->makeColorSpin(); // RGB -> GBR 116 SkShaders::Color(c4, srgb),
|
/third_party/skia/third_party/externals/dawn/src/common/ |
D | Math.cpp | 140 float SRGBToLinear(float srgb) { in SRGBToLinear() argument 142 if (srgb <= 0.0f) { in SRGBToLinear() 144 } else if (srgb > 1.0f) { in SRGBToLinear() 148 if (srgb < 0.04045f) { in SRGBToLinear() 149 return srgb / 12.92f; in SRGBToLinear() 151 return std::pow((srgb + 0.055f) / 1.055f, 2.4f); in SRGBToLinear()
|
/third_party/pixman/demos/ |
D | Makefile.am | 35 srgb-trap-test \ 36 srgb-test \ 53 srgb_test_SOURCES = srgb-test.c $(GTK_UTILS) 54 srgb_trap_test_SOURCES = srgb-trap-test.c $(GTK_UTILS)
|
/third_party/skia/experimental/tools/ |
D | get_examples.py | 60 srgb = not textonly and 'srgb' in keys 61 f16 = srgb and 'f16' in keys 79 cxx_bool(srgb), 87 elif srgb:
|
/third_party/flutter/skia/src/gpu/effects/ |
D | GrSRGBEffect.cpp | 93 static inline float srgb_to_linear(float srgb) { in srgb_to_linear() argument 94 return (srgb <= 0.04045f) ? srgb / 12.92f : powf((srgb + 0.055f) / 1.055f, 2.4f); in srgb_to_linear()
|
/third_party/flutter/skia/bench/ |
D | GrMipMapBench.cpp | 37 auto srgb = SkColorSpace::MakeSRGB(); in onDraw() local 39 SkImageInfo::Make(fW, fH, kRGBA_8888_SkColorType, kPremul_SkAlphaType, srgb); in onDraw()
|
/third_party/skia/bench/ |
D | GrMipmapBench.cpp | 37 auto srgb = SkColorSpace::MakeSRGB(); in onDraw() local 39 SkImageInfo::Make(fW, fH, kRGBA_8888_SkColorType, kPremul_SkAlphaType, srgb); in onDraw()
|