From 676df42c6fefd28a6da2c1cefd885d6fa4d59da1 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 11 Jan 2011 14:10:11 +0000 Subject: [PATCH] pipeline: don't skip flush if skip_gl_color flag differs We try and bail out of flushing pipeline state asap if we can see the pipeline has already been flushed and hasn't changed but we weren't checking to see if the skip_gl_color flag is the same as when it was last flush too and so we'd sometimes bail out without updating the glColor correctly. --- clutter/cogl/cogl/cogl-pipeline-opengl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clutter/cogl/cogl/cogl-pipeline-opengl.c b/clutter/cogl/cogl/cogl-pipeline-opengl.c index c64a96ee3..0cfb004fa 100644 --- a/clutter/cogl/cogl/cogl-pipeline-opengl.c +++ b/clutter/cogl/cogl/cogl-pipeline-opengl.c @@ -1063,7 +1063,8 @@ _cogl_pipeline_flush_gl_state (CoglPipeline *pipeline, { /* Bail out asap if we've been asked to re-flush the already current * pipeline and we can see the pipeline hasn't changed */ - if (ctx->current_pipeline_age == pipeline->age) + if (ctx->current_pipeline_age == pipeline->age && + ctx->current_pipeline_skip_gl_color == skip_gl_color) goto done; pipelines_difference = ctx->current_pipeline_changes_since_flush;