[Cogl] [PATCH] Initialise dirty_real_blend_enable in _cogl_pipeline_copy

Neil Roberts neil at linux.intel.com
Thu Jul 11 05:55:59 PDT 2013


Damien writes:

> From what I can see, pipeline->dirty_real_blend_enable is being used
> without being initialized by cogl_pipeline_copy().

Nice catch! I think the best course of action is to initialise it with
the copied value from the source pipeline, as in the following patch.

Regards,
- Neil

-- >8 --

When making a copy of a pipeline, the flag to mark whether the real
blend enable is valid was not being initialised.

Thanks to Damien Lespiau for pointing this out
---
 cogl/cogl-pipeline.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cogl/cogl-pipeline.c b/cogl/cogl-pipeline.c
index 58eaacf..7fc41e4 100644
--- a/cogl/cogl-pipeline.c
+++ b/cogl/cogl-pipeline.c
@@ -340,6 +340,7 @@ _cogl_pipeline_copy (CoglPipeline *src, CoglBool is_weak)
   /* NB: real_blend_enable isn't a sparse property, it's valid for
    * every pipeline node so we have fast access to it. */
   pipeline->real_blend_enable = src->real_blend_enable;
+  pipeline->dirty_real_blend_enable = src->dirty_real_blend_enable;
 
   /* XXX:
    * consider generalizing the idea of "cached" properties. These
-- 
1.7.11.3.g3c3efa5



More information about the Cogl mailing list