/third_party/skia/src/gpu/glsl/ |
D | GrGLSLBlend.cpp | 14 const char* BlendFuncName(SkBlendMode mode) { in BlendFuncName() 16 case SkBlendMode::kClear: return "blend_clear"; in BlendFuncName() 17 case SkBlendMode::kSrc: return "blend_src"; in BlendFuncName() 18 case SkBlendMode::kDst: return "blend_dst"; in BlendFuncName() 19 case SkBlendMode::kSrcOver: return "blend_src_over"; in BlendFuncName() 20 case SkBlendMode::kDstOver: return "blend_dst_over"; in BlendFuncName() 21 case SkBlendMode::kSrcIn: return "blend_src_in"; in BlendFuncName() 22 case SkBlendMode::kDstIn: return "blend_dst_in"; in BlendFuncName() 23 case SkBlendMode::kSrcOut: return "blend_src_out"; in BlendFuncName() 24 case SkBlendMode::kDstOut: return "blend_dst_out"; in BlendFuncName() [all …]
|
/third_party/skia/modules/androidkit/src/ |
D | Utils.cpp | 36 SkBlendMode BlendMode(jint bm) { in BlendMode() 38 static_assert(0 == static_cast<int>(SkBlendMode::kClear)); in BlendMode() 39 static_assert(1 == static_cast<int>(SkBlendMode::kSrc)); in BlendMode() 40 static_assert(2 == static_cast<int>(SkBlendMode::kDst)); in BlendMode() 41 static_assert(3 == static_cast<int>(SkBlendMode::kSrcOver)); in BlendMode() 42 static_assert(4 == static_cast<int>(SkBlendMode::kDstOver)); in BlendMode() 43 static_assert(5 == static_cast<int>(SkBlendMode::kSrcIn)); in BlendMode() 44 static_assert(6 == static_cast<int>(SkBlendMode::kDstIn)); in BlendMode() 45 static_assert(7 == static_cast<int>(SkBlendMode::kSrcOut)); in BlendMode() 46 static_assert(8 == static_cast<int>(SkBlendMode::kDstOut)); in BlendMode() [all …]
|
/third_party/skia/src/core/ |
D | SkBlendMode.cpp | 11 bool SkBlendMode_ShouldPreScaleCoverage(SkBlendMode mode, bool rgb_coverage) { in SkBlendMode_ShouldPreScaleCoverage() 26 case SkBlendMode::kDst: // d --> no sa term, ok! in SkBlendMode_ShouldPreScaleCoverage() 27 case SkBlendMode::kDstOver: // d + s*inv(da) --> no sa term, ok! in SkBlendMode_ShouldPreScaleCoverage() 28 case SkBlendMode::kPlus: // clamp(s+d) --> no sa term, ok! in SkBlendMode_ShouldPreScaleCoverage() 31 case SkBlendMode::kDstOut: // d * inv(sa) in SkBlendMode_ShouldPreScaleCoverage() 32 case SkBlendMode::kSrcATop: // s*da + d*inv(sa) in SkBlendMode_ShouldPreScaleCoverage() 33 case SkBlendMode::kSrcOver: // s + d*inv(sa) in SkBlendMode_ShouldPreScaleCoverage() 34 case SkBlendMode::kXor: // s*inv(da) + d*inv(sa) in SkBlendMode_ShouldPreScaleCoverage() 43 bool SkBlendMode_SupportsCoverageAsAlpha(SkBlendMode mode) { in SkBlendMode_SupportsCoverageAsAlpha() 47 bool SkBlendMode_AsCoeff(SkBlendMode mode, SkBlendModeCoeff* src, SkBlendModeCoeff* dst) { in SkBlendMode_AsCoeff() [all …]
|
D | SkBlendModeBlender.cpp | 17 sk_sp<SkBlender> SkBlender::Mode(SkBlendMode mode) { in Mode() 25 RETURN_SINGLETON_BLENDER(SkBlendMode::kClear) in Mode() 26 RETURN_SINGLETON_BLENDER(SkBlendMode::kSrc) in Mode() 27 RETURN_SINGLETON_BLENDER(SkBlendMode::kDst) in Mode() 28 RETURN_SINGLETON_BLENDER(SkBlendMode::kSrcOver) in Mode() 29 RETURN_SINGLETON_BLENDER(SkBlendMode::kDstOver) in Mode() 30 RETURN_SINGLETON_BLENDER(SkBlendMode::kSrcIn) in Mode() 31 RETURN_SINGLETON_BLENDER(SkBlendMode::kDstIn) in Mode() 32 RETURN_SINGLETON_BLENDER(SkBlendMode::kSrcOut) in Mode() 33 RETURN_SINGLETON_BLENDER(SkBlendMode::kDstOut) in Mode() [all …]
|
D | SkModeColorFilter.cpp | 26 SkModeColorFilter::SkModeColorFilter(SkColor color, SkBlendMode mode) { in SkModeColorFilter() 31 bool SkModeColorFilter::onAsAColorMode(SkColor* color, SkBlendMode* mode) const { in onAsAColorMode() 43 case SkBlendMode::kDst: //!< [Da, Dc] in onIsAlphaUnchanged() 44 case SkBlendMode::kSrcATop: //!< [Da, Sc * Da + (1 - Sa) * Dc] in onIsAlphaUnchanged() 59 SkBlendMode mode = (SkBlendMode)buffer.readUInt(); in CreateProc() 94 if (fMode == SkBlendMode::kDst) { in asFragmentProcessor() 116 SkASSERT(fMode > SkBlendMode::kLastCoeffMode || in asFragmentProcessor() 126 sk_sp<SkColorFilter> SkColorFilters::Blend(SkColor color, SkBlendMode mode) { in Blend() 135 if (SkBlendMode::kClear == mode) { in Blend() 137 mode = SkBlendMode::kSrc; in Blend() [all …]
|
/third_party/skia/src/gpu/effects/ |
D | GrCustomXfermode.cpp | 21 bool GrCustomXfermode::IsSupportedMode(SkBlendMode mode) { in IsSupportedMode() 22 return (int)mode > (int)SkBlendMode::kLastCoeffMode && in IsSupportedMode() 23 (int)mode <= (int)SkBlendMode::kLastMode; in IsSupportedMode() 30 static constexpr GrBlendEquation hw_blend_equation(SkBlendMode mode) { in hw_blend_equation() 31 constexpr int kEqOffset = (kOverlay_GrBlendEquation - (int)SkBlendMode::kOverlay); in hw_blend_equation() 32 static_assert(kOverlay_GrBlendEquation == (int)SkBlendMode::kOverlay + kEqOffset); in hw_blend_equation() 33 static_assert(kDarken_GrBlendEquation == (int)SkBlendMode::kDarken + kEqOffset); in hw_blend_equation() 34 static_assert(kLighten_GrBlendEquation == (int)SkBlendMode::kLighten + kEqOffset); in hw_blend_equation() 35 static_assert(kColorDodge_GrBlendEquation == (int)SkBlendMode::kColorDodge + kEqOffset); in hw_blend_equation() 36 static_assert(kColorBurn_GrBlendEquation == (int)SkBlendMode::kColorBurn + kEqOffset); in hw_blend_equation() [all …]
|
D | GrBlendFragmentProcessor.cpp | 17 static inline bool does_cpu_blend_impl_match_gpu(SkBlendMode mode) { in does_cpu_blend_impl_match_gpu() 21 return mode <= SkBlendMode::kLastSeparableMode && mode != SkBlendMode::kSoftLight && in does_cpu_blend_impl_match_gpu() 22 mode != SkBlendMode::kColorBurn; in does_cpu_blend_impl_match_gpu() 31 SkBlendMode mode) { in Make() 43 SkBlendMode mode) in BlendFragmentProcessor() 62 const GrFragmentProcessor* dst, SkBlendMode mode) { in OptFlags() 65 case SkBlendMode::kClear: in OptFlags() 66 case SkBlendMode::kSrc: in OptFlags() 67 case SkBlendMode::kDst: in OptFlags() 75 case SkBlendMode::kSrcIn: in OptFlags() [all …]
|
D | GrPorterDuffXferProcessor.cpp | 263 static constexpr BlendFormula gBlendTable[2][2][(int)SkBlendMode::kLastCoeffMode + 1] = { 341 static constexpr BlendFormula gLCDBlendTable[(int)SkBlendMode::kLastCoeffMode + 1] = { 361 SkBlendMode xfermode) { in get_blend_formula() 362 SkASSERT((unsigned)xfermode <= (unsigned)SkBlendMode::kLastCoeffMode); in get_blend_formula() 366 static BlendFormula get_lcd_blend_formula(SkBlendMode xfermode) { in get_lcd_blend_formula() 367 SkASSERT((unsigned)xfermode <= (unsigned)SkBlendMode::kLastCoeffMode); in get_lcd_blend_formula() 479 ShaderPDXferProcessor(SkBlendMode xfermode, GrProcessorAnalysisCoverage coverage) in ShaderPDXferProcessor() 496 const SkBlendMode fXfermode; 540 static sk_sp<const GrXferProcessor> Make(SkBlendMode mode, 579 sk_sp<const GrXferProcessor> PDLCDXferProcessor::Make(SkBlendMode mode, in Make() [all …]
|
/third_party/skia/docs/examples/ |
D | skpaint_xfer.cpp | 11 SkBlendMode modes[] = { in draw() 12 SkBlendMode::kClear, in draw() 13 SkBlendMode::kSrc, in draw() 14 SkBlendMode::kDst, in draw() 15 SkBlendMode::kSrcOver, in draw() 16 SkBlendMode::kDstOver, in draw() 17 SkBlendMode::kSrcIn, in draw() 18 SkBlendMode::kDstIn, in draw() 19 SkBlendMode::kSrcOut, in draw() 20 SkBlendMode::kDstOut, in draw() [all …]
|
D | BlendModes.cpp | 16 auto comp = SkShaders::Blend(SkBlendMode::kModulate, std::move(rad), std::move(sweep)); in drawBG() 24 SkBlendMode blendModes[] = { in draw() 25 SkBlendMode::kDst, in draw() 26 SkBlendMode::kSrc, in draw() 27 SkBlendMode::kSrcOver, in draw() 28 SkBlendMode::kDstOver, in draw() 29 SkBlendMode::kSrcIn, in draw() 30 SkBlendMode::kDstIn, in draw() 31 SkBlendMode::kSrcOut, in draw() 32 SkBlendMode::kDstOut, in draw() [all …]
|
/third_party/skia/bench/ |
D | BlendmodeBench.cpp | 33 XfermodeBench(SkBlendMode mode, Type t) : fBlendMode(mode) { in XfermodeBench() 102 SkBlendMode fBlendMode; 117 BENCH(SkBlendMode::kClear) 118 BENCH(SkBlendMode::kSrc) 119 BENCH(SkBlendMode::kDst) 120 BENCH(SkBlendMode::kSrcOver) 121 BENCH(SkBlendMode::kDstOver) 122 BENCH(SkBlendMode::kSrcIn) 123 BENCH(SkBlendMode::kDstIn) 124 BENCH(SkBlendMode::kSrcOut) [all …]
|
/third_party/skia/gm/ |
D | lcdblendmodes.cpp | 88 surfPaint.setBlendMode(SkBlendMode::kSrcOver); in onDraw() 93 const SkBlendMode gModes[] = { in drawColumn() 94 SkBlendMode::kClear, in drawColumn() 95 SkBlendMode::kSrc, in drawColumn() 96 SkBlendMode::kDst, in drawColumn() 97 SkBlendMode::kSrcOver, in drawColumn() 98 SkBlendMode::kDstOver, in drawColumn() 99 SkBlendMode::kSrcIn, in drawColumn() 100 SkBlendMode::kDstIn, in drawColumn() 101 SkBlendMode::kSrcOut, in drawColumn() [all …]
|
D | coloremoji_blendmodes.cpp | 79 const SkBlendMode gModes[] = { in onDraw() 80 SkBlendMode::kClear, in onDraw() 81 SkBlendMode::kSrc, in onDraw() 82 SkBlendMode::kDst, in onDraw() 83 SkBlendMode::kSrcOver, in onDraw() 84 SkBlendMode::kDstOver, in onDraw() 85 SkBlendMode::kSrcIn, in onDraw() 86 SkBlendMode::kDstIn, in onDraw() 87 SkBlendMode::kSrcOut, in onDraw() 88 SkBlendMode::kDstOut, in onDraw() [all …]
|
D | xfermodeimagefilter.cpp | 58 const SkBlendMode gModes[] = { in onDraw() 59 SkBlendMode::kClear, in onDraw() 60 SkBlendMode::kSrc, in onDraw() 61 SkBlendMode::kDst, in onDraw() 62 SkBlendMode::kSrcOver, in onDraw() 63 SkBlendMode::kDstOver, in onDraw() 64 SkBlendMode::kSrcIn, in onDraw() 65 SkBlendMode::kDstIn, in onDraw() 66 SkBlendMode::kSrcOut, in onDraw() 67 SkBlendMode::kDstOut, in onDraw() [all …]
|
D | drawatlascolor.cpp | 40 paint.setBlendMode(SkBlendMode::kSrc); in make_atlas() 88 const SkBlendMode gModes[] = { in onDraw() 89 SkBlendMode::kClear, in onDraw() 90 SkBlendMode::kSrc, in onDraw() 91 SkBlendMode::kDst, in onDraw() 92 SkBlendMode::kSrcOver, in onDraw() 93 SkBlendMode::kDstOver, in onDraw() 94 SkBlendMode::kSrcIn, in onDraw() 95 SkBlendMode::kDstIn, in onDraw() 96 SkBlendMode::kSrcOut, in onDraw() [all …]
|
D | androidblendmodes.cpp | 66 void drawTile(SkCanvas* canvas, int xOffset, int yOffset, SkBlendMode mode) { in drawTile() 90 for (SkBlendMode mode : { SkBlendMode::kPlus /* add */, SkBlendMode::kClear, in onDraw() 91 SkBlendMode::kDarken, SkBlendMode::kDst, in onDraw() 92 SkBlendMode::kDstATop, SkBlendMode::kDstIn, in onDraw() 93 SkBlendMode::kDstOut, SkBlendMode::kDstOver, in onDraw() 94 SkBlendMode::kLighten, SkBlendMode::kModulate /* multiply */, in onDraw() 95 SkBlendMode::kOverlay, SkBlendMode::kScreen, in onDraw() 96 SkBlendMode::kSrc, SkBlendMode::kSrcATop, in onDraw() 97 SkBlendMode::kSrcIn, SkBlendMode::kSrcOut, in onDraw() 98 SkBlendMode::kSrcOver, SkBlendMode::kXor } ) { in onDraw()
|
D | vertices.cpp | 63 return SkColorFilters::Blend(0xFFAABBCC, SkBlendMode::kDarken); in make_color_filter() 140 const SkBlendMode modes[] = { in onDraw() 141 SkBlendMode::kClear, in onDraw() 142 SkBlendMode::kSrc, in onDraw() 143 SkBlendMode::kDst, in onDraw() 144 SkBlendMode::kSrcOver, in onDraw() 145 SkBlendMode::kDstOver, in onDraw() 146 SkBlendMode::kSrcIn, in onDraw() 147 SkBlendMode::kDstIn, in onDraw() 148 SkBlendMode::kSrcOut, in onDraw() [all …]
|
D | xfermodes.cpp | 51 SkBlendMode fMode; 59 { SkBlendMode::kClear, kAll_SrcType }, 60 { SkBlendMode::kSrc, kAll_SrcType }, 61 { SkBlendMode::kDst, kAll_SrcType }, 62 { SkBlendMode::kSrcOver, kAll_SrcType }, 63 { SkBlendMode::kDstOver, kAll_SrcType }, 64 { SkBlendMode::kSrcIn, kAll_SrcType }, 65 { SkBlendMode::kDstIn, kAll_SrcType }, 66 { SkBlendMode::kSrcOut, kAll_SrcType }, 67 { SkBlendMode::kDstOut, kAll_SrcType }, [all …]
|
D | modecolorfilters.cpp | 96 bgPaint.setBlendMode(SkBlendMode::kSrc); in onDraw() 117 const SkBlendMode modes[] = { // currently just doing the Modes expressible as Coeffs in onDraw() 118 SkBlendMode::kClear, in onDraw() 119 SkBlendMode::kSrc, in onDraw() 120 SkBlendMode::kDst, in onDraw() 121 SkBlendMode::kSrcOver, in onDraw() 122 SkBlendMode::kDstOver, in onDraw() 123 SkBlendMode::kSrcIn, in onDraw() 124 SkBlendMode::kDstIn, in onDraw() 125 SkBlendMode::kSrcOut, in onDraw() [all …]
|
D | hairmodes.cpp | 25 constexpr SkBlendMode gModes[] = { 26 SkBlendMode::kClear, 27 SkBlendMode::kSrc, 28 SkBlendMode::kDst, 29 SkBlendMode::kSrcOver, 30 SkBlendMode::kDstOver, 31 SkBlendMode::kSrcIn, 32 SkBlendMode::kDstIn, 33 SkBlendMode::kSrcOut, 34 SkBlendMode::kDstOut, [all …]
|
/third_party/skia/src/c/ |
D | sk_paint.cpp | 136 SkBlendMode skmode; in sk_paint_set_xfermode_mode() 139 MAP( CLEAR_SK_XFERMODE_MODE, SkBlendMode::kClear ); in sk_paint_set_xfermode_mode() 140 MAP( SRC_SK_XFERMODE_MODE, SkBlendMode::kSrc ); in sk_paint_set_xfermode_mode() 141 MAP( DST_SK_XFERMODE_MODE, SkBlendMode::kDst ); in sk_paint_set_xfermode_mode() 142 MAP( SRCOVER_SK_XFERMODE_MODE, SkBlendMode::kSrcOver ); in sk_paint_set_xfermode_mode() 143 MAP( DSTOVER_SK_XFERMODE_MODE, SkBlendMode::kDstOver ); in sk_paint_set_xfermode_mode() 144 MAP( SRCIN_SK_XFERMODE_MODE, SkBlendMode::kSrcIn ); in sk_paint_set_xfermode_mode() 145 MAP( DSTIN_SK_XFERMODE_MODE, SkBlendMode::kDstIn ); in sk_paint_set_xfermode_mode() 146 MAP( SRCOUT_SK_XFERMODE_MODE, SkBlendMode::kSrcOut ); in sk_paint_set_xfermode_mode() 147 MAP( DSTOUT_SK_XFERMODE_MODE, SkBlendMode::kDstOut ); in sk_paint_set_xfermode_mode() [all …]
|
/third_party/skia/tests/ |
D | ColorFilterTest.cpp | 39 #define ILLEGAL_MODE ((SkBlendMode)-1) 44 for (int mode = 0; mode <= (int)SkBlendMode::kLastMode; mode++) { in DEF_TEST() 51 auto cf = SkColorFilters::Blend(color, (SkBlendMode)mode); in DEF_TEST() 54 if (SkBlendMode::kDst == (SkBlendMode)mode && nullptr == cf) { in DEF_TEST() 61 SkBlendMode m = ILLEGAL_MODE; in DEF_TEST() 64 SkBlendMode expectedMode = (SkBlendMode)mode; in DEF_TEST() 68 REPORTER_ASSERT(reporter, cf->asAColorMode(&c, (SkBlendMode*)&m)); in DEF_TEST() 70 if (SkBlendMode::kClear == (SkBlendMode)mode) { in DEF_TEST() 75 expectedMode = SkBlendMode::kSrc; in DEF_TEST() 89 SkBlendMode m2 = ILLEGAL_MODE; in DEF_TEST() [all …]
|
/third_party/skia/samplecode/ |
D | SampleAARectModes.cpp | 14 static const SkBlendMode gModes[] = { 15 SkBlendMode::kClear, 16 SkBlendMode::kSrc, 17 SkBlendMode::kDst, 18 SkBlendMode::kSrcOver, 19 SkBlendMode::kDstOver, 20 SkBlendMode::kSrcIn, 21 SkBlendMode::kDstIn, 22 SkBlendMode::kSrcOut, 23 SkBlendMode::kDstOut, [all …]
|
D | SampleHairModes.cpp | 14 static const SkBlendMode gModes[] = { 15 SkBlendMode::kClear, 16 SkBlendMode::kSrc, 17 SkBlendMode::kDst, 18 SkBlendMode::kSrcOver, 19 SkBlendMode::kDstOver, 20 SkBlendMode::kSrcIn, 21 SkBlendMode::kDstIn, 22 SkBlendMode::kSrcOut, 23 SkBlendMode::kDstOut, [all …]
|
D | SampleXfermodesBlur.cpp | 41 void draw_mode(SkCanvas* canvas, SkBlendMode mode, int alpha, SkScalar x, SkScalar y) { in draw_mode() 81 const SkBlendMode gModes[] = { in onDrawContent() 82 SkBlendMode::kClear, in onDrawContent() 83 SkBlendMode::kSrc, in onDrawContent() 84 SkBlendMode::kDst, in onDrawContent() 85 SkBlendMode::kSrcOver, in onDrawContent() 86 SkBlendMode::kDstOver, in onDrawContent() 87 SkBlendMode::kSrcIn, in onDrawContent() 88 SkBlendMode::kDstIn, in onDrawContent() 89 SkBlendMode::kSrcOut, in onDrawContent() [all …]
|