Commit 9e37e41f authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Adam Jackson

glamor: return status from `glamor_set_pixmap_texture()`

Chnage the API for `glamor_set_pixmap_texture()` to return a status,
so that the caller can know whether it succeeded or not.
Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
parent fc6380a1
......@@ -99,7 +99,7 @@ glamor_set_pixmap_type(PixmapPtr pixmap, glamor_pixmap_type_t type)
glamor_init_pixmap_private_small(pixmap, pixmap_priv);
}
_X_EXPORT void
_X_EXPORT Bool
glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
{
ScreenPtr screen = pixmap->drawable.pScreen;
......@@ -121,10 +121,12 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
if (fbo == NULL) {
ErrorF("XXX fail to create fbo.\n");
return;
return FALSE;
}
glamor_pixmap_attach_fbo(pixmap, fbo);
return TRUE;
}
uint32_t
......
......@@ -110,7 +110,7 @@ extern _X_EXPORT Bool glamor_close_screen(ScreenPtr screen);
extern _X_EXPORT uint32_t glamor_get_pixmap_texture(PixmapPtr pixmap);
extern _X_EXPORT void glamor_set_pixmap_texture(PixmapPtr pixmap,
extern _X_EXPORT Bool glamor_set_pixmap_texture(PixmapPtr pixmap,
unsigned int tex);
extern _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap,
......
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