Damping rates of solar-like oscillations across the HR diagram - Theoretical calculations confronted to CoRoT and Kepler observations