glamor: Eliminate GLAMOR_CREATE_PIXMAP_MAP and GLAMOR_MEMORY_MAP
GLAMOR_MEMORY_MAP was only used with GLAMOR_CREATE_PIXMAP_MAP, and GLAMOR_CREATE_PIXMAP_MAP doesn't appear to be used anywhere, so just remove both of them. v2: Fix a stray whitespace bug that was introduced (change by anholt). Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
0e1372e1bd
commit
28ff815c4b
|
@ -169,9 +169,6 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
|
|||
}
|
||||
glamor_set_pixmap_private(pixmap, pixmap_priv);
|
||||
|
||||
if (usage == GLAMOR_CREATE_PIXMAP_MAP)
|
||||
type = GLAMOR_MEMORY_MAP;
|
||||
|
||||
pixmap_priv->base.pixmap = pixmap;
|
||||
pixmap_priv->base.glamor_priv = glamor_priv;
|
||||
|
||||
|
@ -188,7 +185,7 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
|
|||
pixmap_priv->base.box.y2 = h;
|
||||
return pixmap;
|
||||
}
|
||||
else if (type == GLAMOR_MEMORY_MAP || usage == GLAMOR_CREATE_NO_LARGE ||
|
||||
else if (usage == GLAMOR_CREATE_NO_LARGE ||
|
||||
glamor_check_fbo_size(glamor_priv, w, h))
|
||||
{
|
||||
pixmap_priv->type = type;
|
||||
|
|
|
@ -53,7 +53,6 @@ struct glamor_context;
|
|||
*/
|
||||
typedef enum glamor_pixmap_type {
|
||||
GLAMOR_MEMORY,
|
||||
GLAMOR_MEMORY_MAP,
|
||||
GLAMOR_TEXTURE_DRM,
|
||||
GLAMOR_SEPARATE_TEXTURE,
|
||||
GLAMOR_DRM_ONLY,
|
||||
|
@ -142,7 +141,6 @@ extern _X_EXPORT Bool glamor_destroy_pixmap(PixmapPtr pixmap);
|
|||
#define GLAMOR_CREATE_PIXMAP_CPU 0x100
|
||||
#define GLAMOR_CREATE_PIXMAP_FIXUP 0x101
|
||||
#define GLAMOR_CREATE_FBO_NO_FBO 0x103
|
||||
#define GLAMOR_CREATE_PIXMAP_MAP 0x104
|
||||
#define GLAMOR_CREATE_NO_LARGE 0x105
|
||||
#define GLAMOR_CREATE_PIXMAP_NO_TEXTURE 0x106
|
||||
|
||||
|
|
|
@ -241,12 +241,6 @@ glamor_create_fbo_from_tex(glamor_screen_private *glamor_priv,
|
|||
fbo->format = format;
|
||||
fbo->glamor_priv = glamor_priv;
|
||||
|
||||
if (flag == GLAMOR_CREATE_PIXMAP_MAP) {
|
||||
glamor_make_current(glamor_priv);
|
||||
glGenBuffers(1, &fbo->pbo);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (flag != GLAMOR_CREATE_FBO_NO_FBO) {
|
||||
if (glamor_pixmap_ensure_fb(fbo) != 0) {
|
||||
glamor_purge_fbo(fbo);
|
||||
|
@ -254,7 +248,6 @@ glamor_create_fbo_from_tex(glamor_screen_private *glamor_priv,
|
|||
}
|
||||
}
|
||||
|
||||
done:
|
||||
return fbo;
|
||||
}
|
||||
|
||||
|
@ -367,9 +360,6 @@ glamor_create_fbo(glamor_screen_private *glamor_priv,
|
|||
if (flag == GLAMOR_CREATE_FBO_NO_FBO)
|
||||
goto new_fbo;
|
||||
|
||||
if (flag == GLAMOR_CREATE_PIXMAP_MAP)
|
||||
goto no_tex;
|
||||
|
||||
/* Tiling from textures requires exact pixmap sizes. As we don't
|
||||
* know which pixmaps will be used as tiles, just allocate
|
||||
* everything at the requested size
|
||||
|
@ -381,7 +371,6 @@ glamor_create_fbo(glamor_screen_private *glamor_priv,
|
|||
return fbo;
|
||||
new_fbo:
|
||||
tex = _glamor_create_tex(glamor_priv, w, h, format);
|
||||
no_tex:
|
||||
fbo = glamor_create_fbo_from_tex(glamor_priv, w, h, format, tex, flag);
|
||||
|
||||
return fbo;
|
||||
|
@ -513,7 +502,6 @@ glamor_pixmap_attach_fbo(PixmapPtr pixmap, glamor_pixmap_fbo *fbo)
|
|||
/* XXX For the Xephyr only, may be broken now. */
|
||||
pixmap_priv->base.gl_tex = 0;
|
||||
}
|
||||
case GLAMOR_MEMORY_MAP:
|
||||
pixmap->devPrivate.ptr = NULL;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue
Block a user