summaryrefslogtreecommitdiff
path: root/cogl/cogl-context-private.h
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2011-09-20 21:58:26 +0100
committerRobert Bragg <robert@linux.intel.com>2011-09-21 17:28:32 +0100
commit30f8521790dd7daf052cba22037cedb87793f12b (patch)
treeaa81a7bf5798f167985481adc75c79bce57ee44d /cogl/cogl-context-private.h
parentf16d3756dfafa63521954842c8365e8862bfd126 (diff)
downloadcogl-30f8521790dd7daf052cba22037cedb87793f12b.tar.gz
pipeline: optimize _compare_differences functions
This optimizes the layer and pipeline _compare_differences functions so neither of them use the GArray api since building up the list of ancestors by appending to a shared GArray was showing quite high on profiles due to how frequently pipeline comparisons are made. Instead we now build up a transient, singly linked list by allocating GList nodes via alloca to build up the parallel lists of ancestors. This tweaked approach actually ends up being a bit more concise than before, we avoid the overhead of the GArray api and now avoid making any function calls while comparing (assuming the _get_parent() calls always inline), we avoiding needing to get the default cogl context. Reviewed-by: Neil Roberts <neil@linux.intel.com>
Diffstat (limited to 'cogl/cogl-context-private.h')
-rw-r--r--cogl/cogl-context-private.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/cogl/cogl-context-private.h b/cogl/cogl-context-private.h
index 27711662..3981f7ba 100644
--- a/cogl/cogl-context-private.h
+++ b/cogl/cogl-context-private.h
@@ -128,9 +128,6 @@ struct _CoglContext
gboolean current_pipeline_skip_gl_color;
unsigned long current_pipeline_age;
- GArray *pipeline0_nodes;
- GArray *pipeline1_nodes;
-
/* Bitmask of attributes enabled. On GLES2 these are the vertex
attribute numbers and on regular GL these are only used for the
texture coordinate arrays */