AnalyticalGraphicsInc/cesium — pull request #1590 by kring (2014-03-30 23:44:47+00:00)
Title: Optimization for imagery providers without alpha channel

This changes gives imagery providers a way to indicate that their images never have an alpha channel by returning false from the new `hasAlphaChannel` property. When an imagery provider does not include an alpha channel, its images are uploaded as `PixelFormat.RGB` instead of `PixelFormat.RGBA`, reducing texture memory usage by 25% and improving upload performance by 15-20% on my system (http://jsperf.com/upload-rgb-texture-with-teximage2d-as-rgb-or-rgba/6). Currently only `BingMapsImageryProvider` returns false from `hasAlphaChannel`.

As far as I can tell, browsers don't give us any way to determine if an `HTMLImageElement` includes an alpha channel, even though this is completely ridiculous. Please let me know if I'm wrong and I'll be very happy.