From f1d5f4f04947aa865949b0b1f2bdabaa992fbe03 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 17 Feb 2001 08:10:30 +0000 Subject: [PATCH] more optimizations in render function SVN revision: 4237 --- legacy/evas/configure.in | 15 +++++ legacy/evas/src/evas_render.c | 101 ++++++++++++++++++++++++++++++---- 2 files changed, 105 insertions(+), 11 deletions(-) diff --git a/legacy/evas/configure.in b/legacy/evas/configure.in index 7c0069c2b9..9c9dcdaf87 100644 --- a/legacy/evas/configure.in +++ b/legacy/evas/configure.in @@ -25,6 +25,19 @@ AC_ARG_WITH(ttf, [ --with-ttf=DIR use DIR where freetype was installed (eg /opt/freetype)], [CPPFLAGS="$CPPFLAGS -I$withval/include"; LDFLAGS="$LDFLAGS -L$withval/lib" LIBS_TTF="-L"$withval"/lib"]) + +gl=yes +AC_ARG_ENABLE(gl, + [ --disable-gl disable building with opengl support], +[ + if test x$enableval = xyes; then + gl=yes + else + gl=no + fi +] +) + AC_ARG_WITH(gl, [ --with-gl=DIR use DIR where opengl was installed (eg /usr/X11R6)], [CPPFLAGS="$CPPFLAGS -I$withval/include"; LDFLAGS="$LDFLAGS -L$withval/lib" @@ -124,6 +137,7 @@ fi ttf_includes="$CPPFLAGS" ttf_libs="$LIBS_TTF -lm -lttf" +if test x$gl = xyes ; then gl_includes="" #### Find out about OpenGL PREV_CPPFLAGS=$CPPFLAGS @@ -173,6 +187,7 @@ else echo "Please read the config.log file for more information as to why this library" echo "was not found." fi +fi CPPFLAGS=$PREV_CPPFLAGS imlib2_includes=`$IMLIB2_CONFIG --cflags` diff --git a/legacy/evas/src/evas_render.c b/legacy/evas/src/evas_render.c index 871f5d8e24..c9acd9227e 100644 --- a/legacy/evas/src/evas_render.c +++ b/legacy/evas/src/evas_render.c @@ -390,6 +390,9 @@ evas_render_updates(Evas e) (o->clip.changed))) ) { + Evas_Object_Rectangle oo; + + oo = o; if (((o->current.visible != o->previous.visible) || ((o->current.visible) && (o->current.zoomscale != o->previous.zoomscale) || @@ -399,9 +402,6 @@ evas_render_updates(Evas e) if ((!prop_change) && (o->type == OBJECT_RECTANGLE)) { - Evas_Object_Rectangle oo; - - oo = o; if ((oo->current.r != oo->previous.r) || (oo->current.g != oo->previous.g) || (oo->current.b != oo->previous.b) || @@ -409,8 +409,22 @@ evas_render_updates(Evas e) ) prop_change = 1; } - real_change = 1; - clip_change = o->clip.changed; + if ((o->type == OBJECT_RECTANGLE) && + (oo->current.r == oo->previous.r) && + (oo->current.g == oo->previous.g) && + (oo->current.b == oo->previous.b) && + (oo->current.a == oo->previous.a) && + (oo->current.a == 0) + ) + { + real_change = 0; + prop_change = 0; + } + else + { + real_change = 1; + clip_change = o->clip.changed; + } } o->current.stacking = 0; @@ -440,7 +454,20 @@ evas_render_updates(Evas e) (oo->current.color.b != oo->previous.color.b) || (oo->current.color.a != oo->previous.color.a) ) - real_change = 1; + { + if ((oo->current.color.r == oo->previous.color.r) && + (oo->current.color.g == oo->previous.color.g) && + (oo->current.color.b == oo->previous.color.b) && + (oo->current.color.a == oo->previous.color.a) && + (oo->current.color.a == 0) + ) + { + real_change = 0; + prop_change = 0; + } + else + real_change = 1; + } oo->current.new_data = 0; oo->previous = oo->current; } @@ -458,7 +485,20 @@ evas_render_updates(Evas e) (oo->current.b != oo->previous.b) || (oo->current.a != oo->previous.a) ) - real_change = 1; + { + if ((oo->current.r == oo->previous.r) && + (oo->current.g == oo->previous.g) && + (oo->current.b == oo->previous.b) && + (oo->current.a == oo->previous.a) && + (oo->current.a == 0) + ) + { + real_change = 0; + prop_change = 0; + } + else + real_change = 1; + } oo->previous = oo->current; } break; @@ -473,8 +513,21 @@ evas_render_updates(Evas e) (oo->current.a != oo->previous.a) ) { - real_change = 1; - prop_change = 1; + if ((oo->current.r == oo->previous.r) && + (oo->current.g == oo->previous.g) && + (oo->current.b == oo->previous.b) && + (oo->current.a == oo->previous.a) && + (oo->current.a == 0) + ) + { + real_change = 0; + prop_change = 0; + } + else + { + real_change = 1; + prop_change = 1; + } } oo->previous = oo->current; } @@ -493,7 +546,20 @@ evas_render_updates(Evas e) (oo->current.b != oo->previous.b) || (oo->current.a != oo->previous.a) ) - real_change = 1; + { + if ((oo->current.r == oo->previous.r) && + (oo->current.g == oo->previous.g) && + (oo->current.b == oo->previous.b) && + (oo->current.a == oo->previous.a) && + (oo->current.a == 0) + ) + { + real_change = 0; + prop_change = 0; + } + else + real_change = 1; + } oo->previous = oo->current; } break; @@ -519,7 +585,20 @@ evas_render_updates(Evas e) (oo->current.g != oo->previous.g) || (oo->current.b != oo->previous.b) || (oo->current.a != oo->previous.a)) - real_change = 1; + { + if ((oo->current.r == oo->previous.r) && + (oo->current.g == oo->previous.g) && + (oo->current.b == oo->previous.b) && + (oo->current.a == oo->previous.a) && + (oo->current.a == 0) + ) + { + real_change = 0; + prop_change = 0; + } + else + real_change = 1; + } oo->previous = oo->current; } break;