xwayland: check glamor_set_pixmap_texture() status

With `glamor_set_pixmap_texture()` returning its status, remove the hack
and use the return value.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
Olivier Fourdan 2019-03-12 17:25:41 +01:00 committed by Adam Jackson
parent 9e37e41fa7
commit 48f4ab7509

View File

@ -183,11 +183,7 @@ xwl_glamor_gbm_create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo,
glBindTexture(GL_TEXTURE_2D, 0);
glamor_set_pixmap_texture(pixmap, xwl_pixmap->texture);
/* `set_pixmap_texture()` may fail silently if the FBO creation failed,
* so we check again the texture to be sure it worked.
*/
if (!glamor_get_pixmap_texture(pixmap))
if (!glamor_set_pixmap_texture(pixmap, xwl_pixmap->texture))
goto error;
glamor_set_pixmap_type(pixmap, GLAMOR_TEXTURE_DRM);