mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
cogl-texture-2d-sliced: Don't create the slice textures twice
Both of the cogl_texture_2d_sliced_new functions called the slices_create function which creates the underlying GL textures. However this was also called by init_base so the textures would end up being created twice. This would make it leak the GL textures and the arrays which point to them.
This commit is contained in:
parent
c4638fa1df
commit
51b090541a
@ -1052,17 +1052,6 @@ _cogl_texture_2d_sliced_new_with_size (unsigned int width,
|
||||
return COGL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (!_cogl_texture_2d_sliced_slices_create (tex_2ds,
|
||||
width,
|
||||
height,
|
||||
gl_intformat,
|
||||
gl_format,
|
||||
gl_type))
|
||||
{
|
||||
_cogl_texture_2d_sliced_free (tex_2ds);
|
||||
return COGL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
tex_2ds->auto_mipmap = (flags & COGL_TEXTURE_NO_AUTO_MIPMAP) == 0;
|
||||
|
||||
return _cogl_texture_2d_sliced_handle_new (tex_2ds);
|
||||
@ -1121,13 +1110,6 @@ _cogl_texture_2d_sliced_new_from_bitmap (CoglBitmap *bmp,
|
||||
internal_format))
|
||||
goto error;
|
||||
|
||||
if (!_cogl_texture_2d_sliced_slices_create (tex_2ds,
|
||||
width, height,
|
||||
gl_intformat,
|
||||
gl_format,
|
||||
gl_type))
|
||||
goto error;
|
||||
|
||||
if (!_cogl_texture_2d_sliced_upload_to_gl (tex_2ds,
|
||||
dst_bmp,
|
||||
gl_intformat,
|
||||
|
Loading…
Reference in New Issue
Block a user