mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[material] _cogl_material_equal: catch the simplest case of matching handles
We were missing the simplest test of all: are the two CoglHandles equal and are the flush option flags for each material equal? This should improve batching for some common cases.
This commit is contained in:
parent
3369c5138b
commit
ac4f7f0bfe
@ -1629,6 +1629,10 @@ _cogl_material_equal (CoglHandle material0_handle,
|
||||
CoglMaterial *material1;
|
||||
GList *l0, *l1;
|
||||
|
||||
if (material0_handle == material1_handle &&
|
||||
material0_flush_options->flags == material1_flush_options->flags)
|
||||
return TRUE;
|
||||
|
||||
if (!(flags & COGL_MATERIAL_EQUAL_FLAGS_ASSERT_ALL_DEFAULTS))
|
||||
{
|
||||
g_critical ("FIXME: _cogl_material_equal doesn't yet support "
|
||||
|
Loading…
Reference in New Issue
Block a user