mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-31 02:50:00 +00:00
glamor: Add glamor_egl_untexture_pixmap
Undoes `glamor_egl_create_textured_pixmap_from_gbm_bo` and friends Signed-off-by: stefan11111 <stefan11111github@gmail.com>
This commit is contained in:
parent
197b230e18
commit
e6a027c5ad
4 changed files with 17 additions and 0 deletions
|
|
@ -138,6 +138,10 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
|
|||
glamor_destroy_fbo(glamor_priv, fbo);
|
||||
}
|
||||
|
||||
if (!tex) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
fbo = glamor_create_fbo_from_tex(glamor_priv, pixmap,
|
||||
pixmap->drawable.width,
|
||||
pixmap->drawable.height, tex, 0);
|
||||
|
|
|
|||
|
|
@ -655,6 +655,14 @@ glamor_egl_create_textured_pixmap_from_gbm_bo(PixmapPtr pixmap,
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
glamor_egl_untexture_pixmap(PixmapPtr pixmap, int type)
|
||||
{
|
||||
glamor_egl_set_pixmap_image(pixmap, EGL_NO_IMAGE_KHR, FALSE /* used_modifiers */);
|
||||
glamor_set_pixmap_texture(pixmap, 0);
|
||||
glamor_set_pixmap_type(pixmap, type);
|
||||
}
|
||||
|
||||
#if defined(GLAMOR_HAS_GBM) && defined(WITH_LIBDRM)
|
||||
static void
|
||||
glamor_get_name_from_bo(int gbm_fd, struct gbm_bo *bo, int *name)
|
||||
|
|
|
|||
|
|
@ -131,4 +131,8 @@ glamor_egl_get_display(EGLint type, void *native)
|
|||
|
||||
int glamor_egl_get_fd(ScreenPtr screen);
|
||||
|
||||
/* This should probably be _X_EXPORT'ed */
|
||||
void
|
||||
glamor_egl_untexture_pixmap(PixmapPtr pixmap, int type);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -279,6 +279,7 @@ glamor_pixmap_detach_fbo(glamor_pixmap_private *pixmap_priv)
|
|||
return NULL;
|
||||
|
||||
pixmap_priv->fbo = NULL;
|
||||
pixmap_priv->gl_fbo = GLAMOR_FBO_UNATTACHED;
|
||||
return fbo;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue