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>
This commit is contained in:
Neil Roberts 2011-09-12 18:44:13 +01:00
parent cb31c6eeec
commit 9082dd0d71

View File

@ -119,12 +119,13 @@ _cogl_path_modify (CoglPath *path)
old_data->path_nodes->len); old_data->path_nodes->len);
path->data->fill_attribute_buffer = NULL; path->data->fill_attribute_buffer = NULL;
path->data->stroke_attribute_buffer = NULL;
path->data->ref_count = 1; path->data->ref_count = 1;
_cogl_path_data_unref (old_data); _cogl_path_data_unref (old_data);
} }
/* The path is altered so the vbo will now be invalid */ else
else if (path->data->fill_attribute_buffer) /* The path is altered so the vbos will now be invalid */
_cogl_path_data_clear_vbos (path->data); _cogl_path_data_clear_vbos (path->data);
} }