From 8eb66da6b0fbb022028d012a428a399892a0c0f3 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 --- gl/cogl-fbo.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gl/cogl-fbo.c b/gl/cogl-fbo.c index 13463d345..501871976 100644 --- a/gl/cogl-fbo.c +++ b/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) );