[cogl/cogl-1.12] pipeline: Fix the layer index used when pruning layers
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/cogl-1.12] pipeline: Fix the layer index used when pruning layers
- Date: Fri, 7 Sep 2012 10:46:00 +0000 (UTC)
commit cb834c95e98e02a249a9cc6ad74f5d24e9e65edf
Author: Neil Roberts <neil linux intel com>
Date: Wed Sep 5 14:36:55 2012 +0100
pipeline: Fix the layer index used when pruning layers
When pruning a pipeline to a set number of layers it records the index
of the first layer after the given number of layers have been found.
This is stored in a variable called 'first_index_to_prune' implying
that this layer should be included in the layers to be pruned. However
the subsequent if-statement was only pruning layers with an index
greater than the recorded index so it would presumably only prune the
following layers. This patch fixes it to use '>=' instead.
https://bugzilla.gnome.org/show_bug.cgi?id=683414
Reviewed-by: Robert Bragg <robert linux intel com>
(cherry picked from commit d3063e8dea92a8f668acef6435cc68e0c901dc8d)
cogl/cogl-pipeline.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/cogl/cogl-pipeline.c b/cogl/cogl-pipeline.c
index 3cc8c50..f071261 100644
--- a/cogl/cogl-pipeline.c
+++ b/cogl/cogl-pipeline.c
@@ -1546,7 +1546,7 @@ _cogl_pipeline_prune_to_n_layers (CoglPipeline *pipeline, int n)
CoglPipelineLayer *layer = l->data;
next = l->next; /* we're modifying the list we're iterating */
- if (layer->index > state.first_index_to_prune)
+ if (layer->index >= state.first_index_to_prune)
_cogl_pipeline_remove_layer_difference (pipeline, layer, FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]