[Cogl] [PATCH] Initialise dirty_real_blend_enable in _cogl_pipeline_copy

Robert Bragg robert at sixbynine.org
Thu Jul 11 06:36:16 PDT 2013


This looks good to land to me:

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
- Robert


On Thu, Jul 11, 2013 at 1:55 PM, Neil Roberts <neil at linux.intel.com> wrote:
> 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
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list