Lines Matching refs:codeAppend
107 v->codeAppend ("float2 tan = normalize(endpts.zw - endpts.xy);"); in onEmitCode()
108 v->codeAppend ("float2 n = float2(tan.y, -tan.x);"); in onEmitCode()
109 v->codeAppend ("float nwidth = abs(n.x) + abs(n.y);"); in onEmitCode()
112 v->codeAppend ("float2 outset = tan*nwidth/2;"); in onEmitCode()
113 v->codeAppend ("float2 position = (sk_VertexID < 2) " in onEmitCode()
126 v->codeAppend ("outset = n * (stroke_radius + nwidth/2);"); in onEmitCode()
127 v->codeAppend ("position += (0 == (sk_VertexID & 1)) ? +outset : -outset;"); in onEmitCode()
198 v->codeAppend ("float4x2 P = transpose(float2x4(X, Y));"); in onEmitCode()
199 v->codeAppend ("float stroke_radius = stroke_info[0];"); in onEmitCode()
200 v->codeAppend ("float num_segments = stroke_info[1];"); in onEmitCode()
204 v->codeAppend ("float point_id = float(sk_VertexID/2);"); in onEmitCode()
205 v->codeAppend ("float T = max((point_id - 1) / num_segments, 0);"); in onEmitCode()
206 v->codeAppend ("T = (point_id >= num_segments + 1) ? 1 : T;"); // In case x/x !== 1. in onEmitCode()
211 v->codeAppend ("float2 ab = mix(P[0], P[1], T);"); in onEmitCode()
212 v->codeAppend ("float2 bc = mix(P[1], P[2], T);"); in onEmitCode()
213 v->codeAppend ("float2 cd = mix(P[2], P[3], T);"); in onEmitCode()
214 v->codeAppend ("float2 abc = mix(ab, bc, T);"); in onEmitCode()
215 v->codeAppend ("float2 bcd = mix(bc, cd, T);"); in onEmitCode()
216 v->codeAppend ("float2 position = mix(abc, bcd, T);"); in onEmitCode()
217 v->codeAppend ("float2 tan = bcd - abc;"); in onEmitCode()
222 v->codeAppend ("if (0 == T && P[0] == P[1]) {"); in onEmitCode()
223 v->codeAppend ( "tan = P[2] - P[0];"); in onEmitCode()
224 v->codeAppend ("}"); in onEmitCode()
225 v->codeAppend ("if (1 == T && P[2] == P[3]) {"); in onEmitCode()
226 v->codeAppend ( "tan = P[3] - P[1];"); in onEmitCode()
227 v->codeAppend ("}"); in onEmitCode()
228 v->codeAppend ("tan = normalize(tan);"); in onEmitCode()
229 v->codeAppend ("float2 n = float2(tan.y, -tan.x);"); in onEmitCode()
230 v->codeAppend ("float nwidth = abs(n.x) + abs(n.y);"); in onEmitCode()
233 v->codeAppend ("float2 outset = n * (stroke_radius + nwidth/2);"); in onEmitCode()
234 v->codeAppend ("position += (0 == (sk_VertexID & 1)) ? -outset : +outset;"); in onEmitCode()
246 v->codeAppend ("if (0 == point_id || num_segments+1 == point_id) {"); in onEmitCode()
247 v->codeAppend ( "position -= tan*nwidth/2;"); in onEmitCode()
248 v->codeAppend ("}"); in onEmitCode()
249 v->codeAppend ("if (1 == point_id || num_segments+2 == point_id) {"); in onEmitCode()
250 v->codeAppend ( "position += tan*nwidth/2;"); in onEmitCode()
251 v->codeAppend ("}"); in onEmitCode()
264 f->codeAppend ("half coverage = edge_coverages.x + edge_coverages.y;"); in onEmitCode()