clutter-offscreen-effect: Allocate the cogl texture directly
Cogl now lazy loads the textures so we cannot rely on getting NULL from cogl_texture_new_with_size so we have to allocate it by ourselves. https://bugzilla.redhat.com/show_bug.cgi?id=975171
This commit is contained in:
parent
8ac9346046
commit
180e7d74f3
@ -139,9 +139,21 @@ clutter_offscreen_effect_real_create_texture (ClutterOffscreenEffect *effect,
|
|||||||
gfloat width,
|
gfloat width,
|
||||||
gfloat height)
|
gfloat height)
|
||||||
{
|
{
|
||||||
return cogl_texture_new_with_size (MAX (width, 1), MAX (height, 1),
|
CoglError *error = NULL;
|
||||||
COGL_TEXTURE_NO_SLICING,
|
CoglHandle texture = cogl_texture_new_with_size (MAX (width, 1), MAX (height, 1),
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE);
|
COGL_TEXTURE_NO_SLICING,
|
||||||
|
COGL_PIXEL_FORMAT_RGBA_8888_PRE);
|
||||||
|
|
||||||
|
if (!cogl_texture_allocate (texture, &error))
|
||||||
|
{
|
||||||
|
#if CLUTTER_ENABLE_DEBUG
|
||||||
|
g_warning ("Unable to allocate texture for offscreen effect: %s", error->message);
|
||||||
|
#endif /* CLUTTER_ENABLE_DEBUG */
|
||||||
|
cogl_error_free (error);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user