summaryrefslogtreecommitdiff
path: root/glamor/glamor_getspans.c
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2012-01-20 15:56:25 +0800
committerEric Anholt <eric@anholt.net>2013-12-18 11:23:48 -0800
commit68789b23e791d81c6987c755a56851961cbb262f (patch)
tree5bf379bd3ee11c63c647e76ea206a2d00688f71c /glamor/glamor_getspans.c
parent3373d2c696028a9f2f637430c48b9de1a3776800 (diff)
glamor_gles2: Consolidate gles2 pixmap format readable check to one function.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'glamor/glamor_getspans.c')
-rw-r--r--glamor/glamor_getspans.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/glamor/glamor_getspans.c b/glamor/glamor_getspans.c
index be81fbb9c..92c278fe5 100644
--- a/glamor/glamor_getspans.c
+++ b/glamor/glamor_getspans.c
@@ -66,7 +66,9 @@ _glamor_get_spans(DrawablePtr drawable,
glamor_set_destination_pixmap_priv_nc(pixmap_priv);
glamor_validate_pixmap(pixmap);
- if (glamor_priv->gl_flavor == GLAMOR_GL_ES2) {
+ if (glamor_priv->gl_flavor == GLAMOR_GL_ES2
+ && (glamor_tex_format_is_readable(format) || !no_revert)) {
+
/* XXX prepare whole pixmap is not efficient. */
temp_pixmap =
glamor_es2_pixmap_read_prepare(pixmap, &format,