When using flash player inside chrome, after a while the dock icons become semi-transparent and sometimes a black box will appear on the desktop. With regards to the black box, It stays behind all windows (I can hover a window over it to hide it) and it only remains on the desktop wallpaper. Once I stop using flash player, the dock returns back to normal, but I have to switch wallpapers for the black box to disappear. I haven't noticed it with Safari, but it's possible that it could still occur with extended use.
I've tried installing a fresh copy of Mountain Lion but the same thing happens. I also ran a hardware test which showed no issues. Could this be down to software (flash)?

I've tried installing a fresh copy of Mountain Lion but the same thing happens. I also ran a hardware test which showed no issues. Could this be down to software (flash)?