Recently my couple year old MacBook Pro has been acting up strangely. I generally use it for watching videos. After about half an hour or so of activity, the screen starts to look like this:

Usually it freezes and stops becoming responsive (mainly with full screen videos), but at times I am able to move a cursor around and so forth. The issue also appears if I restart it afterwards.
I'm thinking it might have something to do with overheating internally or something, but I'm not sure.
Does anyone know what is causing this problem, and how can I solve it?