Add branch prediction fixes

SVN revision: 30237
This commit is contained in:
Gustavo Sverzut Barbieri 2007-06-04 18:31:30 +00:00
parent f3ae942b0a
commit 6398a2c6dc
2 changed files with 12 additions and 7 deletions

View File

@ -265,13 +265,13 @@ evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char
Evas_Object *obj;
obj = (Evas_Object *)(ll->data);
if (evas_object_is_opaque(obj) &&
evas_object_is_visible(obj) &&
(!obj->clip.clipees) &&
(obj->cur.visible) &&
(!obj->delete_me) &&
(obj->cur.cache.clip.visible) &&
(!obj->smart.smart))
if (UNLIKELY(evas_object_is_opaque(obj) &&
evas_object_is_visible(obj) &&
(!obj->clip.clipees) &&
(obj->cur.visible) &&
(!obj->delete_me) &&
(obj->cur.cache.clip.visible) &&
(!obj->smart.smart)))
obscuring_objects = evas_list_append(obscuring_objects, obj);
}
/* save this list */

View File

@ -69,6 +69,11 @@
// BROKEN in gcc 4 on amd64
//# pragma GCC visibility push(hidden)
# endif
#define LIKELY(x) __builtin_expect(!!(x), 1)
#define UNLIKELY(x) __builtin_expect(!!(x), 0)
#else
#define LIKELY(x) (x)
#define UNLIKELY(x) (x)
#endif
/*****************************************************************************/