Home
last modified time | relevance | path

Searched refs:codeAppendf (Results 1 – 25 of 49) sorted by relevance

12

/external/skia/src/gpu/effects/
DGrCustomXfermode.cpp61 fsBuilder->codeAppendf("if (2.0 * %s.%c <= %s.a) {", src, component, src); in hard_light()
62 fsBuilder->codeAppendf("%s.%c = 2.0 * %s.%c * %s.%c;", in hard_light()
65 fsBuilder->codeAppendf("%s.%c = %s.a * %s.a - 2.0 * (%s.a - %s.%c) * (%s.a - %s.%c);", in hard_light()
70 fsBuilder->codeAppendf("%s.rgb += %s.rgb * (1.0 - %s.a) + %s.rgb * (1.0 - %s.a);", in hard_light()
80 fsBuilder->codeAppendf("if (0.0 == %s.%c) {", dst, component); in color_dodge_component()
81 fsBuilder->codeAppendf("%s.%c = %s.%c * (1.0 - %s.a);", in color_dodge_component()
84 fsBuilder->codeAppendf("float d = %s.a - %s.%c;", src, src, component); in color_dodge_component()
86 fsBuilder->codeAppendf("%s.%c = %s.a * %s.a + %s.%c * (1.0 - %s.a) + %s.%c * (1.0 - %s.a);", in color_dodge_component()
90 fsBuilder->codeAppendf("d = min(%s.a, %s.%c * %s.a / d);", in color_dodge_component()
92 fsBuilder->codeAppendf("%s.%c = d * %s.a + %s.%c * (1.0 - %s.a) + %s.%c * (1.0 - %s.a);", in color_dodge_component()
[all …]
DGrBezierEffect.cpp88 vsBuilder->codeAppendf("%s = %s;", v.vsOut(), gp.inConicCoeffs()->fName); in onEmitCode()
108 fsBuilder->codeAppendf("vec3 dklmdx = dFdx(%s.xyz);", v.fsIn()); in onEmitCode()
109 fsBuilder->codeAppendf("vec3 dklmdy = dFdy(%s.xyz);", v.fsIn()); in onEmitCode()
110 fsBuilder->codeAppendf("float dfdx =" in onEmitCode()
113 fsBuilder->codeAppendf("float dfdy =" in onEmitCode()
118 fsBuilder->codeAppendf("float func = %s.x*%s.x - %s.y*%s.z;", v.fsIn(), v.fsIn(), in onEmitCode()
130 fsBuilder->codeAppendf("vec3 dklmdx = dFdx(%s.xyz);", v.fsIn()); in onEmitCode()
131 fsBuilder->codeAppendf("vec3 dklmdy = dFdy(%s.xyz);", v.fsIn()); in onEmitCode()
132 fsBuilder->codeAppendf("float dfdx =" in onEmitCode()
135 fsBuilder->codeAppendf("float dfdy =" in onEmitCode()
[all …]
DGrRRectEffect.cpp198 fsBuilder->codeAppendf("\t\tvec2 dxy0 = %s.xy - %s.xy;\n", rectName, fragmentPos); in emitCode()
199 fsBuilder->codeAppendf("\t\tvec2 dxy1 = %s.xy - %s.zw;\n", fragmentPos, rectName); in emitCode()
201 fsBuilder->codeAppendf("\t\tfloat alpha = clamp(%s - length(dxy), 0.0, 1.0);\n", in emitCode()
205 fsBuilder->codeAppendf("\t\tvec2 dxy = max(%s.xy - %s.xy, 0.0);\n", in emitCode()
207 fsBuilder->codeAppendf("\t\tfloat rightAlpha = clamp(%s.z - %s.x, 0.0, 1.0);\n", in emitCode()
209 fsBuilder->codeAppendf("\t\tfloat bottomAlpha = clamp(%s.w - %s.y, 0.0, 1.0);\n", in emitCode()
211 …fsBuilder->codeAppendf("\t\tfloat alpha = bottomAlpha * rightAlpha * clamp(%s - length(dxy), 0.0, … in emitCode()
215 fsBuilder->codeAppendf("\t\tvec2 dxy = max(vec2(%s.x - %s.z, %s.y - %s.y), 0.0);\n", in emitCode()
217 fsBuilder->codeAppendf("\t\tfloat leftAlpha = clamp(%s.x - %s.x, 0.0, 1.0);\n", in emitCode()
219 fsBuilder->codeAppendf("\t\tfloat bottomAlpha = clamp(%s.w - %s.y, 0.0, 1.0);\n", in emitCode()
[all …]
DGrConvexPolyEffect.cpp131 fsBuilder->codeAppendf("\t\txSub = min(%s.x - %s.x, 0.0);\n", fragmentPos, rectName); in emitCode()
132 fsBuilder->codeAppendf("\t\txSub += min(%s.z - %s.x, 0.0);\n", rectName, fragmentPos); in emitCode()
133 fsBuilder->codeAppendf("\t\tySub = min(%s.y - %s.y, 0.0);\n", fragmentPos, rectName); in emitCode()
134 fsBuilder->codeAppendf("\t\tySub += min(%s.w - %s.y, 0.0);\n", rectName, fragmentPos); in emitCode()
137 … fsBuilder->codeAppendf("\t\tfloat alpha = (1.0 + max(xSub, -1.0)) * (1.0 + max(ySub, -1.0));\n"); in emitCode()
139 fsBuilder->codeAppendf("\t\tfloat alpha = 1.0;\n"); in emitCode()
140 … fsBuilder->codeAppendf("\t\talpha *= (%s.x - %s.x) > -0.5 ? 1.0 : 0.0;\n", fragmentPos, rectName); in emitCode()
141 … fsBuilder->codeAppendf("\t\talpha *= (%s.z - %s.x) > -0.5 ? 1.0 : 0.0;\n", rectName, fragmentPos); in emitCode()
142 … fsBuilder->codeAppendf("\t\talpha *= (%s.y - %s.y) > -0.5 ? 1.0 : 0.0;\n", fragmentPos, rectName); in emitCode()
143 … fsBuilder->codeAppendf("\t\talpha *= (%s.w - %s.y) > -0.5 ? 1.0 : 0.0;\n", rectName, fragmentPos); in emitCode()
[all …]
DGrPorterDuffXferProcessor.cpp152 fsBuilder->codeAppendf("%s", colorName); in append_porterduff_term()
157 fsBuilder->codeAppendf(" * %s", srcColorName); in append_porterduff_term()
160 fsBuilder->codeAppendf(" * (vec4(1.0) - %s)", srcColorName); in append_porterduff_term()
163 fsBuilder->codeAppendf(" * %s", dstColorName); in append_porterduff_term()
166 fsBuilder->codeAppendf(" * (vec4(1.0) - %s)", dstColorName); in append_porterduff_term()
169 fsBuilder->codeAppendf(" * %s.a", srcColorName); in append_porterduff_term()
172 fsBuilder->codeAppendf(" * (1.0 - %s.a)", srcColorName); in append_porterduff_term()
175 fsBuilder->codeAppendf(" * %s.a", dstColorName); in append_porterduff_term()
178 fsBuilder->codeAppendf(" * (1.0 - %s.a)", dstColorName); in append_porterduff_term()
214 fsBuilder->codeAppendf("%s = %s;", args.fOutputSecondary, in onEmitCode()
[all …]
DGrTextureDomain.cpp67 builder->codeAppendf("\t%s = ", outColor); in sampleTexture()
78 builder->codeAppendf("\t%s = ", outColor); in sampleTexture()
101 builder->codeAppendf("\tfloat x = (%s).x;\n", inCoords.c_str()); in sampleTexture()
102 builder->codeAppendf("\tfloat y = (%s).y;\n", inCoords.c_str()); in sampleTexture()
104 builder->codeAppendf("\tx = abs(2.0*(x - %s.x)/(%s.z - %s.x) - 1.0);\n", in sampleTexture()
106 builder->codeAppendf("\ty = abs(2.0*(y - %s.y)/(%s.w - %s.y) - 1.0);\n", in sampleTexture()
109 builder->codeAppendf("\t%s = mix(inside, outside, blend);\n", outColor); in sampleTexture()
112 builder->codeAppendf("\toutside.xy = lessThan(%s, %s.xy);\n", inCoords.c_str(), in sampleTexture()
114 builder->codeAppendf("\toutside.zw = greaterThan(%s, %s.zw);\n", inCoords.c_str(), in sampleTexture()
116 builder->codeAppendf("\t%s = any(outside) ? vec4(0.0, 0.0, 0.0, 0.0) : ", in sampleTexture()
[all …]
DGrDistanceFieldGeoProc.cpp79 vsBuilder->codeAppendf("%s = %s;", st.vsOut(), dfTexEffect.inTextureCoords()->fName); in onEmitCode()
84 vsBuilder->codeAppendf("%s = vec2(" GR_FONT_ATLAS_A8_RECIP_WIDTH ", " in onEmitCode()
91 fsBuilder->codeAppendf("vec2 uv = %s;\n", uv.fsIn()); in onEmitCode()
102 fsBuilder->codeAppendf("distance -= %s;", distanceAdjustUniName); in onEmitCode()
113 fsBuilder->codeAppendf("afwidth = abs(" SK_DistanceFieldAAFactor "*dFdy(%s.y));", in onEmitCode()
129 fsBuilder->codeAppendf("vec2 Jdx = dFdx(%s);", st.fsIn()); in onEmitCode()
130 fsBuilder->codeAppendf("vec2 Jdy = dFdy(%s);", st.fsIn()); in onEmitCode()
139 fsBuilder->codeAppendf("%s = vec4(val);", args.fOutputCoverage); in onEmitCode()
306 vsBuilder->codeAppendf("%s = %s;", v.vsOut(), dfTexEffect.inTextureCoords()->fName); in onEmitCode()
323 fsBuilder->codeAppendf("vec2 uv = %s;", v.fsIn()); in onEmitCode()
[all …]
DGrConfigConversionEffect.cpp38 fsBuilder->codeAppendf("%s;", tmpDecl.c_str()); in emitCode()
40 fsBuilder->codeAppendf("%s = ", tmpVar.c_str()); in emitCode()
46 fsBuilder->codeAppendf("%s = %s.bgra;", outputColor, tmpVar.c_str()); in emitCode()
51 fsBuilder->codeAppendf( in emitCode()
60 fsBuilder->codeAppendf( in emitCode()
65 fsBuilder->codeAppendf( in emitCode()
70 fsBuilder->codeAppendf( in emitCode()
78 fsBuilder->codeAppendf("%s = %s;", outputColor, tmpVar.c_str()); in emitCode()
DGrDashingEffect.cpp868 vsBuilder->codeAppendf("%s = %s;", dashParams.vsOut(), dce.inDashParams()->fName); in onEmitCode()
873 vsBuilder->codeAppendf("%s = %s;", circleParams.vsOut(), dce.inCircleParams()->fName); in onEmitCode()
887 fsBuilder->codeAppendf("float xShifted = %s.x - floor(%s.x / %s.z) * %s.z;", in onEmitCode()
890 fsBuilder->codeAppendf("vec2 fragPosShifted = vec2(xShifted, %s.y);", dashParams.fsIn()); in onEmitCode()
891 fsBuilder->codeAppendf("vec2 center = vec2(%s.y, 0.0);", circleParams.fsIn()); in onEmitCode()
894 fsBuilder->codeAppendf("float diff = dist - %s.x;", circleParams.fsIn()); in onEmitCode()
898 fsBuilder->codeAppendf("float alpha = 1.0;"); in onEmitCode()
899 fsBuilder->codeAppendf("alpha *= dist < %s.x + 0.5 ? 1.0 : 0.0;", circleParams.fsIn()); in onEmitCode()
901 fsBuilder->codeAppendf("%s = vec4(alpha);", args.fOutputCoverage); in onEmitCode()
1090 vsBuilder->codeAppendf("%s = %s;", inDashParams.vsOut(), de.inDashParams()->fName); in onEmitCode()
[all …]
DGrOvalEffect.cpp147 fsBuilder->codeAppendf("\t\tfloat d = (length((%s.xy - %s.xy) * %s.w) - 1.0) * %s.z;\n", in emitCode()
150 fsBuilder->codeAppendf("\t\tfloat d = (1.0 - length((%s.xy - %s.xy) * %s.w)) * %s.z;\n", in emitCode()
159 fsBuilder->codeAppendf("\t\t%s = %s;\n", outputColor, in emitCode()
324 fsBuilder->codeAppendf("\t\tvec2 d = %s.xy - %s.xy;\n", fragmentPos, ellipseName); in emitCode()
325 fsBuilder->codeAppendf("\t\tvec2 Z = d * %s.zw;\n", ellipseName); in emitCode()
329 fsBuilder->codeAppendf("\t\tfloat grad_dot = 4.0 * dot(Z, Z);\n"); in emitCode()
332 fsBuilder->codeAppendf("\t\tfloat approx_dist = implicit * inversesqrt(grad_dot);\n"); in emitCode()
351 fsBuilder->codeAppendf("\t\t%s = %s;\n", outputColor, in emitCode()
DGrConvolutionEffect.cpp75 fsBuilder->codeAppendf("\t\t%s = vec4(0, 0, 0, 0);\n", outputColor); in emitCode()
81 fsBuilder->codeAppendf("\t\tvec2 coord = %s - %d.0 * %s;\n", coords2D.c_str(), fRadius, imgInc); in emitCode()
89 fsBuilder->codeAppendf("\t\t%s += ", outputColor); in emitCode()
94 fsBuilder->codeAppendf(" * float(coord.%s >= %s.x && coord.%s <= %s.y)", in emitCode()
97 fsBuilder->codeAppendf(" * %s;\n", kernelIndex.c_str()); in emitCode()
98 fsBuilder->codeAppendf("\t\tcoord += %s;\n", imgInc); in emitCode()
DGrBitmapTextGeoProc.cpp43 vsBuilder->codeAppendf("%s = vec2(" GR_FONT_ATLAS_A8_RECIP_WIDTH ", " in onEmitCode()
47 vsBuilder->codeAppendf("%s = vec2(" GR_FONT_ATLAS_RECIP_WIDTH ", " in onEmitCode()
65 fsBuilder->codeAppendf("%s = ", args.fOutputColor); in onEmitCode()
71 fsBuilder->codeAppendf("%s = vec4(1);", args.fOutputCoverage); in onEmitCode()
73 fsBuilder->codeAppendf("%s = ", args.fOutputCoverage); in onEmitCode()
DGrMatrixConvolutionEffect.cpp80 fsBuilder->codeAppendf("vec2 coord = %s - %s * %s;", coords2D.c_str(), kernelOffset, in emitCode()
87 fsBuilder->codeAppendf("float k = %s[%d * %d + %d];", kernel, y, kWidth, x); in emitCode()
99 fsBuilder->codeAppendf("%s = sum * %s + %s;", outputColor, gain, bias); in emitCode()
100 fsBuilder->codeAppendf("%s.rgb = clamp(%s.rgb, 0.0, %s.a);", in emitCode()
104 fsBuilder->codeAppendf("%s.a = c.a;", outputColor); in emitCode()
105 fsBuilder->codeAppendf("%s.rgb = sum.rgb * %s + %s;", outputColor, gain, bias); in emitCode()
106 fsBuilder->codeAppendf("%s.rgb *= %s.a;", outputColor, outputColor); in emitCode()
DGrBicubicEffect.cpp92 fsBuilder->codeAppendf("\tvec2 coord = %s - %s * vec2(0.5);\n", coords2D.c_str(), imgInc); in emitCode()
97 fsBuilder->codeAppendf("\tcoord /= %s;\n", imgInc); in emitCode()
99 fsBuilder->codeAppendf("\tcoord = (coord - f + vec2(0.5)) * %s;\n", imgInc); in emitCode()
109 …fsBuilder->codeAppendf("\tvec4 s%d = %s(%s, f.x, rowColors[0], rowColors[1], rowColors[2], rowColo… in emitCode()
113 …fsBuilder->codeAppendf("\t%s = %s;\n", outputColor, (GrGLSLExpr4(bicubicColor.c_str()) * GrGLSLExp… in emitCode()
DGrConstColorProcessor.cpp30 fsBuilder->codeAppendf("%s = %s;", outputColor, colorUni); in emitCode()
33 fsBuilder->codeAppendf("%s = %s * %s;", outputColor, inputColor, colorUni); in emitCode()
36 fsBuilder->codeAppendf("%s = %s.a * %s;", outputColor, inputColor, colorUni); in emitCode()
/external/skia/src/gpu/gl/
DGrGLGeometryProcessor.cpp66 vb->codeAppendf("%s = (%s * vec3(%s, 1)).xy;", in emitTransforms()
70 vb->codeAppendf("{ vec3 temp = %s * %s;", uniName, posVar.c_str()); in emitTransforms()
71 vb->codeAppendf("%s = vec2(temp.x/temp.z, temp.y/temp.z); }", v.vsOut()); in emitTransforms()
75 vb->codeAppendf("%s = %s * vec3(%s, 1);", in emitTransforms()
78 vb->codeAppendf("%s = %s * %s;", v.vsOut(), uniName, posVar.c_str()); in emitTransforms()
83 vb->codeAppendf("%s = (%s * vec3(%s, 1)).xy;", v.vsOut(), uniName, localCoords); in emitTransforms()
85 vb->codeAppendf("%s = %s * vec3(%s, 1);", v.vsOut(), uniName, localCoords); in emitTransforms()
100 vsBuilder->codeAppendf("vec2 %s = %s;", gpArgs->fPositionVar.c_str(), posName); in setupPosition()
105 vsBuilder->codeAppendf("vec2 %s = vec2(%s * vec3(%s, 1));", in setupPosition()
111 vsBuilder->codeAppendf("vec3 %s = %s * vec3(%s, 1);", in setupPosition()
DGrGLXferProcessor.cpp23 fsBuilder->codeAppendf("if (all(lessThanEqual(%s, vec4(0)))) {" in emitCode()
46 fsBuilder->codeAppendf("vec2 _dstTexCoord = (%s.xy - %s) * %s;", in emitCode()
53 fsBuilder->codeAppendf("vec4 %s = ", dstColor); in emitCode()
/external/skia/src/effects/
DSkBlurMaskFilter.cpp689 fsBuilder->codeAppendf("\tfloat %s;\n", output); in OutputRectBlurProfileLookup()
690 fsBuilder->codeAppendf("\t\t{\n"); in OutputRectBlurProfileLookup()
691 fsBuilder->codeAppendf("\t\t\tfloat coord = (0.5 * (abs(2.0*%s - %s) - %s))/%s;\n", in OutputRectBlurProfileLookup()
693 fsBuilder->codeAppendf("\t\t\t%s = ", output); in OutputRectBlurProfileLookup()
696 fsBuilder->codeAppendf("\t\t}\n"); in OutputRectBlurProfileLookup()
724 fsBuilder->codeAppendf("\tvec4 src=%s;\n", inputColor); in emitCode()
726 fsBuilder->codeAppendf("\tvec4 src=vec4(1)\n;"); in emitCode()
729 fsBuilder->codeAppendf("\tvec2 translatedPos = %s.xy - %s.xy;\n", fragmentPos, rectName ); in emitCode()
730 fsBuilder->codeAppendf("\tfloat width = %s.z - %s.x;\n", rectName, rectName); in emitCode()
731 fsBuilder->codeAppendf("\tfloat height = %s.w - %s.y;\n", rectName, rectName); in emitCode()
[all …]
DSkArithmeticMode_gpu.cpp33 fsBuilder->codeAppendf("vec4 src = %s;", inputColor); in add_arithmetic_code()
39 fsBuilder->codeAppendf("vec4 dst = %s;", dstColor); in add_arithmetic_code()
44 fsBuilder->codeAppendf("%s = %s.x * src * dst + %s.y * src + %s.z * dst + %s.w;", in add_arithmetic_code()
46 fsBuilder->codeAppendf("%s = clamp(%s, 0.0, 1.0);\n", outputColor, outputColor); in add_arithmetic_code()
48 fsBuilder->codeAppendf("%s.rgb *= %s.a;", outputColor, outputColor); in add_arithmetic_code()
50 fsBuilder->codeAppendf("%s.rgb = min(%s.rgb, %s.a);", in add_arithmetic_code()
72 fsBuilder->codeAppendf(";"); in emitCode()
245 fsBuilder->codeAppendf("%s = %s * %s + (vec4(1.0) - %s) * %s;", in onEmitCode()
DSkPerlinNoiseShader.cpp832 fsBuilder->codeAppendf("\n\t\tvec2 %s = floor(%s.xy) * %s;", in emitCode()
836 fsBuilder->codeAppendf("\n\t\t%s = vec4(0.0);", outputColor); in emitCode()
840 fsBuilder->codeAppendf("\n\t\tvec2 %s = %s;", stitchData, stitchDataUni); in emitCode()
843 fsBuilder->codeAppendf("\n\t\tfloat %s = 1.0;", ratio); in emitCode()
846 fsBuilder->codeAppendf("\n\t\tfor (int octave = 0; octave < %d; ++octave) {", fNumOctaves); in emitCode()
848 fsBuilder->codeAppendf("\n\t\t\t%s += ", outputColor); in emitCode()
853 fsBuilder->codeAppendf( in emitCode()
861 fsBuilder->codeAppendf( in emitCode()
870 fsBuilder->codeAppendf(")"); // end of "abs(" in emitCode()
872 fsBuilder->codeAppendf(" * %s;", ratio); in emitCode()
[all …]
DSkColorCubeFilter.cpp301 fsBuilder->codeAppendf("\tfloat %s = max(%s.a, 0.00001);\n", nonZeroAlpha, inputColor); in emitCode()
302 fsBuilder->codeAppendf("\tvec4 %s = vec4(%s.rgb / %s, %s);\n", in emitCode()
306 fsBuilder->codeAppendf( in emitCode()
312 fsBuilder->codeAppendf("vec2 %s = vec2(%s.r, (floor(%s.b) + %s.g) * %s);\n", in emitCode()
314 fsBuilder->codeAppendf("vec2 %s = vec2(%s.r, (ceil(%s.b) + %s.g) * %s);\n", in emitCode()
318 fsBuilder->codeAppendf("%s = vec4(mix(", outputColor); in emitCode()
324 fsBuilder->codeAppendf(".rgb, fract(%s.b)) * vec3(%s), %s.a);\n", in emitCode()
DSkTableColorFilter.cpp434 fsBuilder->codeAppendf("\t\tvec4 coord = vec4(%f, %f, %f, %f);\n", in emitCode()
438 fsBuilder->codeAppendf("\t\tfloat nonZeroAlpha = max(%s.a, .0001);\n", inputColor); in emitCode()
439 …fsBuilder->codeAppendf("\t\tvec4 coord = vec4(%s.rgb / nonZeroAlpha, nonZeroAlpha);\n", inputColor… in emitCode()
440 fsBuilder->codeAppendf("\t\tcoord = coord * %f + vec4(%f, %f, %f, %f);\n", in emitCode()
448 fsBuilder->codeAppendf("\t\t%s.a = ", outputColor); in emitCode()
453 fsBuilder->codeAppendf("\t\t%s.r = ", outputColor); in emitCode()
458 fsBuilder->codeAppendf("\t\t%s.g = ", outputColor); in emitCode()
463 fsBuilder->codeAppendf("\t\t%s.b = ", outputColor); in emitCode()
468 fsBuilder->codeAppendf("\t\t%s.rgb *= %s.a;\n", outputColor, outputColor); in emitCode()
DSkMagnifierImageFilter.cpp156 fsBuilder->codeAppendf("\t\tvec2 coord = %s;\n", coords2D.c_str()); in emitCode()
157 fsBuilder->codeAppendf("\t\tvec2 zoom_coord = %s + %s * %s;\n", in emitCode()
162 fsBuilder->codeAppendf("\t\tvec2 delta = (coord - %s.xy) * %s.zw;\n", bounds, bounds); in emitCode()
163 fsBuilder->codeAppendf("\t\tdelta = min(delta, vec2(1.0, 1.0) - delta);\n"); in emitCode()
164 fsBuilder->codeAppendf("\t\tdelta = delta * %s;\n", builder->getUniformCStr(fInvInsetVar)); in emitCode()
182 fsBuilder->codeAppendf("\t\t%s = output_color;", outputColor); in emitCode()
/external/skia/src/gpu/gl/builders/
DGrGLVertexShaderBuilder.cpp48 this->codeAppendf("{vec2 _posTmp = vec2(%s.x/%s.z, %s.y/%s.z);", p, p, p, p); in transformToNormalizedDeviceSpace()
51 this->codeAppendf("{vec2 _posTmp = %s;", posVar.c_str()); in transformToNormalizedDeviceSpace()
53 this->codeAppendf("_posTmp = floor(_posTmp) + vec2(0.5, 0.5);" in transformToNormalizedDeviceSpace()
57 … this->codeAppendf("gl_Position = vec4(dot(%s.xz, %s.xy)/%s.z, dot(%s.yz, %s.zw)/%s.z, 0, 1);", in transformToNormalizedDeviceSpace()
62 this->codeAppendf("gl_Position = vec4(%s.x * %s.x + %s.y, %s.y * %s.z + %s.w, 0, 1);", in transformToNormalizedDeviceSpace()
/external/skia/src/effects/gradients/
DSkTwoPointConicalGradient_gpu.cpp259 fsBuilder->codeAppendf("\tvec3 interpolants = vec3(%s.xy / %s.z, %s.x / %s.z);\n", in emitCode()
271 fsBuilder->codeAppendf("\t%s = vec4(0.0,0.0,0.0,0.0);\n", outputColor); in emitCode()
274 fsBuilder->codeAppendf("\tfloat %s = dot(%s, %s) - %s;\n", in emitCode()
278 fsBuilder->codeAppendf("\tfloat %s = -(%s / %s);\n", tName.c_str(), in emitCode()
282 fsBuilder->codeAppendf("\tif (%s * %s + %s > 0.0) {\n", tName.c_str(), in emitCode()
547 fsBuilder->codeAppendf("\t%s = vec4(0.0,0.0,0.0,0.0);\n", outputColor); in emitCode()
549 fsBuilder->codeAppendf("\tfloat xs = %s.x * %s.x;\n", coords2D, coords2D); in emitCode()
550 fsBuilder->codeAppendf("\tfloat ys = %s.y * %s.y;\n", coords2D, coords2D); in emitCode()
551 fsBuilder->codeAppendf("\tfloat d = xs + %s * ys;\n", p1.c_str()); in emitCode()
556 fsBuilder->codeAppendf("\tfloat %s = %s.x * %s + sqrt(d);\n", tName.c_str(), in emitCode()
[all …]

12