[cogl] cogl-path: Clear the stroke attribute buffer when modifying the path



commit 9082dd0d71b0b41fc38e0d1edc82efbd07a68750
Author: Neil Roberts <neil linux intel com>
Date:   Mon Sep 12 18:44:13 2011 +0100

    cogl-path: Clear the stroke attribute buffer when modifying the path
    
    Commit 12b3d21a changed cogl-path so that it will use the vertex
    attribute API to stroke the path in a similar way to how it was using
    the API to fill the path. However it wasn't clearing the stroke buffer
    when the path is modified so it would continue to use the unmodified
    stroke.
    
    Reviewed-by: Robert Bragg <robert linux intel com>

 cogl/cogl2-path.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/cogl/cogl2-path.c b/cogl/cogl2-path.c
index 3707be6..d5de3f5 100644
--- a/cogl/cogl2-path.c
+++ b/cogl/cogl2-path.c
@@ -119,12 +119,13 @@ _cogl_path_modify (CoglPath *path)
                            old_data->path_nodes->len);
 
       path->data->fill_attribute_buffer = NULL;
+      path->data->stroke_attribute_buffer = NULL;
       path->data->ref_count = 1;
 
       _cogl_path_data_unref (old_data);
     }
-  /* The path is altered so the vbo will now be invalid */
-  else if (path->data->fill_attribute_buffer)
+  else
+    /* The path is altered so the vbos will now be invalid */
     _cogl_path_data_clear_vbos (path->data);
 }
 



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