propriate part of the 9-patch blur texture by
            // snipping out the middle section of the proxy rect.
            float2 translatedFragPosFloat = sk_FragCoord.xy - proxyRect.LT;
            float2 proxyCenter = (proxyRect.RB - proxyRect.LT) * 0.5;
            half edgeSize = 2.0 * blurRadius + cornerRadius + 0.5;

            // Position the fragment so that (0, 0) marks the center of the proxy rectangle.
            // Negative coordinates are on the left/top side and positive numbers are on the
            // right/bottom.
            translatedFragPosFloat -= proxyCenter;

            // Temporarily strip off the fragment's sign. x/y are now strictly increasing as we
            // move away from the center.
            half2 fragDirection = half2(sign(translatedFragPosFloat));
            translatedFragPosFloat = abs(translatedFragPosFloat);

            // Our goal is to snip out the "middle section" of the proxy rect (everything but the
            // edge). We've repositioned our fragment position so that (0, 0) is the centerpoint
            // and x/y are always positive, so we can subtract here and interpret negative results
            // as being within the middle section.
            half2 translatedFragPosHalf = half2(translatedFragPosFloat - (proxyCenter - edgeSize));

            // Remove the middle section by clamping to zero.
            translatedFragPosHalf = max(translatedFragPosHalf, 0);

            // Reapply the fragment's sign, so that negative coordinates once again mean left/top
            // side and positive means bottom/right side.
            translatedFragPosHalf *= fragDirection;

            // Offset the fragment so that (0, 0) marks the upper-left again, instead of the center
            // point.
            translatedFragPosHalf += half2(edgeSize);

            half2 proxyDims = half2(2.0 * edgeSize);
            half2 texCoord = translatedFragPosHalf / proxyDims;

            return inColor * ninePatchFP.eval(texCoord).a;
        }
    