[Cogl] [PATCH] cogl-path: Generate the primitive before using it for clipping
Robert Bragg
robert at sixbynine.org
Wed Aug 21 07:07:16 PDT 2013
This looks good to land to me:
Reviewed-by: Robert Bragg <robert at linux.intel.com>
thanks,
Robert
On Wed, Aug 21, 2013 at 3:00 PM, Neil Roberts <neil at linux.intel.com> wrote:
> The data->fill_primitive member is meant to be generated on demand in
> an accessor function. However when using it for clipping the code was
> trying to directly use it without calling the accessor so it would
> crash if nothing else caused the primitive to be generated. This was
> making the texture-fbo test in Clutter crash.
> ---
> cogl-path/cogl-path.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/cogl-path/cogl-path.c b/cogl-path/cogl-path.c
> index c54ca01..221f40f 100644
> --- a/cogl-path/cogl-path.c
> +++ b/cogl-path/cogl-path.c
> @@ -1437,8 +1437,10 @@ _cogl_clip_stack_push_from_path (CoglClipStack *stack,
> viewport);
> else
> {
> + CoglPrimitive *primitive = _cogl_path_get_fill_primitive (path);
> +
> return _cogl_clip_stack_push_primitive (stack,
> - path->data->fill_primitive,
> + primitive,
> x_1, y_1, x_2, y_2,
> modelview_entry,
> projection_entry,
> --
> 1.8.3.1
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl
More information about the Cogl
mailing list