Commit 48f4ab75 authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Adam Jackson

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: default avatarOlivier Fourdan <ofourdan@redhat.com>
parent 9e37e41f
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment