mirror of
https://github.com/brl/mutter.git
synced 2025-02-18 06:04:10 +00:00
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>
This commit is contained in:
parent
64b2bbab84
commit
19d12e65e5
@ -1450,12 +1450,6 @@ _cogl_framebuffer_flush_state (CoglFramebuffer *draw_buffer,
|
|||||||
ctx->dirty_gl_viewport = FALSE;
|
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 (ctx->current_gl_dither_enabled != draw_buffer->dither_enabled)
|
||||||
{
|
{
|
||||||
if (draw_buffer->dither_enabled)
|
if (draw_buffer->dither_enabled)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user