diff options
Diffstat (limited to 'cogl/cogl-atlas-texture.c')
-rw-r--r-- | cogl/cogl-atlas-texture.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/cogl/cogl-atlas-texture.c b/cogl/cogl-atlas-texture.c index 93a24232..4c955f46 100644 --- a/cogl/cogl-atlas-texture.c +++ b/cogl/cogl-atlas-texture.c @@ -677,9 +677,7 @@ _cogl_atlas_texture_create_base (CoglContext *ctx, CoglAtlasTexture * cogl_atlas_texture_new_with_size (CoglContext *ctx, int width, - int height, - CoglPixelFormat internal_format, - CoglError **error) + int height) { CoglTextureLoader *loader; @@ -693,7 +691,8 @@ cogl_atlas_texture_new_with_size (CoglContext *ctx, loader->src.sized.height = height; return _cogl_atlas_texture_create_base (ctx, width, height, - internal_format, loader); + COGL_PIXEL_FORMAT_RGBA_8888_PRE, + loader); } static CoglBool @@ -880,11 +879,9 @@ _cogl_atlas_texture_allocate (CoglTexture *tex, g_return_val_if_reached (FALSE); } -CoglAtlasTexture * +static CoglAtlasTexture * _cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp, - CoglPixelFormat internal_format, - CoglBool can_convert_in_place, - CoglError **error) + CoglBool can_convert_in_place) { CoglTextureLoader *loader; @@ -898,17 +895,14 @@ _cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp, return _cogl_atlas_texture_create_base (_cogl_bitmap_get_context (bmp), cogl_bitmap_get_width (bmp), cogl_bitmap_get_height (bmp), - internal_format, + cogl_bitmap_get_format (bmp), loader); } CoglAtlasTexture * -cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp, - CoglPixelFormat internal_format, - CoglError **error) +cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp) { - return _cogl_atlas_texture_new_from_bitmap (bmp, internal_format, - FALSE, error); + return _cogl_atlas_texture_new_from_bitmap (bmp, FALSE); } CoglAtlasTexture * @@ -916,7 +910,6 @@ cogl_atlas_texture_new_from_data (CoglContext *ctx, int width, int height, CoglPixelFormat format, - CoglPixelFormat internal_format, int rowstride, const uint8_t *data, CoglError **error) @@ -938,7 +931,7 @@ cogl_atlas_texture_new_from_data (CoglContext *ctx, rowstride, (uint8_t *) data); - atlas_tex = cogl_atlas_texture_new_from_bitmap (bmp, internal_format, error); + atlas_tex = cogl_atlas_texture_new_from_bitmap (bmp); cogl_object_unref (bmp); @@ -955,7 +948,6 @@ cogl_atlas_texture_new_from_data (CoglContext *ctx, CoglAtlasTexture * cogl_atlas_texture_new_from_file (CoglContext *ctx, const char *filename, - CoglPixelFormat internal_format, CoglError **error) { CoglBitmap *bmp; @@ -968,9 +960,7 @@ cogl_atlas_texture_new_from_file (CoglContext *ctx, return NULL; atlas_tex = _cogl_atlas_texture_new_from_bitmap (bmp, - internal_format, - TRUE, /* convert in-place */ - error); + TRUE); /* convert in-place */ cogl_object_unref (bmp); |