[cogl] avoid any state changes when cogl_set_backface_culling_enable is a nop

This is a simple optimization to bail out of cogl_set_backface_culling_enable
if it's not resulting in a change of state.
This commit is contained in:
Robert Bragg 2009-10-22 19:09:20 +01:00
parent 764cca75b4
commit d38d888f78

View File

@ -270,6 +270,9 @@ cogl_set_backface_culling_enabled (gboolean setting)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
if (ctx->enable_backface_culling == setting)
return;
/* Currently the journal can't track changes to backface culling state... */
_cogl_journal_flush ();