Lion bug. Happened on both 2011 27" iMacs I had (3.4ghz, 4gb, 256ssd+1tb, 6970m 2gb). It happened whenever I watched a hd video on youtube, quicktime or itunes.
I used to get artifacts like that when my PC's GPU and vram heats up too much from over clocking. I suspect it could be an overheating issue or driver related problems like jackoatmon said.
Pretty sure it's not heating issues. I did a good amount of testing and managed to get artifacts under low workloads/low heats.
The reason I speculate that it's driver related is that it seems to be most easily activate by putting flash video into fullscreen mode (not the Lion native fullscreen, but a non-native one version - say a video player on a website or whatever). This points to a firmwear issue rather than a hardware issue.
Hence, I wouldn't worry about it. It will likely get fixed in some future combination of OSX/Radeon drivers.
There's a 13 Page forum post on the issue. I occasionally get those on my dashboard and most people have concluded that it is a lion/software issue and not GPU. Hopefully a software update will fix it.
OK this is good news. At least for me, because I would hate to have go though the hassle of the exchange process for my new iMac. The screen is perfect on this one.
I get similar artifacting. Like others stated, mostly when watching HD videos. I found that logging out and then back in corrects the issues. IMO it's a driver issue.
Definetely a LION related issue. I get the first one you posted on my iMac 27 i7 and the second you posted on my 2009 Mac Pro. Hopefully they will sort this out for a update soon.