xephyr: Build support for rendering with glamor using a -glamor option.

v2: Avoid making the Ximage for the screen that we'll never use, and
    drive the screen pixmap creation for glamor ourselves.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com> (v1)
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Eric Anholt
2013-12-18 13:24:14 -08:00
parent b634e90989
commit 9fe052d90c
10 changed files with 569 additions and 15 deletions

View File

@@ -123,6 +123,17 @@ glamor_set_screen_pixmap(PixmapPtr screen_pixmap, PixmapPtr *back_pixmap)
glamor_priv->back_pixmap = back_pixmap;
}
uint32_t
glamor_get_pixmap_texture(PixmapPtr pixmap)
{
glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
if (pixmap_priv->type != GLAMOR_TEXTURE_ONLY)
return 0;
return pixmap_priv->base.fbo->tex;
}
PixmapPtr
glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
unsigned int usage)

View File

@@ -124,6 +124,8 @@ extern _X_EXPORT Bool glamor_close_screen(ScreenPtr screen);
extern _X_EXPORT void glamor_set_screen_pixmap(PixmapPtr screen_pixmap,
PixmapPtr *back_pixmap);
extern _X_EXPORT uint32_t glamor_get_pixmap_texture(PixmapPtr pixmap);
/* @glamor_glyphs_init: Initialize glyphs internal data structures.
*
* @pScreen: Current screen pointer.