             draw_solid_border(vDistanceFromMixLine, local_pos);
             break;
         case BORDER_STYLE_DOUBLE:
-            discard_pixels_in_rounded_borders(local_pos);
-            draw_double_border();
+            draw_double_border(local_pos);
             break;
         default:
             discard;

  // it between the limits accepted by `mix`.
  float colorMix = min(max(distanceFromMixLine / pixelsPerFragment, -0.5), 0.5) + 0.5;
  return mix(vHorizontalColor, vVerticalColor, colorMix);
}

#ifdef WR_FEATURE_TRANSFORM

  }
}

void draw_double_border(vec2 localPos) {
  float pixelsPerFragment = length(fwidth(localPos.xy));
  switch (vBorderPart) {
    // These are the layer tile part PrimitivePart as uploaded by the tiling.rs
    case PST_TOP_LEFT:
