/third_party/skia/tests/ |
H A D | SkColorSpaceXformStepsTest.cpp | 19 auto premul = kPremul_SkAlphaType, in DEF_TEST() local 31 bool premul; in DEF_TEST() member 37 { adobe, srgb, premul, premul, in DEF_TEST() 42 true, // premul to g(s')*a, a 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() 51 // If opaque, we need neither the initial unpremul, nor the premul late in DEF_TEST() [all...] |
H A D | NonlinearBlendingTest.cpp | 32 premul = skcms_AlphaFormat_PremulAsEncoded; in DEF_TEST() local 36 &via_skcms, f32, premul, &dp3_profile, in DEF_TEST() 56 skcms_Transform(via_steps, f32, premul, &dp3_profile, in DEF_TEST() 57 steps_to_skcms, f32, premul, &srgb_profile, in DEF_TEST()
|
H A D | ImageTest.cpp | 546 SkBitmap premul; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local 547 premul.allocPixels( in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 549 if (!texImage->readPixels(dContext, premul.info(), premul.getPixels(), premul.rowBytes(), in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 563 uint32_t read = *premul.getAddr32(x, y); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 569 // bit of tolerance for GPU vs CPU premul math. in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 573 ERRORF(reporter, "unpremul(0x%08x)->premul(0x%08x) expected(0x%08x) at %d, %d.", in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 574 *bmp.getAddr32(x, y), *premul.getAddr32(x, y), origColor, x, y); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 1258 // make all valid premul combination in make_all_premul() [all...] |
/third_party/skia/src/shaders/gradients/ |
H A D | Sk4fLinearGradient.cpp | 17 template<ApplyPremul premul> 25 Sk4f c0 = c + DstTraits<premul>::pre_lerp_bias(bias0), in ramp() 26 c1 = c + dc + DstTraits<premul>::pre_lerp_bias(bias1), in ramp() 31 DstTraits<premul>::store4x(c0, c1, c2, c3, dst, bias0, bias1); in ramp() 41 DstTraits<premul>::store(c0, dst++, bias0); in ramp() 42 DstTraits<premul>::store(c1, dst++, bias1); in ramp() 46 DstTraits<premul>::store(c0, dst, bias0); in ramp() 172 // In premul interpolation mode, components are pre-scaled by 255 and the store in shadeSpan() 187 template<ApplyPremul premul> 197 this->shadeSpanInternal<premul, SkTileMod in shadePremulSpan() [all...] |
H A D | Sk4fGradientPriv.h | 46 // - store() Store one Sk4f to dest. Optionally handles premul, color space 54 template <ApplyPremul premul> 56 using PM = PremulTraits<premul>; 58 // For L32, prescaling by 255 saves a per-pixel multiplication when premul is not needed. 61 return premul == ApplyPremul::False in load() 67 if (premul == ApplyPremul::False) { in store() 86 if (premul == ApplyPremul::False) { in store4x() 99 return premul == ApplyPremul::False ? bias : 0; in pre_lerp_bias()
|
H A D | Sk4fLinearGradient.h | 27 template <ApplyPremul premul> 31 template <ApplyPremul premul, SkTileMode tileMode>
|
H A D | Sk4fGradientBase.cpp | 14 Sk4f pack_color(const SkColor4f& c4f, bool premul, const Sk4f& component_scale) { in pack_color() argument 15 Sk4f pm4f = premul in pack_color() 16 ? Sk4f::Load(c4f.premul().vec()) in pack_color() 19 if (premul) { in pack_color() 20 // If the stops are premul, we clamp them to gamut now. in pack_color()
|
/third_party/skia/src/core/ |
H A D | SkColorSpaceXformSteps.cpp | 38 this->flags.premul = srcAT != kOpaque_SkAlphaType && dstAT == kPremul_SkAlphaType; in SkColorSpaceXformSteps() 85 // Skip unpremul...premul if there are no non-linear operations between. in SkColorSpaceXformSteps() 89 this->flags.premul) in SkColorSpaceXformSteps() 92 this->flags.premul = false; in SkColorSpaceXformSteps() 125 if (flags.premul) { in apply() 137 if (flags.premul) { p->append(SkRasterPipeline::premul); } in apply() 219 if (flags.premul) { in program() 220 c = premul(c); in program()
|
H A D | SkColorSpaceXformSteps.h | 25 bool premul = false; member 32 | (premul ? 16 : 0); in mask()
|
H A D | SkColorFilter_Matrix.cpp | 102 if (!willStayOpaque) { p->append(SkRasterPipeline::premul); } in onAppendStages() 146 return (fClamp == Clamp::kYes ? premul(clamp01(c)) : premul(c)); in onProgram() 148 return premul(clamp01(c)); in onProgram() 167 // An additional trick we employ is deferring premul->unpremul conversion until the very end: the 202 // Convert HSLA -> RGBA (including clamp and premul).
|
H A D | SkDraw_atlas.cpp | 73 auto cp4 = c4.premul(); in updateColor() 166 load_color(uniformCtx, c4.premul().vec()); in drawAtlas()
|
H A D | SkModeColorFilter.cpp | 68 rec.fPipeline->append_constant_color(rec.fAlloc, color.premul().vec()); in onAppendStages()
|
/third_party/skia/src/effects/ |
H A D | SkOverdrawColorFilter.cpp | 37 SkPMColor4f* premul = (SkPMColor4f*)data->writable_data(); in MakeWithSkColors() local 39 premul[i] = SkColor4f::FromColor(colors[i]).premul(); in MakeWithSkColors()
|
H A D | SkLayerDrawLooper.cpp | 59 SkPMColor4f pmS = src.premul(); in xferColor() 60 SkPMColor4f pmD = dst.premul(); in xferColor()
|
H A D | SkTableColorFilter.cpp | 60 p->append(SkRasterPipeline::premul); 80 return premul(c);
|
/third_party/skia/src/images/ |
H A D | SkWebpEncoder.cpp | 96 const bool premul = pixmap.alphaType() == kPremul_SkAlphaType; in Encode() local 102 else if (!premul && ct == kRGBA_8888_SkColorType) { importProc = WebPPictureImportRGBA; } in Encode() 104 else if (!premul && ct == kBGRA_8888_SkColorType) { importProc = WebPPictureImportBGRA; } in Encode()
|
/third_party/skia/src/shaders/ |
H A D | SkColorShader.cpp | 82 rec.fPipeline->append_constant_color(rec.fAlloc, color.premul().vec()); in onAppendStages() 90 rec.fPipeline->append_constant_color(rec.fAlloc, color.premul().vec()); in onAppendStages() 133 return GrFragmentProcessor::MakeColor(color.premul()); in asFragmentProcessor()
|
/third_party/skia/tools/gdb/ |
H A D | bitmap.py | 40 premul = 2 variable in AlphaType 74 elif alpha_type == AlphaType.premul.value:
|
/third_party/skia/src/gpu/ |
H A D | SkGr.cpp | 260 return color.premul(); in SkColorToPMColor4f() 455 SkPMColor4f shaderInput = origColor.makeOpaque().premul(); in skpaint_to_grpaint_impl() 476 // ApplyPaintAlpha then creates a valid premul color by applying the paint alpha. in skpaint_to_grpaint_impl() 477 // Think of this as equivalent to (but faster than) putting origColor.premul() on in skpaint_to_grpaint_impl() 486 grPaint->setColor4f(origColor.premul()); in skpaint_to_grpaint_impl() 502 grPaint->setColor4f(origColor.makeOpaque().premul()); in skpaint_to_grpaint_impl() 516 grPaint->setColor4f(origColor.premul()); in skpaint_to_grpaint_impl() 525 grPaint->setColor4f(colorFilter->filterColor4f(origColor, dstCS, dstCS).premul()); in skpaint_to_grpaint_impl()
|
H A D | SurfaceContext.cpp | 110 premul = flags.premul; in readPixels() local 117 // unpremul step to writeSurfacePixels's premul step (which is determined empirically in in readPixels() 223 bool convert = unpremul || premul || needColorConversion || flip || makeTight || in readPixels() 369 premul = flags.premul; in internalWritePixels() local 379 bool canvas2DFastPath = !caps->avoidWritePixelsFastPath() && premul && !needColorConversion && in internalWritePixels() 485 bool convertAll = premul || in internalWritePixels()
|
/third_party/skia/src/gpu/gradients/ |
H A D | GrGradientShader.cpp | 37 const SkScalar* positions, int count, bool premul, const GrFPArgs& args) { in make_textured_colorizer() 50 SkAlphaType alphaType = premul ? kPremul_SkAlphaType : kUnpremul_SkAlphaType; in make_textured_colorizer() 436 bool premul, in make_colorizer() 524 return make_textured_colorizer(colors, positions, count, premul, args); in make_colorizer() 693 // premul issues depending on the interpolation mode in make_gradient() 701 colors[i] = inputPremul ? upmColor.premul() in make_gradient() 731 // The top-level effect has to export premul colors, but under certain conditions it doesn't in make_gradient() 732 // need to do anything to achieve that: i.e. its interpolating already premul colors in make_gradient() 733 // (inputPremul) or all the colors have a = 1, in which case premul is a no op. Note that this in make_gradient() 735 // optimize away the make-premul o in make_gradient() 36 make_textured_colorizer(const SkPMColor4f* colors, const SkScalar* positions, int count, bool premul, const GrFPArgs& args) make_textured_colorizer() argument 433 make_colorizer(const SkPMColor4f* colors, const SkScalar* positions, int count, bool premul, const GrFPArgs& args) make_colorizer() argument [all...] |
/third_party/skia/specs/web-img-decode/proposed/impl/ |
H A D | impl.js | 22 alphaType: options.premul ? CanvasKit.AlphaType.Premul : CanvasKit.AlphaType.Unpremul,
|
/third_party/skia/tools/gpu/ |
H A D | BackendTextureImageFactory.cpp | 49 auto pmColor = color.premul(); in MakeBackendTextureImage()
|
/third_party/skia/src/gpu/glsl/ |
H A D | GrGLSLColorSpaceXformHelper.h | 65 bool applyPremul() const { return fFlags.premul; } in applyPremul()
|
/third_party/skia/experimental/graphite/src/ |
H A D | DrawContext.cpp | 82 SkPMColor4f pmColor = clearColor.premul(); in clear()
|