From 08b8b2791f91770d1a6e7aff163167d003b0fad3 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 19 Jan 2010 17:06:28 +0000 Subject: [PATCH] cogl-atlas-texture: Don't create atlas textures with the premult bit Previously the atlas textures were being created with whatever format the first sub texture is in. Only three formats are supported so this only matters if the first texture is a premultiplied alpha texture. Instead it now masks out the premultiplied bit so that the textures are always either RGB_888 or RGBA_8888. --- clutter/cogl/cogl/cogl-atlas-texture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clutter/cogl/cogl/cogl-atlas-texture.c b/clutter/cogl/cogl/cogl-atlas-texture.c index 1400919d5..202f1e41a 100644 --- a/clutter/cogl/cogl/cogl-atlas-texture.c +++ b/clutter/cogl/cogl/cogl-atlas-texture.c @@ -1015,7 +1015,8 @@ _cogl_atlas_texture_new_from_bitmap (CoglHandle bmp_handle, atlas_tex->rectangle.height = upload_data.bitmap.height + 2; /* Try to make some space in the atlas for the texture */ - if (!_cogl_atlas_texture_reserve_space (internal_format, + if (!_cogl_atlas_texture_reserve_space (internal_format & + ~COGL_PREMULT_BIT, atlas_ptr, atlas_tex_ptr, atlas_tex,