CGBitmapContextCreateImage uses vm_copy which ends up being
slower than memcpy if we actually need to make a copy. Further,
since it does the copy by pagefaulting, it's shows up poorly
on profiles. Since, we already manually track modification we
don't really have need for the copy-on-write semantics. This
change ensures that we'll only use memcpy when we need to make
a copy.
--HG--
extra : rebase_source : 93afb1423605a13cb4c76a6c389e1989aa814ae0
This has big improvement in the performance of GetImageData() because
we make the snapshot lazily instead of using the vm_copy() method
of CGBitmapContextCreateImage()