From b73ee6992c68559f04f8d3e42d337b1c39a57933 Mon Sep 17 00:00:00 2001 From: Johan Bilien Date: Fri, 24 Apr 2009 15:07:49 +0100 Subject: [PATCH] Unnecessary glColorMask on alpha drops performance Bug 1228 - Unnecessary glColorMask on alpha drops performance With DRI2, alpha is allowed in the window's framebuffer Signed-off-by: Emmanuele Bassi --- clutter/cogl/gl/cogl-fbo.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/clutter/cogl/gl/cogl-fbo.c b/clutter/cogl/gl/cogl-fbo.c index 13463d345..501871976 100644 --- a/clutter/cogl/gl/cogl-fbo.c +++ b/clutter/cogl/gl/cogl-fbo.c @@ -321,13 +321,7 @@ cogl_draw_buffer (CoglBufferTarget target, CoglHandle offscreen) /* Bind window framebuffer object */ GE( glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0) ); - - if (target == COGL_WINDOW_BUFFER) - { - /* Draw to RGB channels */ - GE( glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE) ); - } - else if (target == COGL_MASK_BUFFER) + if (target == COGL_MASK_BUFFER) { /* Draw only to ALPHA channel */ GE( glColorMask (GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE) );