Lines Matching refs:fragBuilder
175 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local
193 fragBuilder->codeAppendf("float2 dxy0 = %s.xy - sk_FragCoord.xy;", rectName); in emitCode()
194 fragBuilder->codeAppendf("float2 dxy1 = sk_FragCoord.xy - %s.zw;", rectName); in emitCode()
195 fragBuilder->codeAppend("float2 dxy = max(max(dxy0, dxy1), 0.0);"); in emitCode()
196 fragBuilder->codeAppendf("half alpha = %s;", clampedCircleDistance.c_str()); in emitCode()
199 fragBuilder->codeAppendf("float2 dxy = max(%s.xy - sk_FragCoord.xy, 0.0);", in emitCode()
201 fragBuilder->codeAppendf("half rightAlpha = saturate(%s.z - sk_FragCoord.x);", in emitCode()
203 fragBuilder->codeAppendf("half bottomAlpha = saturate(%s.w - sk_FragCoord.y);", in emitCode()
205 fragBuilder->codeAppendf("half alpha = bottomAlpha * rightAlpha * %s;", in emitCode()
209 fragBuilder->codeAppendf("float2 dxy = max(float2(sk_FragCoord.x - %s.z, " in emitCode()
212 fragBuilder->codeAppendf("half leftAlpha = saturate(sk_FragCoord.x - %s.x);", in emitCode()
214 fragBuilder->codeAppendf("half bottomAlpha = saturate(%s.w - sk_FragCoord.y);", in emitCode()
216 fragBuilder->codeAppendf("half alpha = bottomAlpha * leftAlpha * %s;", in emitCode()
220 fragBuilder->codeAppendf("float2 dxy = max(sk_FragCoord.xy - %s.zw, 0.0);", in emitCode()
222 fragBuilder->codeAppendf("half leftAlpha = saturate(sk_FragCoord.x - %s.x);", in emitCode()
224 fragBuilder->codeAppendf("half topAlpha = saturate(sk_FragCoord.y - %s.y);", in emitCode()
226 fragBuilder->codeAppendf("half alpha = topAlpha * leftAlpha * %s;", in emitCode()
230 fragBuilder->codeAppendf("float2 dxy = max(float2(%s.x - sk_FragCoord.x, " in emitCode()
233 fragBuilder->codeAppendf("half rightAlpha = saturate(%s.z - sk_FragCoord.x);", in emitCode()
235 fragBuilder->codeAppendf("half topAlpha = saturate(sk_FragCoord.y - %s.y);", in emitCode()
237 fragBuilder->codeAppendf("half alpha = topAlpha * rightAlpha * %s;", in emitCode()
241 fragBuilder->codeAppendf("float2 dxy0 = %s.xy - sk_FragCoord.xy;", rectName); in emitCode()
242 fragBuilder->codeAppendf("float dy1 = sk_FragCoord.y - %s.w;", rectName); in emitCode()
243 fragBuilder->codeAppend("float2 dxy = max(float2(dxy0.x, max(dxy0.y, dy1)), 0.0);"); in emitCode()
244 fragBuilder->codeAppendf("half rightAlpha = saturate(%s.z - sk_FragCoord.x);", in emitCode()
246 fragBuilder->codeAppendf("half alpha = rightAlpha * %s;", in emitCode()
250 fragBuilder->codeAppendf("float2 dxy0 = %s.xy - sk_FragCoord.xy;", rectName); in emitCode()
251 fragBuilder->codeAppendf("float dx1 = sk_FragCoord.x - %s.z;", rectName); in emitCode()
252 fragBuilder->codeAppend("float2 dxy = max(float2(max(dxy0.x, dx1), dxy0.y), 0.0);"); in emitCode()
253 fragBuilder->codeAppendf("half bottomAlpha = saturate(%s.w - sk_FragCoord.y);", in emitCode()
255 fragBuilder->codeAppendf("half alpha = bottomAlpha * %s;", in emitCode()
259 fragBuilder->codeAppendf("float dy0 = %s.y - sk_FragCoord.y;", rectName); in emitCode()
260 fragBuilder->codeAppendf("float2 dxy1 = sk_FragCoord.xy - %s.zw;", rectName); in emitCode()
261 fragBuilder->codeAppend("float2 dxy = max(float2(dxy1.x, max(dy0, dxy1.y)), 0.0);"); in emitCode()
262 fragBuilder->codeAppendf("half leftAlpha = saturate(sk_FragCoord.x - %s.x);", in emitCode()
264 fragBuilder->codeAppendf("half alpha = leftAlpha * %s;", in emitCode()
268 fragBuilder->codeAppendf("float dx0 = %s.x - sk_FragCoord.x;", rectName); in emitCode()
269 fragBuilder->codeAppendf("float2 dxy1 = sk_FragCoord.xy - %s.zw;", rectName); in emitCode()
270 fragBuilder->codeAppend("float2 dxy = max(float2(max(dx0, dxy1.x), dxy1.y), 0.0);"); in emitCode()
271 fragBuilder->codeAppendf("half topAlpha = saturate(sk_FragCoord.y - %s.y);", in emitCode()
273 fragBuilder->codeAppendf("half alpha = topAlpha * %s;", in emitCode()
279 fragBuilder->codeAppend("alpha = 1.0 - alpha;"); in emitCode()
282 fragBuilder->codeAppendf("%s = %s * alpha;", args.fOutputColor, args.fInputColor); in emitCode()
509 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local
522 fragBuilder->codeAppendf("float2 dxy0 = %s.xy - sk_FragCoord.xy;", rectName); in emitCode()
523 fragBuilder->codeAppendf("float2 dxy1 = sk_FragCoord.xy - %s.zw;", rectName); in emitCode()
542 fragBuilder->codeAppend("float2 dxy = max(max(dxy0, dxy1), 0.0);"); in emitCode()
544 fragBuilder->codeAppendf("dxy *= %s.y;", scaleName); in emitCode()
547 fragBuilder->codeAppendf("float2 Z = dxy * %s.xy;", invRadiiXYSqdName); in emitCode()
557 fragBuilder->codeAppendf("dxy0 *= %s.y;", scaleName); in emitCode()
558 fragBuilder->codeAppendf("dxy1 *= %s.y;", scaleName); in emitCode()
560 fragBuilder->codeAppend("float2 dxy = max(max(dxy0, dxy1), 0.0);"); in emitCode()
564 fragBuilder->codeAppendf("float2 Z = max(max(dxy0 * %s.xy, dxy1 * %s.zw), 0.0);", in emitCode()
573 fragBuilder->codeAppend("float implicit = dot(Z, dxy) - 1.0;"); in emitCode()
575 fragBuilder->codeAppend("float grad_dot = 4.0 * dot(Z, Z);"); in emitCode()
577 fragBuilder->codeAppend("grad_dot = max(grad_dot, 1.0e-4);"); in emitCode()
578 fragBuilder->codeAppend("float approx_dist = implicit * inversesqrt(grad_dot);"); in emitCode()
580 fragBuilder->codeAppendf("approx_dist *= %s.x;", scaleName); in emitCode()
584 fragBuilder->codeAppend("half alpha = clamp(0.5 - approx_dist, 0.0, 1.0);"); in emitCode()
586 fragBuilder->codeAppend("half alpha = clamp(0.5 + approx_dist, 0.0, 1.0);"); in emitCode()
589 fragBuilder->codeAppendf("%s = %s * alpha;", args.fOutputColor, args.fInputColor); in emitCode()