summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-10-29 20:20:29 -0700
committerEric Anholt <eric@anholt.net>2015-03-24 12:01:39 -0700
commit28ff815c4b32c88bd9007fd79f2acf3682a4b4db (patch)
tree6e0d95b6ec1c527a1dbe6154ca3b4073c598d507
parent0e1372e1bd8f79fa295738bc1e983cb3648ba4be (diff)
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>
-rw-r--r--glamor/glamor.c5
-rw-r--r--glamor/glamor.h2
-rw-r--r--glamor/glamor_fbo.c12
3 files changed, 1 insertions, 18 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index 6a3b336ab..d9ea49649 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -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;
diff --git a/glamor/glamor.h b/glamor/glamor.h
index 206158c02..dc8e694bc 100644
--- a/glamor/glamor.h
+++ b/glamor/glamor.h
@@ -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
diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
index ad4dfe656..ff6ed25db 100644
--- a/glamor/glamor_fbo.c
+++ b/glamor/glamor_fbo.c
@@ -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: