mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
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
74a27bbb1c
commit
0baeabc2aa
@ -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);
|
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,
|
if (!_cogl_texture_prepare_for_upload (bmp,
|
||||||
internal_format,
|
internal_format,
|
||||||
&internal_format,
|
&internal_format,
|
||||||
|
Loading…
Reference in New Issue
Block a user