Home
last modified time | relevance | path

Searched refs:srgb (Results 1 – 25 of 60) sorted by relevance

123

/third_party/skia/tests/
DSkColorSpaceXformStepsTest.cpp13 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 …]
DNonlinearBlendingTest.cpp14 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()
DColorSpaceTest.cpp150 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()
DSRGBReadWritePixelsTest.cpp22 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()
DApplyGammaTest.cpp43 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/
DSkColorSpaceXformStepsTest.cpp13 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 …]
DNonlinearBlendingTest.cpp14 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()
DColorSpaceTest.cpp150 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()
DSRGBReadWritePixelsTest.cpp21 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()
DApplyGammaTest.cpp43 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/
Dmake-srgb.pl36 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/
Draster_cache_unittests.cc35 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/
DMath.cpp117 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/
Dmakecolorspace.cpp42 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);
Dcolor4f.cpp100 auto srgb = SkColorSpace::MakeSRGB(); variable
101 auto spin = srgb->makeColorSpin(); // RGB -> GBR
116 SkShaders::Color(c4, srgb),
/third_party/flutter/skia/tools/fiddle/
Dfiddle_main.h39 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/
Dfiddle_main.h40 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/
Dmakecolorspace.cpp40 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),
Dcolor4f.cpp100 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/
DMath.cpp140 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/
DMakefile.am35 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/
Dget_examples.py60 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/
DGrSRGBEffect.cpp93 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/
DGrMipMapBench.cpp37 auto srgb = SkColorSpace::MakeSRGB(); in onDraw() local
39 SkImageInfo::Make(fW, fH, kRGBA_8888_SkColorType, kPremul_SkAlphaType, srgb); in onDraw()
/third_party/skia/bench/
DGrMipmapBench.cpp37 auto srgb = SkColorSpace::MakeSRGB(); in onDraw() local
39 SkImageInfo::Make(fW, fH, kRGBA_8888_SkColorType, kPremul_SkAlphaType, srgb); in onDraw()

123