[cogl] framebuffer: avoid redundant calls to _init_bits



commit 19d12e65e5e1c29a7d0b959ea5637dc8d7851823
Author: Robert Bragg <robert linux intel com>
Date:   Tue Aug 2 16:38:51 2011 +0100

    framebuffer: avoid redundant calls to _init_bits
    
    There is no need to call _cogl_framebuffer_init_bits for the draw and
    read buffers each time we flush the framebuffer state since we will
    always re-sync with gl if necessary when the
    cogl_framebuffer_get_red/green/blue/alpha_bits functions are called.
    
    Reviewed-by: Neil Roberts <neil linux intel com>

 cogl/cogl-framebuffer.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
---
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 55ae809..e321fcc 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -1450,12 +1450,6 @@ _cogl_framebuffer_flush_state (CoglFramebuffer *draw_buffer,
       ctx->dirty_gl_viewport = FALSE;
     }
 
-  /* since we might have changed the framebuffer, we should initialize
-   * the bits; this is a no-op if they have already been initialized
-   */
-  _cogl_framebuffer_init_bits (draw_buffer);
-  _cogl_framebuffer_init_bits (read_buffer);
-
   if (ctx->current_gl_dither_enabled != draw_buffer->dither_enabled)
     {
       if (draw_buffer->dither_enabled)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]