OpenRA/OpenRA — pull request #5601 by RoosterDragon (2014-06-11 02:38:01+00:00)
Title: Sped up creation of sheets constructed from file

Switched to Marshal.Copy to speed up creating sheets from file, which should help startup times a tiny bit.

I tested the AsBitmap methods just to ensure the output was the same and they're good as far as I can tell.

I was originally going to include this under #5484 but the conversion threw me off a bit. It wanted to ensure a BGRA order in memory for the bytes, but everywhere else was respecting the machine endianness. (LockBits and Color respect the machine endianness, and everything else that seems to use those methods just appears to go with it). It's only important if you support big-endian machines (since I may have broken something in that case) but I'm running with the assumption you don't. If indeed you don't you can ignore my rambling here.