Home
last modified time | relevance | path

Searched refs:fsCodeAppend (Results 1 – 25 of 30) sorted by relevance

12

/external/skia/src/gpu/effects/
DGrDistanceFieldTextureEffect.cpp66 builder->fsCodeAppend("\tvec4 texColor = "); in emitCode()
70 builder->fsCodeAppend(";\n"); in emitCode()
71 builder->fsCodeAppend("\tfloat distance = " in emitCode()
80 builder->fsCodeAppend("\tfloat afwidth;\n"); in emitCode()
83 builder->fsCodeAppend("\tafwidth = " SK_DistanceFieldAAFactor "*dFdx(st.x);\n"); in emitCode()
85 builder->fsCodeAppend("\tvec2 Jdx = dFdx(st);\n"); in emitCode()
86 builder->fsCodeAppend("\tvec2 Jdy = dFdy(st);\n"); in emitCode()
88 builder->fsCodeAppend("\tvec2 uv_grad;\n"); in emitCode()
91 builder->fsCodeAppend("\tfloat uv_len2 = dot(uv, uv);\n"); in emitCode()
92 builder->fsCodeAppend("\tif (uv_len2 < 0.0001) {\n"); in emitCode()
[all …]
DGrBezierEffect.cpp59 builder->fsCodeAppend("\t\tfloat edgeAlpha;\n"); in emitCode()
73 builder->fsCodeAppend("\t\tvec2 gF = vec2(dfdx, dfdy);\n"); in emitCode()
74 builder->fsCodeAppend("\t\tfloat gFM = sqrt(dot(gF, gF));\n"); in emitCode()
77 builder->fsCodeAppend("\t\tfunc = abs(func);\n"); in emitCode()
78 builder->fsCodeAppend("\t\tedgeAlpha = func / gFM;\n"); in emitCode()
79 builder->fsCodeAppend("\t\tedgeAlpha = max(1.0 - edgeAlpha, 0.0);\n"); in emitCode()
95 builder->fsCodeAppend("\t\tvec2 gF = vec2(dfdx, dfdy);\n"); in emitCode()
96 builder->fsCodeAppend("\t\tfloat gFM = sqrt(dot(gF, gF));\n"); in emitCode()
99 builder->fsCodeAppend("\t\tedgeAlpha = func / gFM;\n"); in emitCode()
100 builder->fsCodeAppend("\t\tedgeAlpha = clamp(1.0 - edgeAlpha, 0.0, 1.0);\n"); in emitCode()
[all …]
DGrTextureDomain.cpp55 builder->fsCodeAppend(";\n"); in sampleTexture()
76 builder->fsCodeAppend(";\n"); in sampleTexture()
90 builder->fsCodeAppend("\tvec4 outside = vec4(0.0, 0.0, 0.0, 0.0);\n"); in sampleTexture()
91 builder->fsCodeAppend("\tvec4 inside = "); in sampleTexture()
93 builder->fsCodeAppend(";\n"); in sampleTexture()
99 builder->fsCodeAppend("\tfloat blend = step(1.0, max(x, y));\n"); in sampleTexture()
102 builder->fsCodeAppend("\tbvec4 outside;\n"); in sampleTexture()
109 builder->fsCodeAppend(";\n"); in sampleTexture()
DGrConvexPolyEffect.cpp134 builder->fsCodeAppend("\t\tfloat xSub, ySub;\n"); in emitCode()
151 builder->fsCodeAppend("\t\talpha = 1.0 - alpha;\n"); in emitCode()
221 builder->fsCodeAppend("\t\tfloat alpha = 1.0;\n"); in emitCode()
222 builder->fsCodeAppend("\t\tfloat edge;\n"); in emitCode()
228 builder->fsCodeAppend("\t\tedge = clamp(edge, 0.0, 1.0);\n"); in emitCode()
230 builder->fsCodeAppend("\t\tedge = edge >= 0.5 ? 1.0 : 0.0;\n"); in emitCode()
232 builder->fsCodeAppend("\t\talpha *= edge;\n"); in emitCode()
237 builder->fsCodeAppend("\t\tif (-1.0 == alpha) {\n\t\t\tdiscard;\n\t\t}\n"); in emitCode()
241 builder->fsCodeAppend("\talpha = 1.0 - alpha;\n"); in emitCode()
DGrOvalEffect.cpp157 builder->fsCodeAppend("\t\td = clamp(d, 0.0, 1.0);\n"); in emitCode()
159 builder->fsCodeAppend("\t\td = d > 0.5 ? 1.0 : 0.0;\n"); in emitCode()
324 builder->fsCodeAppend("\t\tfloat implicit = dot(Z, d) - 1.0;\n"); in emitCode()
328 builder->fsCodeAppend("\t\tgrad_dot = max(grad_dot, 1.0e-4);\n"); in emitCode()
333 builder->fsCodeAppend("\t\tfloat alpha = clamp(0.5 - approx_dist, 0.0, 1.0);\n"); in emitCode()
336 builder->fsCodeAppend("\t\tfloat alpha = clamp(0.5 + approx_dist, 0.0, 1.0);\n"); in emitCode()
339 builder->fsCodeAppend("\t\tfloat alpha = approx_dist > 0.0 ? 0.0 : 1.0;\n"); in emitCode()
342 builder->fsCodeAppend("\t\tfloat alpha = approx_dist > 0.0 ? 1.0 : 0.0;\n"); in emitCode()
DGrRRectEffect.cpp204 builder->fsCodeAppend("\t\tvec2 dxy = max(max(dxy0, dxy1), 0.0);\n"); in emitCode()
251 builder->fsCodeAppend("\t\tvec2 dxy = max(vec2(dxy0.x, max(dxy0.y, dy1)), 0.0);\n"); in emitCode()
260 builder->fsCodeAppend("\t\tvec2 dxy = max(vec2(max(dxy0.x, dx1), dxy0.y), 0.0);\n"); in emitCode()
269 builder->fsCodeAppend("\t\tvec2 dxy = max(vec2(dxy1.x, max(dy0, dxy1.y)), 0.0);\n"); in emitCode()
278 builder->fsCodeAppend("\t\tvec2 dxy = max(vec2(max(dx0, dxy1.x), dxy1.y), 0.0);\n"); in emitCode()
287 builder->fsCodeAppend("\t\talpha = 1.0 - alpha;\n"); in emitCode()
549 builder->fsCodeAppend("\t\tvec2 dxy = max(max(dxy0, dxy1), 0.0);\n"); in emitCode()
560 builder->fsCodeAppend("\t\tvec2 dxy = max(max(dxy0, dxy1), 0.0);\n"); in emitCode()
572 builder->fsCodeAppend("\t\tfloat implicit = dot(Z, dxy) - 1.0;\n"); in emitCode()
576 builder->fsCodeAppend("\t\tgrad_dot = max(grad_dot, 1.0e-4);\n"); in emitCode()
[all …]
DGrBicubicEffect.cpp89 builder->fsCodeAppend("\tvec2 f = fract(coord);\n"); in emitCode()
91 builder->fsCodeAppend("\tvec4 rowColors[4];\n"); in emitCode()
DGrSimpleTextureEffect.cpp33 builder->fsCodeAppend(";\n"); in emitCode()
DGrConfigConversionEffect.cpp34 builder->fsCodeAppend(";\n"); in emitCode()
70 builder->fsCodeAppend(modulate.c_str()); in emitCode()
DGrCustomCoordsTextureEffect.cpp45 builder->fsCodeAppend(";\n"); in emitCode()
DGrConvolutionEffect.cpp102 builder->fsCodeAppend(modulate.c_str()); in emitCode()
/external/skia/src/effects/
DSkMagnifierImageFilter.cpp147 builder->fsCodeAppend("\t\tvec2 delta = min(coord, vec2(1.0, 1.0) - coord);\n"); in emitCode()
151 builder->fsCodeAppend("\t\tfloat weight = 0.0;\n"); in emitCode()
152 builder->fsCodeAppend("\t\tif (delta.s < 2.0 && delta.t < 2.0) {\n"); in emitCode()
153 builder->fsCodeAppend("\t\t\tdelta = vec2(2.0, 2.0) - delta;\n"); in emitCode()
154 builder->fsCodeAppend("\t\t\tfloat dist = length(delta);\n"); in emitCode()
155 builder->fsCodeAppend("\t\t\tdist = max(2.0 - dist, 0.0);\n"); in emitCode()
156 builder->fsCodeAppend("\t\t\tweight = min(dist * dist, 1.0);\n"); in emitCode()
157 builder->fsCodeAppend("\t\t} else {\n"); in emitCode()
158 builder->fsCodeAppend("\t\t\tvec2 delta_squared = delta * delta;\n"); in emitCode()
159 builder->fsCodeAppend("\t\t\tweight = min(min(delta_squared.x, delta_squared.y), 1.0);\n"); in emitCode()
[all …]
DSkAlphaThresholdFilter.cpp157 builder->fsCodeAppend("\t\tvec4 input_color = "); in emitCode()
159 builder->fsCodeAppend(";\n"); in emitCode()
160 builder->fsCodeAppend("\t\tvec4 mask_color = "); in emitCode()
162 builder->fsCodeAppend(";\n"); in emitCode()
168 builder->fsCodeAppend("\t\tfloat mask = mask_color.a;\n"); in emitCode()
170 builder->fsCodeAppend("vec4 color = input_color;\n"); in emitCode()
171 builder->fsCodeAppend("\t\tif (mask < 0.5) {\n" in emitCode()
DSkDisplacementMapEffect.cpp536 builder->fsCodeAppend(";\n"); in emitCode()
547 builder->fsCodeAppend("r"); in emitCode()
550 builder->fsCodeAppend("g"); in emitCode()
553 builder->fsCodeAppend("b"); in emitCode()
556 builder->fsCodeAppend("a"); in emitCode()
565 builder->fsCodeAppend("r"); in emitCode()
568 builder->fsCodeAppend("g"); in emitCode()
571 builder->fsCodeAppend("b"); in emitCode()
574 builder->fsCodeAppend("a"); in emitCode()
580 builder->fsCodeAppend("-vec2(0.5));\t\t"); in emitCode()
[all …]
DSkMatrixConvolutionImageFilter.cpp499 builder->fsCodeAppend("\t\tvec4 sum = vec4(0, 0, 0, 0);\n"); in emitCode()
505 builder->fsCodeAppend("\t\t\t\tvec4 c = "); in emitCode()
507 builder->fsCodeAppend(";\n"); in emitCode()
509 builder->fsCodeAppend("\t\t\t\tc.rgb /= c.a;\n"); in emitCode()
511 builder->fsCodeAppend("\t\t\t\tsum += c * k;\n"); in emitCode()
512 builder->fsCodeAppend("\t\t\t}\n"); in emitCode()
513 builder->fsCodeAppend("\t\t}\n"); in emitCode()
519 builder->fsCodeAppend("\t\tvec4 c = "); in emitCode()
521 builder->fsCodeAppend(";\n"); in emitCode()
DSkTableColorFilter.cpp319 builder->fsCodeAppend(";\n"); in emitCode()
323 builder->fsCodeAppend(";\n"); in emitCode()
327 builder->fsCodeAppend(";\n"); in emitCode()
331 builder->fsCodeAppend(";\n"); in emitCode()
DSkLightingImageFilter.cpp1330 builder->fsCodeAppend("\t\tfloat m[9];\n"); in emitCode()
1342 builder->fsCodeAppend(".a;\n"); in emitCode()
1345 builder->fsCodeAppend("\t\tvec3 surfaceToLight = "); in emitCode()
1349 builder->fsCodeAppend(";\n"); in emitCode()
1353 builder->fsCodeAppend(");\n"); in emitCode()
1356 builder->fsCodeAppend(modulate.c_str()); in emitCode()
1506 builder->fsCodeAppend(builder->getUniformCStr(this->lightColorUni())); in emitLightColor()
1528 builder->fsCodeAppend(dir); in emitSurfaceToLight()
DSkMorphologyImageFilter.cpp379 builder->fsCodeAppend(");\n"); in emitCode()
381 builder->fsCodeAppend("\t\t}\n"); in emitCode()
384 builder->fsCodeAppend(modulate.c_str()); in emitCode()
/external/skia/src/gpu/
DGrOvalRenderer.cpp116 builder->fsCodeAppend("\tedgeAlpha *= innerAlpha;\n"); in emitCode()
232 builder->fsCodeAppend("\tfloat test = dot(scaledOffset, scaledOffset) - 1.0;\n"); in emitCode()
234 builder->fsCodeAppend("\tfloat grad_dot = dot(grad, grad);\n"); in emitCode()
236 builder->fsCodeAppend("\tgrad_dot = max(grad_dot, 1.0e-4);\n"); in emitCode()
237 builder->fsCodeAppend("\tfloat invlen = inversesqrt(grad_dot);\n"); in emitCode()
238 builder->fsCodeAppend("\tfloat edgeAlpha = clamp(0.5-test*invlen, 0.0, 1.0);\n"); in emitCode()
243 builder->fsCodeAppend("\ttest = dot(scaledOffset, scaledOffset) - 1.0;\n"); in emitCode()
245 builder->fsCodeAppend("\tinvlen = inversesqrt(dot(grad, grad));\n"); in emitCode()
246 builder->fsCodeAppend("\tedgeAlpha *= clamp(0.5+test*invlen, 0.0, 1.0);\n"); in emitCode()
373 builder->fsCodeAppend("\tfloat test = dot(scaledOffset, scaledOffset) - 1.0;\n"); in emitCode()
[all …]
DGrAARectRenderer.cpp65 builder->fsCodeAppend("\tfloat outset = 0.5;\n"); in emitCode()
68 builder->fsCodeAppend("\tfloat spanW = insetW + outset;\n"); in emitCode()
69 builder->fsCodeAppend("\tfloat spanH = insetH + outset;\n"); in emitCode()
73 builder->fsCodeAppend("\tfloat scaleW = min(1.0, 2.0*insetW/spanW);\n"); in emitCode()
74 builder->fsCodeAppend("\tfloat scaleH = min(1.0, 2.0*insetH/spanH);\n"); in emitCode()
191 builder->fsCodeAppend("\tfloat outset = 0.5;\n"); in emitCode()
194 builder->fsCodeAppend("\tfloat spanW = insetW + outset;\n"); in emitCode()
195 builder->fsCodeAppend("\tfloat spanH = insetH + outset;\n"); in emitCode()
199 builder->fsCodeAppend("\tfloat scaleW = min(1.0, 2.0*insetW/spanW);\n"); in emitCode()
200 builder->fsCodeAppend("\tfloat scaleH = min(1.0, 2.0*insetH/spanH);\n"); in emitCode()
/external/skia/src/gpu/gl/
DGrGLShaderBuilder.h128 void fsCodeAppend(const char* str) { fFSCode.append(str); } in fsCodeAppend() function
233 fBuilder->fsCodeAppend("\t{\n"); in FSBlock()
237 fBuilder->fsCodeAppend("\t}\n"); in ~FSBlock()
DGrGLProgramEffects.cpp284 builder->fsCodeAppend(openBrace.c_str()); in emitEffect()
294 builder->fsCodeAppend("\t}\n"); in emitEffect()
493 builder->fsCodeAppend(openBrace.c_str()); in emitEffect()
498 builder->fsCodeAppend("\t}\n"); in emitEffect()
/external/skia/src/effects/gradients/
DSkTwoPointConicalGradient_gpu.cpp270 builder->fsCodeAppend("\t"); in emitCode()
272 builder->fsCodeAppend("\t}\n"); in emitCode()
538 builder->fsCodeAppend("\t\t"); in emitCode()
540 builder->fsCodeAppend("\t}\n"); in emitCode()
1239 builder->fsCodeAppend("\t\t"); in emitCode()
1241 builder->fsCodeAppend("\t}\n"); in emitCode()
DSkGradientShader.cpp983 builder->fsCodeAppend("\tcolorTemp.rgb *= colorTemp.a;\n"); in emitColor()
996 builder->fsCodeAppend("\tfloat minAbs = abs(oneMinus2t);\n"); in emitColor()
997 builder->fsCodeAppend("\tminAbs = minAbs > 1.0 ? 1.0 : minAbs;\n"); in emitColor()
1007 builder->fsCodeAppend("\tcolorTemp.rgb *= colorTemp.a;\n"); in emitColor()
1020 builder->fsCodeAppend(";\n"); in emitColor()
/external/skia/src/core/
DSkXfermode.cpp989 builder->fsCodeAppend("\t\t} else {\n"); in HardLight()
992 builder->fsCodeAppend("\t\t}\n"); in HardLight()
1007 builder->fsCodeAppend("\t\t} else {\n"); in ColorDodgeComponent()
1009 builder->fsCodeAppend("\t\t\tif (0.0 == d) {\n"); in ColorDodgeComponent()
1013 builder->fsCodeAppend("\t\t\t} else {\n"); in ColorDodgeComponent()
1018 builder->fsCodeAppend("\t\t\t}\n"); in ColorDodgeComponent()
1019 builder->fsCodeAppend("\t\t}\n"); in ColorDodgeComponent()
1035 builder->fsCodeAppend("\t\t} else {\n"); in ColorBurnComponent()
1040 builder->fsCodeAppend("\t\t}\n"); in ColorBurnComponent()

12