Home
last modified time | relevance | path

Searched refs:SkBlendMode (Results 1 – 25 of 406) sorted by relevance

12345678910>>...17

/external/skia/src/gpu/
DBlend.cpp18 const char* BlendFuncName(SkBlendMode mode) { in BlendFuncName()
20 case SkBlendMode::kClear: return "blend_clear"; in BlendFuncName()
21 case SkBlendMode::kSrc: return "blend_src"; in BlendFuncName()
22 case SkBlendMode::kDst: return "blend_dst"; in BlendFuncName()
23 case SkBlendMode::kSrcOver: return "blend_src_over"; in BlendFuncName()
24 case SkBlendMode::kDstOver: return "blend_dst_over"; in BlendFuncName()
25 case SkBlendMode::kSrcIn: return "blend_src_in"; in BlendFuncName()
26 case SkBlendMode::kDstIn: return "blend_dst_in"; in BlendFuncName()
27 case SkBlendMode::kSrcOut: return "blend_src_out"; in BlendFuncName()
28 case SkBlendMode::kDstOut: return "blend_dst_out"; in BlendFuncName()
[all …]
/external/skia/modules/jetski/src/
DUtils.cpp36 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 …]
/external/skia/src/core/
DSkBlendMode.cpp13 bool SkBlendMode_ShouldPreScaleCoverage(SkBlendMode mode, bool rgb_coverage) { in SkBlendMode_ShouldPreScaleCoverage()
28 case SkBlendMode::kDst: // d --> no sa term, ok! in SkBlendMode_ShouldPreScaleCoverage()
29 case SkBlendMode::kDstOver: // d + s*inv(da) --> no sa term, ok! in SkBlendMode_ShouldPreScaleCoverage()
30 case SkBlendMode::kPlus: // clamp(s+d) --> no sa term, ok! in SkBlendMode_ShouldPreScaleCoverage()
33 case SkBlendMode::kDstOut: // d * inv(sa) in SkBlendMode_ShouldPreScaleCoverage()
34 case SkBlendMode::kSrcATop: // s*da + d*inv(sa) in SkBlendMode_ShouldPreScaleCoverage()
35 case SkBlendMode::kSrcOver: // s + d*inv(sa) in SkBlendMode_ShouldPreScaleCoverage()
36 case SkBlendMode::kXor: // s*inv(da) + d*inv(sa) in SkBlendMode_ShouldPreScaleCoverage()
45 bool SkBlendMode_SupportsCoverageAsAlpha(SkBlendMode mode) { in SkBlendMode_SupportsCoverageAsAlpha()
49 bool SkBlendMode_AsCoeff(SkBlendMode mode, SkBlendModeCoeff* src, SkBlendModeCoeff* dst) { in SkBlendMode_AsCoeff()
[all …]
DSkXfermode.cpp29 SkProcCoeffXfermode(SkBlendMode mode) : fMode(mode) {} in SkProcCoeffXfermode()
61 const SkBlendMode fMode;
66 const char* SkBlendMode_Name(SkBlendMode bm) { in SkBlendMode_Name()
68 case SkBlendMode::kClear: return "Clear"; in SkBlendMode_Name()
69 case SkBlendMode::kSrc: return "Src"; in SkBlendMode_Name()
70 case SkBlendMode::kDst: return "Dst"; in SkBlendMode_Name()
71 case SkBlendMode::kSrcOver: return "SrcOver"; in SkBlendMode_Name()
72 case SkBlendMode::kDstOver: return "DstOver"; in SkBlendMode_Name()
73 case SkBlendMode::kSrcIn: return "SrcIn"; in SkBlendMode_Name()
74 case SkBlendMode::kDstIn: return "DstIn"; in SkBlendMode_Name()
[all …]
DSkBlendModeBlender.cpp22 sk_sp<SkBlender> SkBlender::Mode(SkBlendMode mode) { in Mode()
30 RETURN_SINGLETON_BLENDER(SkBlendMode::kClear) in Mode()
31 RETURN_SINGLETON_BLENDER(SkBlendMode::kSrc) in Mode()
32 RETURN_SINGLETON_BLENDER(SkBlendMode::kDst) in Mode()
33 RETURN_SINGLETON_BLENDER(SkBlendMode::kSrcOver) in Mode()
34 RETURN_SINGLETON_BLENDER(SkBlendMode::kDstOver) in Mode()
35 RETURN_SINGLETON_BLENDER(SkBlendMode::kSrcIn) in Mode()
36 RETURN_SINGLETON_BLENDER(SkBlendMode::kDstIn) in Mode()
37 RETURN_SINGLETON_BLENDER(SkBlendMode::kSrcOut) in Mode()
38 RETURN_SINGLETON_BLENDER(SkBlendMode::kDstOut) in Mode()
[all …]
DSkModeColorFilter.cpp40 SkModeColorFilter(const SkColor4f& color, SkBlendMode mode);
63 bool onAsAColorMode(SkColor*, SkBlendMode*) const override;
69 SkBlendMode fMode;
73 SkBlendMode mode) in SkModeColorFilter()
77 bool SkModeColorFilter::onAsAColorMode(SkColor* color, SkBlendMode* mode) const { in onAsAColorMode()
89 case SkBlendMode::kDst: //!< [Da, Dc] in onIsAlphaUnchanged()
90 case SkBlendMode::kSrcATop: //!< [Da, Sc * Da + (1 - Sa) * Dc] in onIsAlphaUnchanged()
107 SkBlendMode mode = (SkBlendMode)buffer.readUInt(); in CreateProc()
113 SkBlendMode mode = (SkBlendMode)buffer.readUInt(); in CreateProc()
148 if (fMode == SkBlendMode::kDst) { in asFragmentProcessor()
[all …]
/external/skia/src/gpu/ganesh/effects/
DGrCustomXfermode.cpp23 bool GrCustomXfermode::IsSupportedMode(SkBlendMode mode) { in IsSupportedMode()
24 return (int)mode > (int)SkBlendMode::kLastCoeffMode && in IsSupportedMode()
25 (int)mode <= (int)SkBlendMode::kLastMode; in IsSupportedMode()
32 static constexpr skgpu::BlendEquation hw_blend_equation(SkBlendMode mode) { in hw_blend_equation()
33 constexpr int kEqOffset = ((int)skgpu::BlendEquation::kOverlay - (int)SkBlendMode::kOverlay); in hw_blend_equation()
34 static_assert((int)skgpu::BlendEquation::kOverlay == (int)SkBlendMode::kOverlay + kEqOffset); in hw_blend_equation()
35 static_assert((int)skgpu::BlendEquation::kDarken == (int)SkBlendMode::kDarken + kEqOffset); in hw_blend_equation()
36 static_assert((int)skgpu::BlendEquation::kLighten == (int)SkBlendMode::kLighten + kEqOffset); in hw_blend_equation()
37 …static_assert((int)skgpu::BlendEquation::kColorDodge == (int)SkBlendMode::kColorDodge + kEqOffset); in hw_blend_equation()
38 … static_assert((int)skgpu::BlendEquation::kColorBurn == (int)SkBlendMode::kColorBurn + kEqOffset); in hw_blend_equation()
[all …]
DGrBlendFragmentProcessor.cpp21 static inline bool does_cpu_blend_impl_match_gpu(SkBlendMode mode) { in does_cpu_blend_impl_match_gpu()
25 return mode <= SkBlendMode::kLastSeparableMode && mode != SkBlendMode::kSoftLight && in does_cpu_blend_impl_match_gpu()
26 mode != SkBlendMode::kColorBurn; in does_cpu_blend_impl_match_gpu()
35 SkBlendMode mode, in Make()
48 SkBlendMode mode, in BlendFragmentProcessor()
70 const GrFragmentProcessor* dst, SkBlendMode mode) { in OptFlags()
73 case SkBlendMode::kClear: in OptFlags()
78 case SkBlendMode::kSrc: in OptFlags()
84 case SkBlendMode::kDst: in OptFlags()
92 case SkBlendMode::kSrcIn: in OptFlags()
[all …]
DGrPorterDuffXferProcessor.cpp274 static constexpr BlendFormula gBlendTable[2][2][(int)SkBlendMode::kLastCoeffMode + 1] = {
354 static constexpr BlendFormula gLCDBlendTable[(int)SkBlendMode::kLastCoeffMode + 1] = {
386 SkBlendMode xfermode) { in get_blend_formula()
387 SkASSERT((unsigned)xfermode <= (unsigned)SkBlendMode::kLastCoeffMode); in get_blend_formula()
391 static BlendFormula get_lcd_blend_formula(SkBlendMode xfermode) { in get_lcd_blend_formula()
392 SkASSERT((unsigned)xfermode <= (unsigned)SkBlendMode::kLastCoeffMode); in get_lcd_blend_formula()
504 ShaderPDXferProcessor(SkBlendMode xfermode, GrProcessorAnalysisCoverage coverage) in ShaderPDXferProcessor()
521 const SkBlendMode fXfermode;
577 static sk_sp<const GrXferProcessor> Make(SkBlendMode mode,
616 sk_sp<const GrXferProcessor> PDLCDXferProcessor::Make(SkBlendMode mode, in Make()
[all …]
/external/skia/docs/examples/
Dskpaint_xfer.cpp11 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 …]
DBlendModes.cpp16 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 …]
/external/skia/bench/
DBlendmodeBench.cpp33 XfermodeBench(SkBlendMode mode, Type t) : fBlendMode(mode) { in XfermodeBench()
98 SkBlendMode fBlendMode;
113 BENCH(SkBlendMode::kClear)
114 BENCH(SkBlendMode::kSrc)
115 BENCH(SkBlendMode::kDst)
116 BENCH(SkBlendMode::kSrcOver)
117 BENCH(SkBlendMode::kDstOver)
118 BENCH(SkBlendMode::kSrcIn)
119 BENCH(SkBlendMode::kDstIn)
120 BENCH(SkBlendMode::kSrcOut)
[all …]
/external/skia/gm/
Dlcdblendmodes.cpp88 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 …]
Dcoloremoji_blendmodes.cpp79 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 …]
Dxfermodeimagefilter.cpp58 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 …]
Ddrawatlascolor.cpp40 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 …]
Dandroidblendmodes.cpp66 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()
Dvertices.cpp63 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 …]
Dxfermodes.cpp51 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 …]
Dmodecolorfilters.cpp96 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 …]
Dhairmodes.cpp25 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 …]
Daarectmodes.cpp73 constexpr SkBlendMode gModes[] = {
74 SkBlendMode::kClear,
75 SkBlendMode::kSrc,
76 SkBlendMode::kDst,
77 SkBlendMode::kSrcOver,
78 SkBlendMode::kDstOver,
79 SkBlendMode::kSrcIn,
80 SkBlendMode::kDstIn,
81 SkBlendMode::kSrcOut,
82 SkBlendMode::kDstOut,
[all …]
/external/skia/src/gpu/ganesh/glsl/
DGrGLSLBlend.cpp21 SkBlendMode mode) { in BlendExpression()
36 int BlendKey(SkBlendMode mode) { in BlendKey()
38 case SkBlendMode::kSrcOver: in BlendKey()
39 case SkBlendMode::kDstOver: in BlendKey()
40 case SkBlendMode::kSrcIn: in BlendKey()
41 case SkBlendMode::kDstIn: in BlendKey()
42 case SkBlendMode::kSrcOut: in BlendKey()
43 case SkBlendMode::kDstOut: in BlendKey()
44 case SkBlendMode::kSrcATop: in BlendKey()
45 case SkBlendMode::kDstATop: in BlendKey()
[all …]
/external/skia/modules/skottie/src/
DBlendModes.cpp41 static constexpr SkBlendMode kBlendModeMap[] = { in get_blender()
42 SkBlendMode::kSrcOver, // 0:'normal' in get_blender()
43 SkBlendMode::kMultiply, // 1:'multiply' in get_blender()
44 SkBlendMode::kScreen, // 2:'screen' in get_blender()
45 SkBlendMode::kOverlay, // 3:'overlay in get_blender()
46 SkBlendMode::kDarken, // 4:'darken' in get_blender()
47 SkBlendMode::kLighten, // 5:'lighten' in get_blender()
48 SkBlendMode::kColorDodge, // 6:'color-dodge' in get_blender()
49 SkBlendMode::kColorBurn, // 7:'color-burn' in get_blender()
50 SkBlendMode::kHardLight, // 8:'hard-light' in get_blender()
[all …]
/external/skia/tests/
DColorFilterTest.cpp58 #define ILLEGAL_MODE ((SkBlendMode)-1)
70 auto cf = SkColorFilters::Blend(color, (SkBlendMode)mode); in DEF_TEST()
73 if (SkBlendMode::kDst == (SkBlendMode)mode && nullptr == cf) { in DEF_TEST()
80 SkBlendMode m = ILLEGAL_MODE; in DEF_TEST()
83 SkBlendMode expectedMode = (SkBlendMode)mode; in DEF_TEST()
87 REPORTER_ASSERT(reporter, cf->asAColorMode(&c, (SkBlendMode*)&m)); in DEF_TEST()
89 if (SkBlendMode::kClear == (SkBlendMode)mode) { in DEF_TEST()
94 expectedMode = SkBlendMode::kSrc; in DEF_TEST()
108 SkBlendMode m2 = ILLEGAL_MODE; in DEF_TEST()
109 REPORTER_ASSERT(reporter, cf2->asAColorMode(&c2, (SkBlendMode*)&m2)); in DEF_TEST()
[all …]

12345678910>>...17