Speedo has agreed a supply deal with struggling Spanish textiles group Dogi.