1static constexpr char SKSL_MINIFIED_sksl_graphite_frag[] = 2"const int $kTileModeClamp=0;const int $kTileModeRepeat=1;const int $kTileModeDecal" 3"=3;const int $kFilterModeNearest=0;const int $kFilterModeLinear=1;const int" 4" $kColorSpaceXformFlagUnpremul=1;const int $kColorSpaceXformFlagLinearize=2" 5";const int $kColorSpaceXformFlagGamutTransform=4;const int $kColorSpaceXformFlagEncode" 6"=8;const int $kColorSpaceXformFlagPremul=16;const int $kColorSpaceXformFlagAlphaSwizzle" 7"=32;const int $kMaskFormatA8=0;const float $kLinearInset=.50001;$pure half4" 8" sk_error(){return half4(1.,0.,0.,1.);}$pure half4 sk_passthrough(half4 color" 9"){return color;}$pure half4 sk_solid_shader(float4 colorParam){return half4" 10"(colorParam);}$pure half4 sk_rgb_opaque(float4 colorParam){return half4(half3" 11"(colorParam.xyz),1.);}$pure half4 sk_alpha_only(float4 colorParam){return half4" 12"(0.,0.,0.,half(colorParam.w));}$pure float3 $apply_xfer_fn(int kind,float3 x" 13",half4 coeffs0,half4 coeffs1){float G=float(coeffs0.x);float A=float(coeffs0" 14".y);float B=float(coeffs0.z);float C=float(coeffs0.w);float D=float(coeffs1" 15".x);float E=float(coeffs1.y);float F=float(coeffs1.z);float3 s=sign(x);x=abs" 16"(x);{float3 x_C;switch(kind){case 1:x=mix(pow(A*x+B,G.xxx)+E,C*x+F,lessThan" 17"(x,D.xxx));break;case 2:x_C=pow(x,C.xxx);x=pow(max(A+B*x_C,0.)/(D+E*x_C),F." 18"xxx);break;case 3:x=mix(exp((x-E)*C)+D,pow(x*A,B.xxx),lessThanEqual(x*A,1.." 19"xxx));x*=F+1.;break;case 4:x/=F+1.;x=mix(C*log(x-D)+E,A*pow(x,B.xxx),lessThanEqual" 20"(x,1..xxx));break;}}return s*x;}$pure half4 sk_premul_alpha(float4 color){return" 21" half4(half3(color.xyz*color.w),half(color.w));}$pure half4 sk_color_space_transform" 22"(half4 halfColor,int flags,int srcKind,half3x3 gamutTransform,int dstKind,half4x4" 23" coeffs){if(flags!=0){float4 color=float4(halfColor);if(bool(flags&$kColorSpaceXformFlagAlphaSwizzle" 24"))color.w=dot(float2(color.x,1.),float2(float(coeffs[1].w),float(coeffs[3]." 25"w)));if(bool(flags&$kColorSpaceXformFlagUnpremul))color=unpremul(color);if(" 26"bool(flags&$kColorSpaceXformFlagLinearize))color.xyz=$apply_xfer_fn(srcKind" 27",color.xyz,coeffs[0],coeffs[1]);if(bool(flags&$kColorSpaceXformFlagGamutTransform" 28"))color.xyz=float3x3(gamutTransform)*color.xyz;if(bool(flags&$kColorSpaceXformFlagEncode" 29"))color.xyz=$apply_xfer_fn(dstKind,color.xyz,coeffs[2],coeffs[3]);halfColor" 30"=bool(flags&$kColorSpaceXformFlagPremul)?sk_premul_alpha(color):half4(color" 31");}return halfColor;}$pure half4 sk_circular_rrect_clip(float4 rect,float2 radiusPlusHalf" 32",half4 edgeSelect){float2 fragCoord=sk_FragCoord.xy;float2 radius=abs(radiusPlusHalf" 33".x).xx;float2 dxy0=float2(edgeSelect.xy)*((rect.xy+radius)-fragCoord);float2" 34" dxy1=float2(edgeSelect.zw)*(fragCoord-(rect.zw-radius));float2 dxy=max(max" 35"(dxy0,dxy1),0.);half circleCornerAlpha=half(saturate(radius.x*(1.-length(dxy" 36"*radiusPlusHalf.y))));half4 rectEdgeAlphas=saturate(half4(half2(fragCoord-rect" 37".xy),half2(rect.zw-fragCoord)));rectEdgeAlphas=mix(rectEdgeAlphas,half4(1.)" 38",edgeSelect);half alpha=(((circleCornerAlpha*rectEdgeAlphas.x)*rectEdgeAlphas" 39".y)*rectEdgeAlphas.z)*rectEdgeAlphas.w;alpha=radiusPlusHalf.x<0.?1.-alpha:alpha" 40";return alpha.xxxx;}$pure float $tile(int tileMode,float f,float low,float high" 41"){switch(tileMode){case 0:return clamp(f,low,high);case 1:{float length=high" 42"-low;return mod(f-low,length)+low;}case 2:{float length=high-low;float length2" 43"=2.*length;float tmp=mod(f-low,length2);return mix(tmp,length2-tmp,step(length" 44",tmp))+low;}default:return f;}}$pure half4 $sample_image(float2 pos,float2 invImgSize" 45",sampler2D s){return sample(s,pos*invImgSize);}$pure half4 $sample_image_subset" 46"(float2 pos,float2 invImgSize,float4 subset,int tileModeX,int tileModeY,int" 47" filterMode,float2 linearFilterInset,sampler2D s){if(tileModeX==$kTileModeDecal" 48"&&filterMode==$kFilterModeNearest){float snappedX=floor(pos.x)+.5;if(snappedX" 49"<subset.x||snappedX>subset.z)return half4(0.);}if(tileModeY==$kTileModeDecal" 50"&&filterMode==$kFilterModeNearest){float snappedY=floor(pos.y)+.5;if(snappedY" 51"<subset.y||snappedY>subset.w)return half4(0.);}pos.x=$tile(tileModeX,pos.x," 52"subset.x,subset.z);pos.y=$tile(tileModeY,pos.y,subset.y,subset.w);float4 insetClamp" 53";if(filterMode==$kFilterModeNearest)insetClamp=float4(floor(subset.xy)+$kLinearInset" 54",ceil(subset.zw)-$kLinearInset);else insetClamp=float4(subset.xy+linearFilterInset" 55".x,subset.zw-linearFilterInset.y);float2 clampedPos=clamp(pos,insetClamp.xy" 56",insetClamp.zw);half4 color=$sample_image(clampedPos,invImgSize,s);if(filterMode" 57"==$kFilterModeLinear){half2 error=half2(pos-clampedPos);half2 absError=abs(" 58"error);bool sampleExtraX=tileModeX==$kTileModeRepeat;bool sampleExtraY=tileModeY" 59"==$kTileModeRepeat;if(sampleExtraX||sampleExtraY){float extraCoordX;float extraCoordY" 60";half4 extraColorX;half4 extraColorY;if(sampleExtraX){extraCoordX=error.x>0." 61"?insetClamp.x:insetClamp.z;extraColorX=$sample_image(float2(extraCoordX,clampedPos" 62".y),invImgSize,s);}if(sampleExtraY){extraCoordY=error.y>0.?insetClamp.y:insetClamp" 63".w;extraColorY=$sample_image(float2(clampedPos.x,extraCoordY),invImgSize,s)" 64";}if(sampleExtraX&&sampleExtraY){half4 extraColorXY=$sample_image(float2(extraCoordX" 65",extraCoordY),invImgSize,s);color=mix(mix(color,extraColorX,absError.x),mix" 66"(extraColorY,extraColorXY,absError.x),absError.y);}else if(sampleExtraX)color" 67"=mix(color,extraColorX,absError.x);else if(sampleExtraY)color=mix(color,extraColorY" 68",absError.y);}if(tileModeX==$kTileModeDecal)color*=max(1.-absError.x,0.);if" 69"(tileModeY==$kTileModeDecal)color*=max(1.-absError.y,0.);}return color;}$pure" 70" half4 $cubic_filter_image(float2 pos,float2 invImgSize,float4 subset,int tileModeX" 71",int tileModeY,half4x4 coeffs,sampler2D s){float2 f=fract(pos-.5);pos-=1.5;" 72"pos=floor(pos)+.5;half4 wx=coeffs*half4(1.,half(f.x),half(f.x*f.x),half((f." 73"x*f.x)*f.x));half4 wy=coeffs*half4(1.,half(f.y),half(f.y*f.y),half((f.y*f.y" 74")*f.y));half4 color=half4(0.);for(int y=0;y<4;++y){half4 rowColor=half4(0.)" 75";for(int x=0;x<4;++x)rowColor+=wx[x]*$sample_image_subset(pos+float2(float(" 76"x),float(y)),invImgSize,subset,tileModeX,tileModeY,$kFilterModeNearest,.50001" 77".xx,s);color+=wy[y]*rowColor;}color.w=saturate(color.w);color.xyz=clamp(color" 78".xyz,half3(0.),color.www);return color;}$pure half4 sk_image_shader(float2 coords" 79",float2 invImgSize,float4 subset,int tileModeX,int tileModeY,int filterMode" 80",sampler2D s){return $sample_image_subset(coords,invImgSize,subset,tileModeX" 81",tileModeY,filterMode,.50001.xx,s);}$pure half4 sk_cubic_image_shader(float2" 82" coords,float2 invImgSize,float4 subset,int tileModeX,int tileModeY,half4x4" 83" cubicCoeffs,sampler2D s){return $cubic_filter_image(coords,invImgSize,subset" 84",tileModeX,tileModeY,cubicCoeffs,s);}$pure half4 sk_hw_image_shader(float2 coords" 85",float2 invImgSize,sampler2D s){return $sample_image(coords,invImgSize,s);}" 86"$pure half4 $yuv_to_rgb_no_swizzle(half Y,half U,half V,half alpha,half3x3 yuvToRGBMatrix" 87",half3 yuvToRGBTranslate){half3 preColor=half3(Y,U,V);half4 sampleColor;sampleColor" 88".xyz=saturate(yuvToRGBMatrix*preColor+yuvToRGBTranslate);sampleColor.w=alpha" 89";return sampleColor;}$pure half4 $yuv_to_rgb(half4 sampleColorY,half4 sampleColorU" 90",half4 sampleColorV,half alpha,half4 channelSelectY,half4 channelSelectU,half4" 91" channelSelectV,half3x3 yuvToRGBMatrix,half3 yuvToRGBTranslate){half Y=dot(" 92"channelSelectY,sampleColorY);half U=dot(channelSelectU,sampleColorU);half V" 93"=dot(channelSelectV,sampleColorV);return $yuv_to_rgb_no_swizzle(Y,U,V,alpha" 94",yuvToRGBMatrix,yuvToRGBTranslate);}$pure half4 sk_yuv_image_shader(float2 coords" 95",float2 invImgSizeY,float2 invImgSizeUV,float4 subset,float2 linearFilterUVInset" 96",int tileModeX,int tileModeY,int filterModeY,int filterModeUV,half4 channelSelectY" 97",half4 channelSelectU,half4 channelSelectV,half4 channelSelectA,half3x3 yuvToRGBMatrix" 98",half3 yuvToRGBTranslate,sampler2D sY,sampler2D sU,sampler2D sV,sampler2D sA" 99"){if(filterModeY!=filterModeUV)coords=floor(coords)+.5;int tileModeX_UV=tileModeX" 100"==$kTileModeDecal?$kTileModeClamp:tileModeX;int tileModeY_UV=tileModeY==$kTileModeDecal" 101"?$kTileModeClamp:tileModeY;half4 sampleColorY;half4 sampleColorU;half4 sampleColorV" 102";sampleColorY=$sample_image_subset(coords,invImgSizeY,subset,tileModeX,tileModeY" 103",filterModeY,.50001.xx,sY);sampleColorU=$sample_image_subset(coords,invImgSizeUV" 104",subset,tileModeX_UV,tileModeY_UV,filterModeUV,linearFilterUVInset,sU);sampleColorV" 105"=$sample_image_subset(coords,invImgSizeUV,subset,tileModeX_UV,tileModeY_UV," 106"filterModeUV,linearFilterUVInset,sV);half alpha;if(channelSelectA==half4(1." 107"))alpha=1.;else{half4 sampleColorA=$sample_image_subset(coords,invImgSizeY," 108"subset,tileModeX,tileModeY,filterModeY,.50001.xx,sA);alpha=dot(channelSelectA" 109",sampleColorA);}return $yuv_to_rgb(sampleColorY,sampleColorU,sampleColorV,alpha" 110",channelSelectY,channelSelectU,channelSelectV,yuvToRGBMatrix,yuvToRGBTranslate" 111");}$pure half4 sk_cubic_yuv_image_shader(float2 coords,float2 invImgSizeY,float2" 112" invImgSizeUV,float4 subset,int tileModeX,int tileModeY,half4x4 cubicCoeffs" 113",half4 channelSelectY,half4 channelSelectU,half4 channelSelectV,half4 channelSelectA" 114",half3x3 yuvToRGBMatrix,half3 yuvToRGBTranslate,sampler2D sY,sampler2D sU,sampler2D" 115" sV,sampler2D sA){int tileModeX_UV=tileModeX==$kTileModeDecal?$kTileModeClamp" 116":tileModeX;int tileModeY_UV=tileModeY==$kTileModeDecal?$kTileModeClamp:tileModeY" 117";half4 sampleColorY;half4 sampleColorU;half4 sampleColorV;sampleColorY=$cubic_filter_image" 118"(coords,invImgSizeY,subset,tileModeX,tileModeY,cubicCoeffs,sY);sampleColorU" 119"=$cubic_filter_image(coords,invImgSizeUV,subset,tileModeX_UV,tileModeY_UV,cubicCoeffs" 120",sU);sampleColorV=$cubic_filter_image(coords,invImgSizeUV,subset,tileModeX_UV" 121",tileModeY_UV,cubicCoeffs,sV);half alpha;if(channelSelectA==half4(1.))alpha" 122"=1.;else{half4 sampleColorA=$cubic_filter_image(coords,invImgSizeY,subset,tileModeX" 123",tileModeY,cubicCoeffs,sA);alpha=dot(channelSelectA,sampleColorA);}return $yuv_to_rgb" 124"(sampleColorY,sampleColorU,sampleColorV,alpha,channelSelectY,channelSelectU" 125",channelSelectV,yuvToRGBMatrix,yuvToRGBTranslate);}$pure half4 sk_hw_yuv_image_shader" 126"(float2 coords,float2 invImgSizeY,float2 invImgSizeUV,half4 channelSelectY," 127"half4 channelSelectU,half4 channelSelectV,half4 channelSelectA,half3x3 yuvToRGBMatrix" 128",half3 yuvToRGBTranslate,sampler2D sY,sampler2D sU,sampler2D sV,sampler2D sA" 129"){half4 sampleColorY;half4 sampleColorU;half4 sampleColorV;sampleColorY=$sample_image" 130"(coords,invImgSizeY,sY);sampleColorU=$sample_image(coords,invImgSizeUV,sU);" 131"sampleColorV=$sample_image(coords,invImgSizeUV,sV);half alpha;if(channelSelectA" 132"==half4(1.))alpha=1.;else{half4 sampleColorA=$sample_image(coords,invImgSizeY" 133",sA);alpha=dot(channelSelectA,sampleColorA);}return $yuv_to_rgb(sampleColorY" 134",sampleColorU,sampleColorV,alpha,channelSelectY,channelSelectU,channelSelectV" 135",yuvToRGBMatrix,yuvToRGBTranslate);}$pure half4 sk_hw_yuv_no_swizzle_image_shader" 136"(float2 coords,float2 invImgSizeY,float2 invImgSizeUV,half3x3 yuvToRGBMatrix" 137",half4 yuvToRGBXlateAlphaParam,sampler2D sY,sampler2D sU,sampler2D sV,sampler2D" 138" sA){half Y=$sample_image(coords,invImgSizeY,sY).x;half U=$sample_image(coords" 139",invImgSizeUV,sU).x;half V=$sample_image(coords,invImgSizeUV,sV).x;half alpha" 140"=saturate($sample_image(coords,invImgSizeY,sA).x+yuvToRGBXlateAlphaParam.w)" 141";return $yuv_to_rgb_no_swizzle(Y,U,V,alpha,yuvToRGBMatrix,yuvToRGBXlateAlphaParam" 142".xyz);}$pure half4 sk_dither(half4 colorIn,half range,sampler2D lut){half value" 143"=sample(lut,sk_FragCoord.xy*.125).x-.5;return half4(clamp(colorIn.xyz+value" 144"*range,0.,colorIn.w),colorIn.w);}$pure float2 $tile_grad(int tileMode,float2" 145" t){switch(tileMode){case 0:t.x=saturate(t.x);break;case 1:t.x=fract(t.x);break" 146";case 2:{float t_1=t.x-1.;t.x=(t_1-2.*floor(t_1*.5))-1.;if(sk_Caps.mustDoOpBetweenFloorAndAbs" 147")t.x=clamp(t.x,-1.,1.);t.x=abs(t.x);break;}case 3:if(t.x<0.||t.x>1.)return float2" 148"(0.,-1.);break;}return t;}$pure half4 $colorize_grad_4(float4[4]colorsParam" 149",float4 offsetsParam,float2 t){if(t.y<0.)return half4(0.);else if(t.x<=offsetsParam" 150".x)return half4(colorsParam[0]);else if(t.x<offsetsParam.y)return half4(mix" 151"(colorsParam[0],colorsParam[1],(t.x-offsetsParam.x)/(offsetsParam.y-offsetsParam" 152".x)));else if(t.x<offsetsParam.z)return half4(mix(colorsParam[1],colorsParam" 153"[2],(t.x-offsetsParam.y)/(offsetsParam.z-offsetsParam.y)));else if(t.x<offsetsParam" 154".w)return half4(mix(colorsParam[2],colorsParam[3],(t.x-offsetsParam.z)/(offsetsParam" 155".w-offsetsParam.z)));else return half4(colorsParam[3]);}$pure half4 $colorize_grad_8" 156"(float4[8]colorsParam,float4[2]offsetsParam,float2 t){if(t.y<0.)return half4" 157"(0.);else if(t.x<offsetsParam[1].x)if(t.x<offsetsParam[0].z)if(t.x<=offsetsParam" 158"[0].x)return half4(colorsParam[0]);else if(t.x<offsetsParam[0].y)return half4" 159"(mix(colorsParam[0],colorsParam[1],(t.x-offsetsParam[0].x)/(offsetsParam[0]" 160".y-offsetsParam[0].x)));else return half4(mix(colorsParam[1],colorsParam[2]" 161",(t.x-offsetsParam[0].y)/(offsetsParam[0].z-offsetsParam[0].y)));else if(t." 162"x<offsetsParam[0].w)return half4(mix(colorsParam[2],colorsParam[3],(t.x-offsetsParam" 163"[0].z)/(offsetsParam[0].w-offsetsParam[0].z)));else return half4(mix(colorsParam" 164"[3],colorsParam[4],(t.x-offsetsParam[0].w)/(offsetsParam[1].x-offsetsParam[" 165"0].w)));else if(t.x<offsetsParam[1].z)if(t.x<offsetsParam[1].y)return half4" 166"(mix(colorsParam[4],colorsParam[5],(t.x-offsetsParam[1].x)/(offsetsParam[1]" 167".y-offsetsParam[1].x)));else return half4(mix(colorsParam[5],colorsParam[6]" 168",(t.x-offsetsParam[1].y)/(offsetsParam[1].z-offsetsParam[1].y)));else if(t." 169"x<offsetsParam[1].w)return half4(mix(colorsParam[6],colorsParam[7],(t.x-offsetsParam" 170"[1].z)/(offsetsParam[1].w-offsetsParam[1].z)));else return half4(colorsParam" 171"[7]);}$pure half4 $colorize_grad_tex(sampler2D colorsAndOffsetsSampler,int numStops" 172",float2 t){if(t.y<0.)return half4(0.);else if(t.x==0.)return sampleLod(colorsAndOffsetsSampler" 173",float2(0.,.25),0.);else if(t.x==1.)return sampleLod(colorsAndOffsetsSampler" 174",float2(1.,.25),0.);else{float low=0.;float high=float(numStops);float invNumStops" 175"=1./high;for(int loop=1;loop<numStops;loop+=loop){float mid=floor((low+high" 176")*.5);float samplePos=(mid+.5)*invNumStops;float2 tmp=float2(sampleLod(colorsAndOffsetsSampler" 177",float2(samplePos,.75),0.).xy);float offset=ldexp(tmp.x,int(tmp.y));if(t.x<" 178"offset)high=mid;else low=mid;}high=(low+1.5)*invNumStops;low=(low+.5)*invNumStops" 179";half4 color0=sampleLod(colorsAndOffsetsSampler,float2(low,.25),0.);half4 color1" 180"=sampleLod(colorsAndOffsetsSampler,float2(high,.25),0.);float2 tmp=float2(sampleLod" 181"(colorsAndOffsetsSampler,float2(low,.75),0.).xy);float offset0=ldexp(tmp.x," 182"int(tmp.y));tmp=float2(sampleLod(colorsAndOffsetsSampler,float2(high,.75),0." 183").xy);float offset1=ldexp(tmp.x,int(tmp.y));return half4(mix(float4(color0)" 184",float4(color1),(t.x-offset0)/(offset1-offset0)));}}$pure half4 $half4_from_array" 185"(float[]arr,int offset){return half4(half(arr[offset]),half(arr[offset+1])," 186"half(arr[offset+2]),half(arr[offset+3]));}$pure half4 $colorize_grad_buf(float" 187"[]colorAndOffsetData,int offsetsBaseIndex,int numStops,float2 t){int colorsBaseIndex" 188"=offsetsBaseIndex+numStops;if(t.y<0.)return half4(0.);else if(t.x==0.)return" 189" $half4_from_array(colorAndOffsetData,colorsBaseIndex);else if(t.x==1.){int" 190" lastColorIndex=colorsBaseIndex+(numStops-1)*4;return $half4_from_array(colorAndOffsetData" 191",lastColorIndex);}else{int lowOffsetIndex=offsetsBaseIndex;int highOffsetIndex" 192"=(lowOffsetIndex+numStops)-1;for(int i=1;i<numStops;i+=i){int middleOffsetIndex" 193"=(lowOffsetIndex+highOffsetIndex)/2;if(t.x<colorAndOffsetData[middleOffsetIndex" 194"])highOffsetIndex=middleOffsetIndex;else lowOffsetIndex=middleOffsetIndex;}" 195"int lowColorIndex=colorsBaseIndex+(lowOffsetIndex-offsetsBaseIndex)*4;float" 196" lowOffset=colorAndOffsetData[lowOffsetIndex];half4 lowColor=$half4_from_array" 197"(colorAndOffsetData,lowColorIndex);int highColorIndex=colorsBaseIndex+(highOffsetIndex" 198"-offsetsBaseIndex)*4;float highOffset=colorAndOffsetData[highOffsetIndex];if" 199"(highOffset==lowOffset)return lowColor;else{half4 highColor=$half4_from_array" 200"(colorAndOffsetData,highColorIndex);return half4(mix(float4(lowColor),float4" 201"(highColor),(t.x-lowOffset)/(highOffset-lowOffset)));}}}$pure float2 $linear_grad_layout" 202"(float2 pos){return float2(pos.x+1e-05,1.);}$pure float2 $radial_grad_layout" 203"(float2 pos){float t=length(pos);return float2(t,1.);}$pure float2 $sweep_grad_layout" 204"(float biasParam,float scaleParam,float2 pos){float angle;if(sk_Caps.atan2ImplementedAsAtanYOverX" 205")angle=2.*atan(-pos.y,length(pos)-pos.x);else angle=pos.x!=0.?atan(-pos.y,-" 206"pos.x):sign(pos.y)*-1.57079637;float t=((angle*.159154937+.5)+biasParam)*scaleParam" 207";return float2(t,1.);}$pure float2 $conical_grad_layout(float radius0,float" 208" dRadius,float a,float invA,float2 pos){if(a==0.&&invA==1.){float t=length(" 209"pos)*dRadius-radius0;return float2(t,1.);}else{float c=dot(pos,pos)-radius0" 210"*radius0;float negB=2.*(dRadius*radius0+pos.x);float t;if(a==0.)t=c/negB;else" 211"{float d=negB*negB-(4.*a)*c;if(d<0.)return float2(0.,-1.);float quadSign=sign" 212"(1.-dRadius);t=invA*(negB+quadSign*sqrt(d));}float isValid=sign(t*dRadius+radius0" 213");return float2(t,isValid);}}$pure half4 sk_linear_grad_4_shader(float2 coords" 214",float4[4]colorsParam,float4 offsetsParam,int tileMode,int colorSpace,int doUnpremul" 215"){float2 t=$linear_grad_layout(coords);t=$tile_grad(tileMode,t);half4 color" 216"=$colorize_grad_4(colorsParam,offsetsParam,t);return $interpolated_to_rgb_unpremul" 217"(color,colorSpace,doUnpremul);}$pure half4 sk_linear_grad_8_shader(float2 coords" 218",float4[8]colorsParam,float4[2]offsetsParam,int tileMode,int colorSpace,int" 219" doUnpremul){float2 t=$linear_grad_layout(coords);t=$tile_grad(tileMode,t);" 220"half4 color=$colorize_grad_8(colorsParam,offsetsParam,t);return $interpolated_to_rgb_unpremul" 221"(color,colorSpace,doUnpremul);}$pure half4 sk_linear_grad_tex_shader(float2" 222" coords,int numStops,int tileMode,int colorSpace,int doUnpremul,sampler2D colorAndOffsetSampler" 223"){float2 t=$linear_grad_layout(coords);t=$tile_grad(tileMode,t);half4 color" 224"=$colorize_grad_tex(colorAndOffsetSampler,numStops,t);return $interpolated_to_rgb_unpremul" 225"(color,colorSpace,doUnpremul);}$pure half4 sk_linear_grad_buf_shader(float2" 226" coords,int numStops,int bufferOffset,int tileMode,int colorSpace,int doUnpremul" 227",float[]colorAndOffsetData){float2 t=$linear_grad_layout(coords);t=$tile_grad" 228"(tileMode,t);half4 color=$colorize_grad_buf(colorAndOffsetData,bufferOffset" 229",numStops,t);return $interpolated_to_rgb_unpremul(color,colorSpace,doUnpremul" 230");}$pure half4 sk_radial_grad_4_shader(float2 coords,float4[4]colorsParam,float4" 231" offsetsParam,int tileMode,int colorSpace,int doUnpremul){float2 t=$radial_grad_layout" 232"(coords);t=$tile_grad(tileMode,t);half4 color=$colorize_grad_4(colorsParam," 233"offsetsParam,t);return $interpolated_to_rgb_unpremul(color,colorSpace,doUnpremul" 234");}$pure half4 sk_radial_grad_8_shader(float2 coords,float4[8]colorsParam,float4" 235"[2]offsetsParam,int tileMode,int colorSpace,int doUnpremul){float2 t=$radial_grad_layout" 236"(coords);t=$tile_grad(tileMode,t);half4 color=$colorize_grad_8(colorsParam," 237"offsetsParam,t);return $interpolated_to_rgb_unpremul(color,colorSpace,doUnpremul" 238");}$pure half4 sk_radial_grad_tex_shader(float2 coords,int numStops,int tileMode" 239",int colorSpace,int doUnpremul,sampler2D colorAndOffsetSampler){float2 t=$radial_grad_layout" 240"(coords);t=$tile_grad(tileMode,t);half4 color=$colorize_grad_tex(colorAndOffsetSampler" 241",numStops,t);return $interpolated_to_rgb_unpremul(color,colorSpace,doUnpremul" 242");}$pure half4 sk_radial_grad_buf_shader(float2 coords,int numStops,int bufferOffset" 243",int tileMode,int colorSpace,int doUnpremul,float[]colorAndOffsetData){float2" 244" t=$radial_grad_layout(coords);t=$tile_grad(tileMode,t);half4 color=$colorize_grad_buf" 245"(colorAndOffsetData,bufferOffset,numStops,t);return $interpolated_to_rgb_unpremul" 246"(color,colorSpace,doUnpremul);}$pure half4 sk_sweep_grad_4_shader(float2 coords" 247",float4[4]colorsParam,float4 offsetsParam,float biasParam,float scaleParam," 248"int tileMode,int colorSpace,int doUnpremul){float2 t=$sweep_grad_layout(biasParam" 249",scaleParam,coords);t=$tile_grad(tileMode,t);half4 color=$colorize_grad_4(colorsParam" 250",offsetsParam,t);return $interpolated_to_rgb_unpremul(color,colorSpace,doUnpremul" 251");}$pure half4 sk_sweep_grad_8_shader(float2 coords,float4[8]colorsParam,float4" 252"[2]offsetsParam,float biasParam,float scaleParam,int tileMode,int colorSpace" 253",int doUnpremul){float2 t=$sweep_grad_layout(biasParam,scaleParam,coords);t" 254"=$tile_grad(tileMode,t);half4 color=$colorize_grad_8(colorsParam,offsetsParam" 255",t);return $interpolated_to_rgb_unpremul(color,colorSpace,doUnpremul);}$pure" 256" half4 sk_sweep_grad_tex_shader(float2 coords,float biasParam,float scaleParam" 257",int numStops,int tileMode,int colorSpace,int doUnpremul,sampler2D colorAndOffsetSampler" 258"){float2 t=$sweep_grad_layout(biasParam,scaleParam,coords);t=$tile_grad(tileMode" 259",t);half4 color=$colorize_grad_tex(colorAndOffsetSampler,numStops,t);return" 260" $interpolated_to_rgb_unpremul(color,colorSpace,doUnpremul);}$pure half4 sk_sweep_grad_buf_shader" 261"(float2 coords,float biasParam,float scaleParam,int numStops,int bufferOffset" 262",int tileMode,int colorSpace,int doUnpremul,float[]colorAndOffsetData){float2" 263" t=$sweep_grad_layout(biasParam,scaleParam,coords);t=$tile_grad(tileMode,t)" 264";half4 color=$colorize_grad_buf(colorAndOffsetData,bufferOffset,numStops,t)" 265";return $interpolated_to_rgb_unpremul(color,colorSpace,doUnpremul);}$pure half4" 266" sk_conical_grad_4_shader(float2 coords,float4[4]colorsParam,float4 offsetsParam" 267",float radius0Param,float dRadiusParam,float aParam,float invAParam,int tileMode" 268",int colorSpace,int doUnpremul){float2 t=$conical_grad_layout(radius0Param," 269"dRadiusParam,aParam,invAParam,coords);t=$tile_grad(tileMode,t);half4 color=" 270"$colorize_grad_4(colorsParam,offsetsParam,t);return $interpolated_to_rgb_unpremul" 271"(color,colorSpace,doUnpremul);}$pure half4 sk_conical_grad_8_shader(float2 coords" 272",float4[8]colorsParam,float4[2]offsetsParam,float radius0Param,float dRadiusParam" 273",float aParam,float invAParam,int tileMode,int colorSpace,int doUnpremul){float2" 274" t=$conical_grad_layout(radius0Param,dRadiusParam,aParam,invAParam,coords);" 275"t=$tile_grad(tileMode,t);half4 color=$colorize_grad_8(colorsParam,offsetsParam" 276",t);return $interpolated_to_rgb_unpremul(color,colorSpace,doUnpremul);}$pure" 277" half4 sk_conical_grad_tex_shader(float2 coords,float radius0Param,float dRadiusParam" 278",float aParam,float invAParam,int numStops,int tileMode,int colorSpace,int doUnpremul" 279",sampler2D colorAndOffsetSampler){float2 t=$conical_grad_layout(radius0Param" 280",dRadiusParam,aParam,invAParam,coords);t=$tile_grad(tileMode,t);half4 color" 281"=$colorize_grad_tex(colorAndOffsetSampler,numStops,t);return $interpolated_to_rgb_unpremul" 282"(color,colorSpace,doUnpremul);}$pure half4 sk_conical_grad_buf_shader(float2" 283" coords,float radius0Param,float dRadiusParam,float aParam,float invAParam," 284"int numStops,int bufferOffset,int tileMode,int colorSpace,int doUnpremul,float" 285"[]colorAndOffsetData){float2 t=$conical_grad_layout(radius0Param,dRadiusParam" 286",aParam,invAParam,coords);t=$tile_grad(tileMode,t);half4 color=$colorize_grad_buf" 287"(colorAndOffsetData,bufferOffset,numStops,t);return $interpolated_to_rgb_unpremul" 288"(color,colorSpace,doUnpremul);}$pure half4 sk_matrix_colorfilter(half4 colorIn" 289",float4x4 m,float4 v,int inHSLA,int clampRGB){if(bool(inHSLA))colorIn=$rgb_to_hsl" 290"(colorIn.xyz,colorIn.w);else colorIn=unpremul(colorIn);half4 colorOut=half4" 291"(m*float4(colorIn)+v);if(bool(inHSLA))colorOut=$hsl_to_rgb(colorOut.xyz,colorOut" 292".w);else{if(bool(clampRGB))colorOut=saturate(colorOut);else colorOut.w=saturate" 293"(colorOut.w);colorOut.xyz*=colorOut.w;}return colorOut;}$pure half4 $noise_helper" 294"(half2 noiseVec,half2 stitchData,int stitching,sampler2D permutationSampler" 295"){const half kBlockSize=256.;half4 floorVal;floorVal.xy=floor(noiseVec);floorVal" 296".zw=floorVal.xy+half2(1.);if(bool(stitching))floorVal-=step(stitchData.xyxy" 297",floorVal)*stitchData.xyxy;half sampleX=sample(permutationSampler,float2(half2" 298"((floorVal.x+.5)*.00390625,.5))).x;half sampleY=sample(permutationSampler,float2" 299"(half2((floorVal.z+.5)*.00390625,.5))).x;half2 latticeIdx=half2(sampleX,sampleY" 300");if(sk_Caps.PerlinNoiseRoundingFix)latticeIdx=floor(latticeIdx*half2(255.)" 301"+half2(.5))*half2(.003921569);half4 noiseXCoords=kBlockSize*latticeIdx.xyxy" 302"+floorVal.yyww;noiseXCoords*=half4(.00390625);return noiseXCoords;}$pure half4" 303" $noise_function(half2 noiseVec,half4 noiseXCoords,sampler2D noiseSampler){" 304"half2 fractVal=fract(noiseVec);half2 noiseSmooth=smoothstep(0.,1.,fractVal)" 305";const half kInv256=.00390625;half4 result;for(int channel=0;channel<4;channel" 306"++){half chanCoord=(half(channel)+.5)*.25;half4 sampleA=sample(noiseSampler" 307",float2(float(noiseXCoords.x),float(chanCoord)));half4 sampleB=sample(noiseSampler" 308",float2(float(noiseXCoords.y),float(chanCoord)));half4 sampleC=sample(noiseSampler" 309",float2(float(noiseXCoords.w),float(chanCoord)));half4 sampleD=sample(noiseSampler" 310",float2(float(noiseXCoords.z),float(chanCoord)));half2 tmpFractVal=fractVal" 311";half u=dot((sampleA.yw+sampleA.xz*kInv256)*2.-1.,tmpFractVal);tmpFractVal." 312"x-=1.;half v=dot((sampleB.yw+sampleB.xz*kInv256)*2.-1.,tmpFractVal);half a=" 313"mix(u,v,noiseSmooth.x);tmpFractVal.y-=1.;v=dot((sampleC.yw+sampleC.xz*kInv256" 314")*2.-1.,tmpFractVal);tmpFractVal.x+=1.;u=dot((sampleD.yw+sampleD.xz*kInv256" 315")*2.-1.,tmpFractVal);half b=mix(u,v,noiseSmooth.x);result[channel]=mix(a,b," 316"noiseSmooth.y);}return result;}$pure half4 sk_perlin_noise_shader(float2 coords" 317",float2 baseFrequency,float2 stitchDataIn,int noiseType,int numOctaves,int stitching" 318",sampler2D permutationSampler,sampler2D noiseSampler){const int kFractalNoise" 319"=0;half2 noiseVec=half2((coords+.5)*baseFrequency);half4 color=half4(0.);half2" 320" stitchData=half2(stitchDataIn);half ratio=1.;for(int octave=0;octave<numOctaves" 321";++octave){half4 noiseXCoords=$noise_helper(noiseVec,stitchData,stitching,permutationSampler" 322");half4 tmp=$noise_function(noiseVec,noiseXCoords,noiseSampler);if(noiseType" 323"!=kFractalNoise)tmp=abs(tmp);color+=tmp*ratio;noiseVec*=half2(2.);ratio*=.5" 324";stitchData*=half2(2.);}if(noiseType==kFractalNoise)color=color*half4(.5)+half4" 325"(.5);color=saturate(color);return sk_premul_alpha(float4(color));}$pure half4" 326" sk_porter_duff_blend(half4 src,half4 dst,half4 coeffs){return blend_porter_duff" 327"(coeffs,src,dst);}$pure half4 sk_hslc_blend(half4 src,half4 dst,half2 flipSat" 328"){return blend_hslc(flipSat,src,dst);}$pure half4 sk_table_colorfilter(half4" 329" inColor,sampler2D s){half4 coords=unpremul(inColor)*.99609375+.001953125;half4" 330" color=half4(sample(s,float2(half2(coords.x,.375))).x,sample(s,float2(half2" 331"(coords.y,.625))).x,sample(s,float2(half2(coords.z,.875))).x,1.);return color" 332"*sample(s,float2(half2(coords.w,.125))).x;}$pure half4 sk_gaussian_colorfilter" 333"(half4 inColor){half factor=1.-inColor.w;factor=exp((-factor*factor)*4.)-.018" 334";return factor.xxxx;}$pure half4 sample_indexed_atlas(float2 textureCoords," 335"int atlasIndex,sampler2D atlas0,sampler2D atlas1,sampler2D atlas2,sampler2D" 336" atlas3){switch(atlasIndex){case 1:return sample(atlas1,textureCoords);case" 337" 2:return sample(atlas2,textureCoords);case 3:return sample(atlas3,textureCoords" 338");default:return sample(atlas0,textureCoords);}}$pure half3 $sample_indexed_atlas_lcd" 339"(float2 textureCoords,int atlasIndex,half2 offset,sampler2D atlas0,sampler2D" 340" atlas1,sampler2D atlas2,sampler2D atlas3){half3 distance=half3(1.);switch(" 341"atlasIndex){case 1:distance.x=sample(atlas1,float2(half2(textureCoords)-offset" 342")).x;distance.y=sample(atlas1,textureCoords).x;distance.z=sample(atlas1,float2" 343"(half2(textureCoords)+offset)).x;case 2:distance.x=sample(atlas2,float2(half2" 344"(textureCoords)-offset)).x;distance.y=sample(atlas2,textureCoords).x;distance" 345".z=sample(atlas2,float2(half2(textureCoords)+offset)).x;case 3:distance.x=sample" 346"(atlas3,float2(half2(textureCoords)-offset)).x;distance.y=sample(atlas3,textureCoords" 347").x;distance.z=sample(atlas3,float2(half2(textureCoords)+offset)).x;default" 348":distance.x=sample(atlas0,float2(half2(textureCoords)-offset)).x;distance.y" 349"=sample(atlas0,textureCoords).x;distance.z=sample(atlas0,float2(half2(textureCoords" 350")+offset)).x;}return distance;}$pure half4 bitmap_text_coverage_fn(half4 texColor" 351",int maskFormat){return maskFormat==$kMaskFormatA8?texColor.xxxx:texColor;}" 352"$pure half4 sdf_text_coverage_fn(half texColor,half2 gammaParams,float2 unormTexCoords" 353"){half dist=7.96875*(texColor-.5019608);dist-=gammaParams.x;half2 dist_grad" 354"=half2(dFdx(dist),dFdy(dist));half dg_len2=dot(dist_grad,dist_grad);dist_grad" 355"=dg_len2>=.0001?dist_grad*inversesqrt(dg_len2):half2(.7071);float2x2 jacobian" 356"=float2x2(dFdx(unormTexCoords),dFdy(unormTexCoords));half2 grad=half2(jacobian" 357"*float2(dist_grad));half approxFragWidth=.65*length(grad);if(gammaParams.y>" 358"0.)return saturate((dist+approxFragWidth)/(2.*approxFragWidth)).xxxx;else return" 359" smoothstep(-approxFragWidth,approxFragWidth,dist).xxxx;}$pure half4 sdf_text_lcd_coverage_fn" 360"(float2 textureCoords,half2 pixelGeometryDelta,half4 gammaParams,float2 unormTexCoords" 361",float texIndex,sampler2D atlas0,sampler2D atlas1,sampler2D atlas2,sampler2D" 362" atlas3){float2x2 jacobian=float2x2(dFdx(unormTexCoords),dFdy(unormTexCoords" 363"));half2 offset=half2(jacobian*float2(pixelGeometryDelta));half3 distance=$sample_indexed_atlas_lcd" 364"(textureCoords,int(texIndex),offset,atlas0,atlas1,atlas2,atlas3);half3 dist" 365"=half3(7.96875)*(distance-half3(.5019608));dist-=gammaParams.xyz;half2 dist_grad" 366"=half2(dFdx(dist.y),dFdy(dist.y));half dg_len2=dot(dist_grad,dist_grad);dist_grad" 367"=dg_len2>=.0001?dist_grad*inversesqrt(dg_len2):half2(.7071);half2 grad=half2" 368"(jacobian*float2(dist_grad));half3 approxFragWidth=(.65*length(grad)).xxx;if" 369"(gammaParams.w>0.)return half4(saturate(dist+approxFragWidth/(2.*approxFragWidth" 370")),1.);else return half4(smoothstep(-approxFragWidth,approxFragWidth,dist)," 371"1.);}$pure float $inverse_grad_len(float2 localGrad,float2x2 jacobian){float2" 372" devGrad=localGrad*jacobian;return inversesqrt(dot(devGrad,devGrad));}$pure" 373" float2 $elliptical_distance(float2 uv,float2 radii,float strokeRadius,float2x2" 374" jacobian){float2 invR2=1./(radii*radii+strokeRadius*strokeRadius);float2 normUV" 375"=invR2*uv;float invGradLength=$inverse_grad_len(normUV,jacobian);float f=(.5" 376"*invGradLength)*(dot(uv,normUV)-1.);float width=((radii.x*strokeRadius)*invR2" 377".x)*invGradLength;return float2(width-f,width+f);}void $corner_distance(inout" 378" float2 dist,float2x2 jacobian,float2 strokeParams,float2 cornerEdgeDist,float2" 379" xyFlip,float2 radii){float2 uv=radii-cornerEdgeDist;if(all(greaterThan(uv," 380"0..xx)))if(all(greaterThan(radii,0..xx))||strokeParams.x>0.&&strokeParams.y" 381"<0.){float2 d=$elliptical_distance(uv*xyFlip,radii,strokeParams.x,jacobian)" 382";d.y=radii.x-strokeParams.x<=0.?1.:-d.y;dist=min(dist,d);}else if(strokeParams" 383".y==0.){float bevelDist=((strokeParams.x-uv.x)-uv.y)*$inverse_grad_len(xyFlip" 384",jacobian);dist.x=min(dist.x,bevelDist);}}void $corner_distances(inout float2" 385" d,float2x2 J,float2 stroke,float4 edgeDists,float4 xRadii,float4 yRadii){$corner_distance" 386"(d,J,stroke,edgeDists.xy,-1..xx,float2(xRadii.x,yRadii.x));$corner_distance" 387"(d,J,stroke,edgeDists.zy,float2(1.,-1.),float2(xRadii.y,yRadii.y));$corner_distance" 388"(d,J,stroke,edgeDists.zw,1..xx,float2(xRadii.z,yRadii.z));$corner_distance(" 389"d,J,stroke,edgeDists.xw,float2(-1.,1.),float2(xRadii.w,yRadii.w));}$pure half4" 390" analytic_rrect_coverage_fn(float4 coords,float4 jacobian,float4 edgeDistances" 391",float4 xRadii,float4 yRadii,float2 strokeParams,float2 perPixelControl){if" 392"(perPixelControl.x>0.)return half4(1.);else if(perPixelControl.y>1.){float2" 393" outerDist=min(edgeDistances.xy,edgeDistances.zw);float c=min(outerDist.x,outerDist" 394".y)*coords.w;float scale=(perPixelControl.y-1.)*coords.w;float bias=coverage_bias" 395"(scale);return half(saturate(scale*(c+bias))).xxxx;}else{float2x2 J=float2x2" 396"(jacobian)*(1./coords.w);float2 invGradLen=float2($inverse_grad_len(float2(" 397"1.,0.),J),$inverse_grad_len(float2(0.,1.),J));float2 outerDist=invGradLen*(" 398"strokeParams.x+min(edgeDistances.xy,edgeDistances.zw));float2 d=float2(min(" 399"outerDist.x,outerDist.y),-1.);float scale;float bias;if(perPixelControl.x>-" 400".95){float2 dim=invGradLen*((edgeDistances.xy+edgeDistances.zw)+2.*strokeParams" 401".xx);scale=min(min(dim.x,dim.y),1.);bias=coverage_bias(scale);}else{float2 strokeWidth" 402"=(2.*strokeParams.x)*invGradLen;float2 innerDist=strokeWidth-outerDist;d.y=" 403"-max(innerDist.x,innerDist.y);if(strokeParams.x>0.){float narrowStroke=min(" 404"strokeWidth.x,strokeWidth.y);float2 strokeDim=mix(narrowStroke.xx,strokeWidth" 405",greaterThanEqual(innerDist,-.5.xx));scale=saturate(max(strokeDim.x,strokeDim" 406".y));bias=coverage_bias(scale);}else scale=(bias=1.);}$corner_distances(d,J" 407",strokeParams,edgeDistances,xRadii,yRadii);float outsetDist=min(perPixelControl" 408".y,0.)*coords.w;float finalCoverage=scale*(min(d.x+outsetDist,-d.y)+bias);return" 409" half(saturate(finalCoverage)).xxxx;}}$pure half4 per_edge_aa_quad_coverage_fn" 410"(float4 coords,float4 edgeDistances){float2 outerDist=min(edgeDistances.xy," 411"edgeDistances.zw);float c=min(outerDist.x,outerDist.y)*coords.w;return half" 412"(saturate(c)).xxxx;}$pure half4 circular_arc_coverage_fn(float4 circleEdge," 413"float3 clipPlane,float3 isectPlane,float3 unionPlane,float roundCapRadius,float4" 414" roundCapPos){float d=length(circleEdge.xy);half distanceToOuterEdge=half(circleEdge" 415".z*(1.-d));half edgeAlpha=saturate(distanceToOuterEdge);half distanceToInnerEdge" 416"=half(circleEdge.z*(d-circleEdge.w));half innerAlpha=saturate(distanceToInnerEdge" 417");edgeAlpha*=innerAlpha;half clip=half(saturate(circleEdge.z*dot(circleEdge" 418".xy,clipPlane.xy)+clipPlane.z));clip*=half(saturate(circleEdge.z*dot(circleEdge" 419".xy,isectPlane.xy)+isectPlane.z));clip=clip+half(saturate(circleEdge.z*dot(" 420"circleEdge.xy,unionPlane.xy)+unionPlane.z));half dcap1=half(circleEdge.z*(roundCapRadius" 421"-length(circleEdge.xy-roundCapPos.xy)));half dcap2=half(circleEdge.z*(roundCapRadius" 422"-length(circleEdge.xy-roundCapPos.zw)));half capAlpha=max(dcap1,0.)+max(dcap2" 423",0.);clip=saturate(clip+capAlpha);return(clip*edgeAlpha).xxxx;}$pure half4 $rect_blur_coverage_fn" 424"(float2 coords,float4 rect,half isFast,half invSixSigma,sampler2D integral)" 425"{half xCoverage;half yCoverage;if(isFast!=0.){half2 pos=max(half2(rect.xy-coords" 426"),half2(coords-rect.zw));xCoverage=sample(integral,float2(float(invSixSigma" 427"*pos.x),.5)).x;yCoverage=sample(integral,float2(float(invSixSigma*pos.y),.5" 428")).x;}else{half4 rect=half4(half2(rect.xy-coords),half2(coords-rect.zw));xCoverage" 429"=(1.-sample(integral,float2(float(invSixSigma*rect.x),.5)).x)-sample(integral" 430",float2(float(invSixSigma*rect.z),.5)).x;yCoverage=(1.-sample(integral,float2" 431"(float(invSixSigma*rect.y),.5)).x)-sample(integral,float2(float(invSixSigma" 432"*rect.w),.5)).x;}return(xCoverage*yCoverage).xxxx;}$pure half4 $circle_blur_coverage_fn" 433"(float2 coords,float4 circle,sampler2D blurProfile){float invTextureRadius=" 434"circle.z;float normSolidRadius=circle.w;half2 vec=half2((coords-circle.xy)*" 435"invTextureRadius);float dist=float(length(vec))-normSolidRadius;return sample" 436"(blurProfile,float2(dist,.5)).xxxx;}$pure half4 $rrect_blur_coverage_fn(float2" 437" coords,float4 proxyRect,half edgeSize,sampler2D ninePatch){float2 translatedFragPosFloat" 438"=coords-proxyRect.xy;float2 proxyCenter=(proxyRect.zw-proxyRect.xy)*.5;translatedFragPosFloat" 439"-=proxyCenter;half2 fragDirection=half2(sign(translatedFragPosFloat));translatedFragPosFloat" 440"=abs(translatedFragPosFloat);half2 translatedFragPosHalf=half2(translatedFragPosFloat" 441"-(proxyCenter-float(edgeSize)));translatedFragPosHalf=max(translatedFragPosHalf" 442",0.);translatedFragPosHalf*=fragDirection;translatedFragPosHalf+=edgeSize.xx" 443";half2 proxyDims=(2.*edgeSize).xx;half2 texCoord=translatedFragPosHalf/proxyDims" 444";return sample(ninePatch,float2(texCoord)).xxxx;}$pure half4 blur_coverage_fn" 445"(float2 coords,float4 shapeData,half2 blurData,int shapeType,sampler2D s){switch" 446"(shapeType){case 0:{return $rect_blur_coverage_fn(coords,shapeData,blurData" 447".x,blurData.y,s);}case 2:{return $circle_blur_coverage_fn(coords,shapeData," 448"s);}case 1:{return $rrect_blur_coverage_fn(coords,shapeData,blurData.x,s);}" 449"}return half4(0.);}"; 450