texture-pixmap-x11: initialize ->use_winsys_texture

This ensures that tex_pixmap->use_winsys_texture is always initialized
during cogl_texture_pixmap_x11_new - either according to the result of
winsys->texture_pixmap_x11_create, or if the winsys doesn't support tfp
we explicitly initialize to FALSE.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg 2011-07-15 19:35:55 +01:00
parent 231be91fb0
commit c058b50ac0

View File

@ -329,7 +329,12 @@ cogl_texture_pixmap_x11_new (guint32 pixmap,
winsys = _cogl_texture_pixmap_x11_get_winsys (tex_pixmap);
if (winsys->texture_pixmap_x11_create)
{
tex_pixmap->use_winsys_texture =
winsys->texture_pixmap_x11_create (tex_pixmap);
}
else
tex_pixmap->use_winsys_texture = FALSE;
return _cogl_texture_pixmap_x11_handle_new (tex_pixmap);
}