[Glamor] [PATCH 20/34] glamor: Drop unused GLAMOR_ACCESS_WO.

Alex Deucher alexdeucher at gmail.com
Fri Feb 28 10:02:15 PST 2014


From: Eric Anholt <eric at anholt.net>

Nothing was using it, and it was going to complicate the
glamor_prepare_access bugfixing I'm going to do next.

Ported from Eric's xserver glamor tree.

Signed-off-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 src/glamor_pixmap.c | 10 +---------
 src/glamor_priv.h   |  1 -
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/glamor_pixmap.c b/src/glamor_pixmap.c
index 7980489..72cf7b2 100644
--- a/src/glamor_pixmap.c
+++ b/src/glamor_pixmap.c
@@ -1251,8 +1251,6 @@ _glamor_download_sub_pixmap_to_cpu(PixmapPtr pixmap, GLenum format,
 		gl_access = GL_READ_ONLY;
 		gl_usage = GL_STREAM_READ;
 		break;
-	case GLAMOR_ACCESS_WO:
-		return bits;
 	case GLAMOR_ACCESS_RW:
 		gl_access = GL_READ_WRITE;
 		gl_usage = GL_DYNAMIC_DRAW;
@@ -1515,8 +1513,7 @@ glamor_download_pixmap_to_cpu(PixmapPtr pixmap, glamor_access_t access)
 
 	stride = pixmap->devKind;
 
-	if (access == GLAMOR_ACCESS_WO
-	    || glamor_priv->gl_flavor == GLAMOR_GL_ES2
+	if (glamor_priv->gl_flavor == GLAMOR_GL_ES2
 	    || (!glamor_priv->has_pack_invert && !glamor_priv->yInverted)
 	    || pixmap_priv->type == GLAMOR_TEXTURE_LARGE) {
 		data = malloc(stride * pixmap->drawable.height);
@@ -1647,11 +1644,6 @@ glamor_get_sub_pixmap(PixmapPtr pixmap, int x, int y, int w, int h, glamor_acces
 		return NULL;
 	w = (x + w) > pixmap->drawable.width ? (pixmap->drawable.width - x) : w;
 	h = (y + h) > pixmap->drawable.height ? (pixmap->drawable.height - y) : h;
-	if (access == GLAMOR_ACCESS_WO) {
-		sub_pixmap = glamor_create_pixmap(pixmap->drawable.pScreen, w, h,
-						  pixmap->drawable.depth, GLAMOR_CREATE_PIXMAP_CPU);
-		return sub_pixmap;
-	}
 
 	glamor_priv = glamor_get_screen_private(pixmap->drawable.pScreen);
 	pixmap_priv = glamor_get_pixmap_private(pixmap);
diff --git a/src/glamor_priv.h b/src/glamor_priv.h
index 621709a..844bd7a 100644
--- a/src/glamor_priv.h
+++ b/src/glamor_priv.h
@@ -303,7 +303,6 @@ typedef struct glamor_screen_private {
 typedef enum glamor_access {
 	GLAMOR_ACCESS_RO,
 	GLAMOR_ACCESS_RW,
-	GLAMOR_ACCESS_WO,
 } glamor_access_t;
 
 enum glamor_fbo_state {
-- 
1.8.3.1



More information about the Glamor mailing list