summaryrefslogtreecommitdiff
path: root/glamor/glamor_pixmap.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-12-27 01:17:10 -0800
committerEric Anholt <eric@anholt.net>2014-02-14 18:30:01 -0800
commitf3f4fc7a65589a200a086ea7b1527f91941bc19b (patch)
tree67a88cbcb0adc7509b68213db5852d9c62ff6dac /glamor/glamor_pixmap.c
parent9553020b7184ed7a7ef3f02d60556d519ea3e769 (diff)
glamor: Add a screen argument to drop an ifdef from glamor_set_alu().
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glamor/glamor_pixmap.c')
-rw-r--r--glamor/glamor_pixmap.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c
index 41d5f5aa9..5442c90da 100644
--- a/glamor/glamor_pixmap.c
+++ b/glamor/glamor_pixmap.c
@@ -115,9 +115,17 @@ glamor_set_planemask(PixmapPtr pixmap, unsigned long planemask)
}
Bool
-glamor_set_alu(unsigned char alu)
+glamor_set_alu(ScreenPtr screen, unsigned char alu)
{
-#ifndef GLAMOR_GLES2
+ glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
+
+ if (glamor_priv->gl_flavor == GLAMOR_GL_ES2) {
+ if (alu != GXcopy)
+ return FALSE;
+ else
+ return TRUE;
+ }
+
if (alu == GXcopy) {
glDisable(GL_COLOR_LOGIC_OP);
return TRUE;
@@ -173,10 +181,7 @@ glamor_set_alu(unsigned char alu)
glamor_fallback("unsupported alu %x\n", alu);
return FALSE;
}
-#else
- if (alu != GXcopy)
- return FALSE;
-#endif
+
return TRUE;
}