[cogl] cogl-path: Don't apply legacy state twice when stroking



commit acc7d2518837005f1b610c53bd08a617e338ec19
Author: Neil Roberts <neil linux intel com>
Date:   Wed Sep 14 12:32:02 2011 +0100

    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 <robert linux intel com>

 cogl/cogl2-path.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/cogl/cogl2-path.c b/cogl/cogl2-path.c
index d5de3f5..cc1b09f 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;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]