Bug 1049138 - Use the cairo surface format to determine gfx format when able r=jmuizelaar

--HG--
extra : histedit_source : 9027bee76ab792d29a920bffb6443f40e6a35e13