projects
/
profile
/
ivi
/
clutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dea7f9b
)
[cogl] cogl_material_set_layer does nothing if resetting the same texture
author
Robert Bragg
<robert@linux.intel.com>
Sat, 4 Apr 2009 18:21:22 +0000
(19:21 +0100)
committer
Robert Bragg
<robert@linux.intel.com>
Fri, 5 Jun 2009 16:18:32 +0000
(17:18 +0100)
This avoids dirtying the layer, and should avoid some uneeded state changes
clutter/cogl/common/cogl-material.c
patch
|
blob
|
history
diff --git
a/clutter/cogl/common/cogl-material.c
b/clutter/cogl/common/cogl-material.c
index
66a4b0c
..
a701331
100644
(file)
--- a/
clutter/cogl/common/cogl-material.c
+++ b/
clutter/cogl/common/cogl-material.c
@@
-679,6
+679,9
@@
cogl_material_set_layer (CoglHandle material_handle,
material = _cogl_material_pointer_from_handle (material_handle);
layer = _cogl_material_get_layer (material_handle, layer_index, TRUE);
+ if (texture_handle == layer->texture)
+ return;
+
n_layers = g_list_length (material->layers);
if (n_layers >= CGL_MAX_COMBINED_TEXTURE_IMAGE_UNITS)
{