From acc7d2518837005f1b610c53bd08a617e338ec19 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 14 Sep 2011 12:32:02 +0100 Subject: [PATCH] cogl-path: Don't apply legacy state twice when stroking Since 12b3d21aaa cogl is using the vertex attribute API to stroke a path. However it was still manually appllying the legacy state to the pipeline. cogl_vdraw_attributes also applies the legacy state so it ends up getting applied twice. This patch just removes it from _cogl_path_stroke_nodes. Reviewed-by: Robert Bragg --- cogl/cogl2-path.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/cogl/cogl2-path.c b/cogl/cogl2-path.c index d5de3f5c8..cc1b09fd4 100644 --- a/cogl/cogl2-path.c +++ b/cogl/cogl2-path.c @@ -210,21 +210,11 @@ _cogl_path_stroke_nodes (CoglPath *path) _COGL_GET_CONTEXT (ctx, NO_RETVAL); - if (G_UNLIKELY (ctx->legacy_state_set)) - { - CoglPipeline *users_source = cogl_get_source (); - copy = cogl_pipeline_copy (users_source); - _cogl_pipeline_apply_legacy_state (copy); - source = copy; - } - else - source = cogl_get_source (); + source = cogl_get_source (); if (cogl_pipeline_get_n_layers (source) != 0) { - /* If we haven't already created a derivative pipeline... */ - if (!copy) - copy = cogl_pipeline_copy (source); + copy = cogl_pipeline_copy (source); _cogl_pipeline_prune_to_n_layers (copy, 0); source = copy; }