• Home
  • Raw
  • Download

Lines Matching refs:fragBuilder

193     GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;  in emitCode()  local
211 fragBuilder->codeAppendf("float2 dxy0 = %s.LT - sk_FragCoord.xy;", rectName); in emitCode()
212 fragBuilder->codeAppendf("float2 dxy1 = sk_FragCoord.xy - %s.RB;", rectName); in emitCode()
213 fragBuilder->codeAppend("float2 dxy = max(max(dxy0, dxy1), 0.0);"); in emitCode()
214 fragBuilder->codeAppendf("half alpha = half(%s);", clampedCircleDistance.c_str()); in emitCode()
217 fragBuilder->codeAppendf("float2 dxy = max(%s.LT - sk_FragCoord.xy, 0.0);", in emitCode()
219 fragBuilder->codeAppendf("half rightAlpha = half(saturate(%s.R - sk_FragCoord.x));", in emitCode()
221 fragBuilder->codeAppendf("half bottomAlpha = half(saturate(%s.B - sk_FragCoord.y));", in emitCode()
223 fragBuilder->codeAppendf("half alpha = bottomAlpha * rightAlpha * half(%s);", in emitCode()
227 fragBuilder->codeAppendf("float2 dxy = max(float2(sk_FragCoord.x - %s.R, " in emitCode()
230 fragBuilder->codeAppendf("half leftAlpha = half(saturate(sk_FragCoord.x - %s.L));", in emitCode()
232 fragBuilder->codeAppendf("half bottomAlpha = half(saturate(%s.B - sk_FragCoord.y));", in emitCode()
234 fragBuilder->codeAppendf("half alpha = bottomAlpha * leftAlpha * half(%s);", in emitCode()
238 fragBuilder->codeAppendf("float2 dxy = max(sk_FragCoord.xy - %s.RB, 0.0);", in emitCode()
240 fragBuilder->codeAppendf("half leftAlpha = half(saturate(sk_FragCoord.x - %s.L));", in emitCode()
242 fragBuilder->codeAppendf("half topAlpha = half(saturate(sk_FragCoord.y - %s.T));", in emitCode()
244 fragBuilder->codeAppendf("half alpha = topAlpha * leftAlpha * half(%s);", in emitCode()
248 fragBuilder->codeAppendf("float2 dxy = max(float2(%s.L - sk_FragCoord.x, " in emitCode()
251 fragBuilder->codeAppendf("half rightAlpha = half(saturate(%s.R - sk_FragCoord.x));", in emitCode()
253 fragBuilder->codeAppendf("half topAlpha = half(saturate(sk_FragCoord.y - %s.T));", in emitCode()
255 fragBuilder->codeAppendf("half alpha = topAlpha * rightAlpha * half(%s);", in emitCode()
259 fragBuilder->codeAppendf("float2 dxy0 = %s.LT - sk_FragCoord.xy;", rectName); in emitCode()
260 fragBuilder->codeAppendf("float dy1 = sk_FragCoord.y - %s.B;", rectName); in emitCode()
261 fragBuilder->codeAppend("float2 dxy = max(float2(dxy0.x, max(dxy0.y, dy1)), 0.0);"); in emitCode()
262 fragBuilder->codeAppendf("half rightAlpha = half(saturate(%s.R - sk_FragCoord.x));", in emitCode()
264 fragBuilder->codeAppendf("half alpha = rightAlpha * half(%s);", in emitCode()
268 fragBuilder->codeAppendf("float2 dxy0 = %s.LT - sk_FragCoord.xy;", rectName); in emitCode()
269 fragBuilder->codeAppendf("float dx1 = sk_FragCoord.x - %s.R;", rectName); in emitCode()
270 fragBuilder->codeAppend("float2 dxy = max(float2(max(dxy0.x, dx1), dxy0.y), 0.0);"); in emitCode()
271 fragBuilder->codeAppendf("half bottomAlpha = half(saturate(%s.B - sk_FragCoord.y));", in emitCode()
273 fragBuilder->codeAppendf("half alpha = bottomAlpha * half(%s);", in emitCode()
277 fragBuilder->codeAppendf("float dy0 = %s.T - sk_FragCoord.y;", rectName); in emitCode()
278 fragBuilder->codeAppendf("float2 dxy1 = sk_FragCoord.xy - %s.RB;", rectName); in emitCode()
279 fragBuilder->codeAppend("float2 dxy = max(float2(dxy1.x, max(dy0, dxy1.y)), 0.0);"); in emitCode()
280 fragBuilder->codeAppendf("half leftAlpha = half(saturate(sk_FragCoord.x - %s.L));", in emitCode()
282 fragBuilder->codeAppendf("half alpha = leftAlpha * half(%s);", in emitCode()
286 fragBuilder->codeAppendf("float dx0 = %s.L - sk_FragCoord.x;", rectName); in emitCode()
287 fragBuilder->codeAppendf("float2 dxy1 = sk_FragCoord.xy - %s.RB;", rectName); in emitCode()
288 fragBuilder->codeAppend("float2 dxy = max(float2(max(dx0, dxy1.x), dxy1.y), 0.0);"); in emitCode()
289 fragBuilder->codeAppendf("half topAlpha = half(saturate(sk_FragCoord.y - %s.T));", in emitCode()
291 fragBuilder->codeAppendf("half alpha = topAlpha * half(%s);", in emitCode()
297 fragBuilder->codeAppend("alpha = 1.0 - alpha;"); in emitCode()
302 fragBuilder->codeAppendf("return %s * alpha;", inputSample.c_str()); in emitCode()
545 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local
558 fragBuilder->codeAppendf("float2 dxy0 = %s.LT - sk_FragCoord.xy;", rectName); in emitCode()
559 fragBuilder->codeAppendf("float2 dxy1 = sk_FragCoord.xy - %s.RB;", rectName); in emitCode()
579 fragBuilder->codeAppend("float2 dxy = max(max(dxy0, dxy1), 0.0);"); in emitCode()
581 fragBuilder->codeAppendf("dxy *= %s.y;", scaleName); in emitCode()
584 fragBuilder->codeAppendf("float2 Z = dxy * %s.xy;", invRadiiXYSqdName); in emitCode()
595 fragBuilder->codeAppendf("dxy0 *= %s.y;", scaleName); in emitCode()
596 fragBuilder->codeAppendf("dxy1 *= %s.y;", scaleName); in emitCode()
598 fragBuilder->codeAppend("float2 dxy = max(max(dxy0, dxy1), 0.0);"); in emitCode()
602 fragBuilder->codeAppendf("float2 Z = max(max(dxy0 * %s.xy, dxy1 * %s.zw), 0.0);", in emitCode()
611 fragBuilder->codeAppend("half implicit = half(dot(Z, dxy) - 1.0);"); in emitCode()
613 fragBuilder->codeAppend("half grad_dot = half(4.0 * dot(Z, Z));"); in emitCode()
615 fragBuilder->codeAppend("grad_dot = max(grad_dot, 1.0e-4);"); in emitCode()
616 fragBuilder->codeAppend("half approx_dist = implicit * half(inversesqrt(grad_dot));"); in emitCode()
618 fragBuilder->codeAppendf("approx_dist *= %s.x;", scaleName); in emitCode()
622 fragBuilder->codeAppend("half alpha = clamp(0.5 - approx_dist, 0.0, 1.0);"); in emitCode()
624 fragBuilder->codeAppend("half alpha = clamp(0.5 + approx_dist, 0.0, 1.0);"); in emitCode()
629 fragBuilder->codeAppendf("return %s * alpha;", inputSample.c_str()); in emitCode()