Does the photon get perturbed on its travels or is its speed constant?

When a photon enters glass (or anything denser than a vacuum), its speed slows down.

When you measure the speed of light in a vacuum, in your laboratory, it always travels at c.

However, as I understand it, if light travels through a deep gravitational well, far from your laboratory, it will seem to be traveling slower than c. Similarly, if you are in a deep gravitational well, and you observe the effects of light far outside the gravitational well, it will seem to be traveling faster than c.