/external/skia/tools/fiddle/ |
fiddle_main.h | 31 DrawOptions(int w, int h, bool r, bool g, bool p, bool k, bool srgb, bool f16, bool textOnly, const char* s) 37 , srgb(srgb) 43 SkASSERT(srgb || !f16); 50 bool srgb; member in struct:DrawOptions
|
fiddle_main.cpp | 133 SkASSERT(options.srgb); 136 } else if (options.srgb) {
|
/frameworks/base/libs/hwui/utils/ |
Color.h | 93 // Opto-electronic conversion function for the sRGB color space 94 // Takes a linear sRGB value and converts it to a gamma-encoded sRGB value 101 // Opto-electronic conversion function for the sRGB color space 102 // Takes a linear sRGB value and converts it to a gamma-encoded sRGB value 112 // Electro-optical conversion function for the sRGB color space 113 // Takes a gamma-encoded sRGB value and converts it to a linear sRGB value 114 static constexpr float EOCF_sRGB(float srgb) { [all...] |
/external/mesa3d/src/mesa/main/ |
formats.csv | 48 # - color space: rgb, srgb, yub, sz 147 # Packed sRGB formats 148 MESA_FORMAT_A8B8G8R8_SRGB , packed, 1, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb 149 MESA_FORMAT_B8G8R8A8_SRGB , packed, 1, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb 150 MESA_FORMAT_A8R8G8B8_SRGB , packed, 1, 1, 1, un8 , un8 , un8 , un8 , yzwx, srgb 151 MESA_FORMAT_B8G8R8X8_SRGB , packed, 1, 1, 1, un8 , un8 , un8 , x8 , zyx1, srgb 152 MESA_FORMAT_X8R8G8B8_SRGB , packed, 1, 1, 1, x8 , un8 , un8 , un8 , yzw1, srgb 153 MESA_FORMAT_R8G8B8A8_SRGB , packed, 1, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb 154 MESA_FORMAT_R8G8B8X8_SRGB , packed, 1, 1, 1, un8 , un8 , un8 , x8 , xyz1, srgb 155 MESA_FORMAT_X8B8G8R8_SRGB , packed, 1, 1, 1, x8 , un8 , un8 , un8 , wzy1, srgb [all...] |
/external/skia/tests/ |
SRGBTest.cpp | 31 uint8_t srgb = linear_to_srgb(f); local 33 REPORTER_ASSERT(r, srgb >= prev); 34 prev = srgb;
|
ApplyGammaTest.cpp | 19 /** convert 0..1 linear value to 0..1 srgb */ 28 /** convert 0..1 srgb value to 0..1 linear */ 29 static float srgb_to_linear(float srgb) { 30 if (srgb <= 0.04045f) { 31 return srgb / 12.92f; 33 return powf((srgb + 0.055f) / 1.055f, 2.4f); 47 // need to unpremul before we can perform srgb magic
|
SRGBReadWritePixelsTest.cpp | 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) [all...] |
ColorSpaceTest.cpp | 105 // Create an sRGB color space by name 108 // Create an sRGB color space by value 126 // Change a single value from the sRGB matrix 134 // Create the linear sRGB color space by name 137 // Create the linear sRGB color space via the sRGB color space's makeLinearGamma() 138 auto srgb = SkColorSpace::MakeSRGB(); local 139 auto srgbXYZ = static_cast<SkColorSpace_XYZ*>(srgb.get()); 143 // Create a linear sRGB color space by value 172 // Change a single value from the sRGB matri 271 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); local 345 SkColorSpacePrimaries srgb; local 467 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); local [all...] |
ImageGeneratorTest.cpp | 131 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); local 132 sk_sp<SkImage> ia = SkMakeImageInColorSpace(a, srgb, 0); 133 sk_sp<SkImage> ib = SkMakeImageInColorSpace(b, srgb, b.getGenerationID()); 134 sk_sp<SkImage> ic = SkMakeImageInColorSpace(c, srgb, c.getGenerationID()); 135 sk_sp<SkImage> id = SkMakeImageInColorSpace(d, srgb, 0); 136 sk_sp<SkImage> ie = SkMakeImageInColorSpace(e, srgb, e.getGenerationID(), 139 // Equal because sRGB->sRGB is a no-op. 142 // Equal because nullptr->sRGB is a no-op (nullptr is treated as sRGB), and becaus [all...] |
SRGBMipMapTest.cpp | 21 /** convert 0..1 srgb value to 0..1 linear */ 22 float srgb_to_linear(float srgb) { 23 if (srgb <= 0.04045f) { 24 return srgb / 12.92f; 26 return powf((srgb + 0.055f) / 1.055f, 2.4f); 30 /** convert 0..1 linear value to 0..1 srgb */ 88 // Fill texture with a dither of black and 60% sRGB (~ 32.5% linear) gray. Although there is 89 // only one likely failure mode (doing a direct downsample of the sRGB values), this pattern 151 // 1) Draw texture to S32 surface (should generate/use sRGB mips) 155 "first render of sRGB"); [all...] |
/external/skia/bench/ |
GrMipMapBench.cpp | 39 auto srgb = SkColorSpace::MakeSRGB(); variable 41 SkImageInfo::Make(fW, fH, kRGBA_8888_SkColorType, kPremul_SkAlphaType, srgb);
|
/external/skia/src/core/ |
SkPM4fPriv.h | 47 srgb = { rgb[0], rgb[1], rgb[2], (int)(255.0f * px[3] + 0.5f) }; local 50 SkNx_cast<uint8_t>(srgb).store(&s32); 66 static inline float exact_srgb_to_linear(float srgb) { 67 assert_unit(srgb); 69 if (srgb <= 0.04045) { 70 linear = srgb / 12.92f; 72 linear = powf((srgb + 0.055f) / 1.055f, 2.4f); 168 // sRGB gamma, sRGB gamut.
|
SkColorSpaceXformer.cpp | 139 void SkColorSpaceXformer::apply(SkColor* xformed, const SkColor* srgb, int n) { 141 SkColorSpaceXform::kBGRA_8888_ColorFormat, srgb, 145 SkColor SkColorSpaceXformer::apply(SkColor srgb) { 147 this->apply(&xformed, &srgb, 1);
|
SkColorSpaceXformer.h | 37 SkColor apply(SkColor srgb);
|
/external/mesa3d/src/gallium/auxiliary/util/ |
u_format.csv | 111 # SRGB formats 112 PIPE_FORMAT_L8_SRGB , plain, 1, 1, un8 , , , , xxx1, srgb 113 PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb 114 PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb 115 PIPE_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb 116 PIPE_FORMAT_A8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb 117 PIPE_FORMAT_X8B8G8R8_SRGB , plain, 1, 1, x8 , un8 , un8 , un8 , wzy1, srgb 118 PIPE_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb 119 PIPE_FORMAT_B8G8R8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , x8 , zyx1, srgb 120 PIPE_FORMAT_A8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, srgb [all...] |
u_format_s3tc.c | 245 unsigned block_size, boolean srgb) 256 if (srgb) { 322 unsigned block_size, boolean srgb) 333 if (srgb) { 410 unsigned block_size, boolean srgb) 423 if (srgb) { 488 unsigned block_size, boolean srgb) 500 if (srgb) { 561 * SRGB variants.
|
/external/skia/gm/ |
color4f.cpp | 74 // even if it holds sRGB values. 98 auto srgb = SkColorSpace::MakeSRGB(); local 101 // red -> blue, green -> red, blue -> green (sRGB) 103 mat.postConcat(*as_CSB(srgb)->toXYZD50()); 118 SkShader::MakeColorShader(c4, srgb),
|
makecolorspace.cpp | 33 // Assign an sRGB color space on the xformed image, so we can see the effects of the xform 35 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); local 37 srgb = SkColorSpace::MakeSRGBLinear(); 39 return SkImageMakeRasterCopyAndAssignColorSpace(xform.get(), srgb.get());
|
gradients.cpp | 64 auto srgb = SkColorSpace::MakeSRGBLinear(); local 65 return SkGradientShader::MakeLinear(pts, data.fColors4f, srgb, data.fPos, data.fCount, tm, 0, 83 auto srgb = SkColorSpace::MakeSRGBLinear(); local 84 return SkGradientShader::MakeRadial(center, center.fX, data.fColors4f, srgb, data.fPos, 102 auto srgb = SkColorSpace::MakeSRGBLinear(); local 103 return SkGradientShader::MakeSweep(center.fX, center.fY, data.fColors4f, srgb, data.fPos, 127 auto srgb = SkColorSpace::MakeSRGBLinear(); local 130 data.fColors4f, srgb, data.fPos, data.fCount, tm, 153 auto srgb = SkColorSpace::MakeSRGBLinear(); local 155 data.fColors4f, srgb, data.fPos [all...] |
/external/skia/src/gpu/effects/ |
GrSRGBEffect.cpp | 93 static inline float srgb_to_linear(float srgb) { 94 return (srgb <= 0.04045f) ? srgb / 12.92f : powf((srgb + 0.055f) / 1.055f, 2.4f);
|
/external/mesa3d/src/amd/vulkan/ |
vk_format_layout.csv | 19 VK_FORMAT_R8_SRGB , plain, 1, 1, un8 , , , , x001, srgb 26 VK_FORMAT_R8G8_SRGB , plain, 1, 1, un8 , un8 , , , xy01, srgb 33 VK_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb 40 VK_FORMAT_B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , , zyx1, srgb 47 VK_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb 54 VK_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb 61 VK_FORMAT_A8B8G8R8_SRGB_PACK32 , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb 136 VK_FORMAT_BC1_RGB_SRGB_BLOCK , s3tc, 4, 4, x64 , , , , xyz1, srgb 138 VK_FORMAT_BC1_RGBA_SRGB_BLOCK , s3tc, 4, 4, x64 , , , , xyzw, srgb 140 VK_FORMAT_BC2_SRGB_BLOCK , s3tc, 4, 4, x128, , , , xyzw, srgb [all...] |
/external/skia/src/gpu/ |
GrPaint.h | 59 * Should shader output conversion from linear to sRGB be disabled. 60 * Only relevant if the destination is sRGB. Defaults to false. 62 void setDisableOutputConversionToSRGB(bool srgb) { fDisableOutputConversionToSRGB = srgb; } 66 * Should sRGB inputs be allowed to perform sRGB to linear conversion. With this flag 67 * set to false, sRGB textures will be treated as linear (including filtering). 73 * Should rendering be gamma-correct, end-to-end. Causes sRGB render targets to behave 74 * as such (with linear blending), and sRGB inputs to be filtered and decoded correctly. 146 * It may have variable sRGB settings [all...] |
GrTestUtils.cpp | 301 // sRGB or Adobe 313 sk_sp<SkColorSpace> srgb = SkColorSpace::MakeSRGB(); local 318 gXforms[1] = GrColorSpaceXform::Make(srgb.get(), adobe.get()); 320 gXforms[2] = GrColorSpaceXform::Make(adobe.get(), srgb.get());
|
/external/skia/tools/ |
ok_dsts.cpp | 20 if (options("cs") == "srgb") { 49 static Register srgb{"srgb", "alias for sw:cs=srgb", [](Options options) { 50 options["cs"] = "srgb"; 54 static Register f16{"f16", "alias for sw:ct=f16,cs=srgb", [](Options options) { 56 options["cs"] = "srgb";
|
/external/mesa3d/src/mesa/drivers/common/ |
meta_generate_mipmap.c | 91 /* The texture format is sRGB but we can't turn off sRGB->linear 96 "glGenerateMipmap() of sRGB texture without " 97 "sRGB decode\n"); 230 const bool srgb = local 234 srgb ? GL_DECODE_EXT : GL_SKIP_DECODE_EXT); 235 _mesa_set_framebuffer_srgb(ctx, srgb);
|