Were swimming - the past perfect continuous had become - the past perfect continuous
Had swum - had been swimming