Free state at the end of a journal flush
At the end of flushing the journal, we need to free the vertex attributes and vertex array. http://bugzilla.clutter-project.org/show_bug.cgi?id=2423
This commit is contained in:
parent
fae591b168
commit
4e56eec366
@ -696,7 +696,6 @@ _cogl_journal_flush (void)
|
||||
|
||||
state.vertex_array = upload_vertices (ctx->logged_vertices, &state);
|
||||
state.attributes = ctx->journal_flush_attributes_array;
|
||||
g_array_set_size (ctx->journal_flush_attributes_array, 0);
|
||||
|
||||
framebuffer = _cogl_get_framebuffer ();
|
||||
modelview_stack = _cogl_framebuffer_get_modelview_stack (framebuffer);
|
||||
@ -732,6 +731,13 @@ _cogl_journal_flush (void)
|
||||
_cogl_journal_flush_clip_stacks_and_entries, /* callback */
|
||||
&state); /* data */
|
||||
|
||||
for (i = 0; i < state.attributes->len; i++)
|
||||
cogl_object_unref (g_array_index (state.attributes,
|
||||
CoglVertexAttribute *, i));
|
||||
g_array_set_size (state.attributes, 0);
|
||||
|
||||
cogl_object_unref (state.vertex_array);
|
||||
|
||||
for (i = 0; i < ctx->journal->len; i++)
|
||||
{
|
||||
CoglJournalEntry *entry =
|
||||
|
Loading…
Reference in New Issue
Block a user