Yellow pattern all over application windows I've been using my iMac (mid-2011, OS X Yosemite 10.10.1) without any problems since I purhaced it. However, today a distracting yellow square pattern started to appear. It only appears over application windows, ie. I can't see any pattern over my desktop, but my browser is covered with it. It doesn't appear on every window, but almost all of them. The pattern moves if I scroll and it does change if I refresh a webpage. It also appears on screenshots I take.

I've tried rebooting and updating my OS without any change.

Example screenshot:



What could cause this and is there anything I can do to fix it?

Update #1 All application windows (including OpenGL games) are either distorted or covered with yellow pattern. I said earlier that not all windows were affected, but I was wrong.

Update #2 Opening my computer using safe mode (pressing shift key right after the boot up sound) removes the yellow pattern, but introduces another screen bug. Now the windows are flashing. A white bar starts from the bottom of the window and moves to the top (at least 2-3 times per second).
It seems to be a GPU problem.

Apple introduced Repair Extension program for some iMacs sold between May 2011 and October 2012. It is not on main Repair programs site though.

The affected iMacs contain serial numbers with the last four characters of DHJQ, DHJW, DL8Q, DNGH, DNJ9, DMW8, DPM1, DPM2, DPNV, DNY0, DRVP, DY6F, or F610. Source

Check with this numbers and Apple to get a repair.