From 19d12e65e5e1c29a7d0b959ea5637dc8d7851823 Mon Sep 17 00:00:00 2001
From: Robert Bragg <robert@linux.intel.com>
Date: Tue, 2 Aug 2011 16:38:51 +0100
Subject: [PATCH] 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 file changed, 6 deletions(-)

diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 55ae80988..e321fcc02 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)