I used to have the same machine, and this happened occasionally.
I used to think it was heat related because if I used SMCfancontrol to keep the fans up and he temp down, it seemed to not happen... but after awhile it started happening again.... I could easily go in System Preferences and change the resolution to another resolution for a moment, then switch it back and everything worked fine again. if it happened every day, I'm sure I would have worried about it, but it only happened maybe once every 2 weeks or so.