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



commit 3b9460e05be751b6012f0c01f8c417aa315e704b
Author: Neil Roberts <neil linux intel com>
Date:   Mon Sep 12 18:59:15 2011 +0100

    cogl-path: Clear the stroke attribute buffer when modifying the path
    
    Commit 1515a8d7 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>
    
    Backported from 9082dd0d71b0 of Cogl master

 clutter/cogl/cogl/cogl2-path.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/clutter/cogl/cogl/cogl2-path.c b/clutter/cogl/cogl/cogl2-path.c
index f1f0e45..96e4614 100644
--- a/clutter/cogl/cogl/cogl2-path.c
+++ b/clutter/cogl/cogl/cogl2-path.c
@@ -119,12 +119,13 @@ _cogl_path_modify (CoglPath *path)
                            old_data->path_nodes->len);
 
       path->data->fill_vbo = COGL_INVALID_HANDLE;
+      path->data->stroke_vbo = COGL_INVALID_HANDLE;
       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_vbo)
+  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]