Fall back in _cogl_texture_2d_new_from_bitmap()
Just like _cogl_texture_2d_new_with_size(), _cogl_texture_2d_new_from_bitmap() needs to check if an unsliced texture can be created at the given size, or if hardware limitations prevent this. http://bugzilla.openedhand.com/show_bug.cgi?id=2014 Signed-off-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
84223c855d
commit
d29b3c8f81
@ -286,6 +286,9 @@ _cogl_texture_2d_new_from_bitmap (CoglHandle bmp_handle,
|
||||
|
||||
g_return_val_if_fail (bmp_handle != COGL_INVALID_HANDLE, COGL_INVALID_HANDLE);
|
||||
|
||||
if (!_cogl_texture_2d_can_create (bmp->width, bmp->height, internal_format))
|
||||
return COGL_INVALID_HANDLE;
|
||||
|
||||
if (!_cogl_texture_prepare_for_upload (bmp,
|
||||
internal_format,
|
||||
&internal_format,
|
||||
|
Loading…
Reference in New Issue
Block a user