Figured out what it was. Switching from discrete to integrated graphics card while Firefox was opened caused the artifacting.
Here's an explanation from Cody, the make of gfxCardStatus:
"It's really not a good idea to switch GPUs while applications are open if you know that they have the potential to use the discrete GPU. Firefox, Twitter for Mac, Chrome, Spotify, Photoshop, etc. are all examples of this. It's a different story if you're just running Terminal, TextEdit, Finder, etc., as those don't ever use the discrete GPU.
What is happening is that Flash is actually still rendering on one GPU, while another is being used to draw the rest of the screen. Then you get weird artifacts on the screen where it can't figure out what to draw. There's really no way around it other than to avoid switching."