Use a GList instead of a BSD list for CoglPipelineSnippetList

Previously CoglPipelineSnippetList was using the BSD embedded list
type with a mini struct to combine the list node with a pointer to the
snippet. This is effectively equivalent to just using a GList so we
might as well do that. This will help if we eventually want to get rid
of cogl-queue.h

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 54a168f3c7829c427d54ab517533bb9f7384d022)
This commit is contained in:
Neil Roberts
2013-06-08 23:53:11 +01:00
parent fa0df6ea96
commit ed510dbe6d
5 changed files with 140 additions and 158 deletions

View File

@ -31,18 +31,11 @@
#include <glib.h>
#include "cogl-snippet.h"
#include "cogl-queue.h"
typedef struct _CoglPipelineSnippet CoglPipelineSnippet;
COGL_LIST_HEAD (CoglPipelineSnippetList, CoglPipelineSnippet);
struct _CoglPipelineSnippet
typedef struct
{
COGL_LIST_ENTRY (CoglPipelineSnippet) list_node;
CoglSnippet *snippet;
};
GList *entries;
} CoglPipelineSnippetList;
/* Arguments to pass to _cogl_pipeline_snippet_generate_code() */
typedef struct