What is your goal in asking? Are you looking to debug something, or are you looking for guidance on implementing tile animations in your own code?
The actual code is here:
As you can see, it does just scan over the whole map and call
advanceAnimation(time) for every tile, which does nothing for non-animated tiles.
advanceAnimation() returns a boolean in case it was animated, and if more than one time was animated in total, Tiled refreshes the view.
As you can also see in the comments, this code could be improved by keeping a list of all the animated tiles and only looping through that. In my game engine, that’s what I do. When the map is loaded, I scan through it once to find all the instances of each animated tile. I end up with a list of different animations, each of those has a list of instances using that animation. Then, when I update the animation, I only need to update the timers for those general animations, calculate what frame(s) they’re on, and update all their instances, which is much more efficient than scanning the entire map and updating potentially thousands of independent timers.