59198b8ab8
The Cogl atlas code was using _cogl_texture_prepare_for_upload with a NULL pointer for the dst_bmp to determine the internal format of the texture without converting the bitmap. It needs to do this to decide whether the texture will go in the atlas before wasting time on the conversion. This use of the function is a little confusing so that part of it has been split out into a new function called _cogl_texture_determine_internal_format. The code to decide whether a premult conversion is needed has also been split out.