[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:
parent
181bf92086
commit
8ca17f5262
@ -270,6 +270,9 @@ cogl_set_backface_culling_enabled (gboolean setting)
|
|||||||
{
|
{
|
||||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||||
|
|
||||||
|
if (ctx->enable_backface_culling == setting)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Currently the journal can't track changes to backface culling state... */
|
/* Currently the journal can't track changes to backface culling state... */
|
||||||
_cogl_journal_flush ();
|
_cogl_journal_flush ();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user