I know its a late reply but I have solved my iMac 27" 2010 with Radeon 5750 video card.
I had a kernel leak or something due to an error/fault in both Sophos (anti-virus) and also Little snitch (free). I deleted sophos and it was better. I still had green and purple squares on my screen and then i downloaded the little snitch installer/uninstaller and removed it. After my next full power cycle/restart it was cleared.
I had to remember what the last few programs I had altered or installed. I had both these programs installed for over 5 months. So, it took 6 months to fail on my computer.
If you think you have some kind of junk/spam/virus/firewall programs that control a lot of behind the scenes stuff, please erase it and re-install it or use something else.
12 hours in and still no more green and purple squares! The squares ended up being permanently there and changed when i vigorously waved my mouse or adjusted the screen brightness. it would eventually crash my imacs video card and everything else would still work in the background (plex, media server - music, itunes - etc)