I started having this issue several weeks ago. At first I ussumed it was related to Adobe Flash since it presented itself when I was viewing video content in Safari. I uninstalled Flash, Silverlight and so forth.
When it reapppeared and progressively worsened I decided to take it to my friendly Authorised Apple Service Center (The local Apple Store is far too busy). They attempted to diagnose the issue, possibly hardware, using all thier catchy tools.
I noticed it was online Thursday night in Finder so I thought I'd screen share into it from home.
The odd thing, while dinkering around on it remotely, the grid of square dots presented themselves via the remote session. That did not seem like hardware to me but I do not know how these things work with regard to how the remote session is streamed out from Remote login/Screen Sharing (Yes, BTMM worked!)
Seeing that and explaining it to the repair tech confirmed to him what Apple reported during his troubleshooting with them.
They suspected I had an anamoluos Kernel extension (insert techno-jabber here). Apple recommended I install a clean copy of OS X and I did. I was weary of restoring from Time Machine during the install process so I opted for the Migration Assistant post-install. It's been over 48 hours and no sign yet of the issue, fingers crossed.
I hope this corrected my issue, I'll post an update in a few weeks if anyone wants a followup.
Hardware Details:
Running 10.8.4
Model Name: iMac
Model Identifier: iMac12,1
Processor Name: Intel Core i5
Processor Speed: 2.7 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Memory: 16 GB
Boot ROM Version: IM121.0047.B1F
SMC Version (system): 1.71f21
AMD Radeon HD 6770M:
Chipset Model: AMD Radeon HD 6770M
Type: GPU
Bus: PCIe
PCIe Lane Width: x16
VRAM (Total): 512 MB
Vendor: ATI (0x1002)
Device ID: 0x6740
Revision ID: 0x0000
ROM Revision: 113-C0170C-170
EFI Driver Version: 01.00.544
Displays:
iMac:
Display Type: LCD
Resolution: 1920 x 1080
Pixel Depth: 32-Bit Color (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Built-In: Yes
Connection Type: DisplayPort