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:
Owen W. Taylor 2010-03-01 13:54:03 -05:00 committed by Neil Roberts
parent 84223c855d
commit d29b3c8f81

View File

@ -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,