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 <ebassi@linux.intel.com>
This commit is contained in:
parent
598939cee1
commit
8eb66da6b0
@ -321,13 +321,7 @@ cogl_draw_buffer (CoglBufferTarget target, CoglHandle offscreen)
|
|||||||
/* Bind window framebuffer object */
|
/* Bind window framebuffer object */
|
||||||
GE( glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0) );
|
GE( glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0) );
|
||||||
|
|
||||||
|
if (target == COGL_MASK_BUFFER)
|
||||||
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)
|
|
||||||
{
|
{
|
||||||
/* Draw only to ALPHA channel */
|
/* Draw only to ALPHA channel */
|
||||||
GE( glColorMask (GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE) );
|
GE( glColorMask (GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user