mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05: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
9afa52f056
commit
6ac3b5a564
@ -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