From: <enl...@so...> - 2001-01-24 01:53:32
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/debian Modified Files: Makefile.am Added Files: libevas-dev.files libevas-sample.dirs libevas-sample.files libevas.dirs libevas.files Log Message: well if u have to have it in the makefile- have the files! =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/debian/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- Makefile.am 2000/11/26 17:21:17 1.1 +++ Makefile.am 2001/01/24 01:53:51 1.2 @@ -2,7 +2,6 @@ changelog \ control \ copyright \ -libevas-dev.dirs \ libevas-dev.files \ libevas-sample.dirs \ libevas-sample.files \ |
From: <enl...@so...> - 2001-01-25 21:55:39
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_render.c Log Message: evas.m4 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_render.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- evas_render.c 2001/01/03 06:04:56 1.33 +++ evas_render.c 2001/01/25 21:56:04 1.34 @@ -315,13 +315,45 @@ break; } if ((e->current.viewport.x != e->previous.viewport.x) || - (e->current.viewport.y != e->previous.viewport.y) || - (e->current.viewport.w != e->previous.viewport.w) || - (e->current.viewport.h != e->previous.viewport.h)) + (e->current.viewport.y != e->previous.viewport.y)) evas_update_rect(e, 0, 0, e->current.drawable_width, e->current.drawable_height); + else if ((e->current.viewport.w != e->previous.viewport.w) || + (e->current.viewport.h != e->previous.viewport.h)) + { + if (((double)(e->current.viewport.w - e->previous.viewport.w) == + (double)(e->current.drawable_width - e->previous.drawable_width)) && + ((double)(e->current.viewport.w - e->previous.viewport.w) == + (double)(e->current.drawable_width - e->previous.drawable_width))) + { + if ((e->current.drawable_width > e->previous.drawable_width)) + evas_update_rect(e, + e->current.drawable_width, + 0, + e->current.drawable_width - e->previous.drawable_width, + e->current.drawable_height); + if ((e->current.drawable_width > e->previous.drawable_width) && + (e->current.drawable_height > e->previous.drawable_height)) + evas_update_rect(e, + e->current.drawable_width, + e->current.drawable_height, + e->current.drawable_width - e->previous.drawable_width, + e->current.drawable_height - e->previous.drawable_height); + if ((e->current.drawable_height > e->previous.drawable_height)) + evas_update_rect(e, + 0, + e->current.drawable_height, + e->current.drawable_width, + e->current.drawable_height - e->previous.drawable_height); + } + else + evas_update_rect(e, + 0, 0, + e->current.drawable_width, + e->current.drawable_height); + } e->changed = 0; delete_objects = 0; |
From: <enl...@so...> - 2001-01-25 21:56:09
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas Modified Files: Makefile.am configure.in evas-config.in Added Files: evas.m4 Log Message: evas.m4 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- Makefile.am 2000/11/26 17:21:17 1.5 +++ Makefile.am 2001/01/25 21:56:04 1.6 @@ -13,4 +13,7 @@ bin_SCRIPTS = evas-config -EXTRA_DIST = README AUTHORS COPYING evas.spec +EXTRA_DIST = README AUTHORS COPYING evas.spec evas.m4 + +m4datadir = $(datadir)/aclocal +m4data_DATA = evas.m4 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/configure.in,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- configure.in 2001/01/14 11:07:01 1.23 +++ configure.in 2001/01/25 21:56:04 1.24 @@ -41,7 +41,7 @@ x_cflags="$X_CFLAGS" x_ldflags="$X_LDFLAGS" -x_libs="$X_LIBS $X_EXTRA_LIBS" +x_libs="$X_LIBS $X_EXTRA_LIBS -lX11" AC_CHECK_LIB(X11, XOpenDisplay, x_libs="$x_libs", AC_MSG_ERROR([ERROR: libX11 not found.]); exit, @@ -55,6 +55,8 @@ AC_CHECK_LIB(Xext, XShapeCombineMask, x_libs="-lXext $x_libs", AC_MSG_ERROR([ERROR: XShape not found.]); exit, $x_libs) +x_libs="$x_libs -lX11" + #AC_CHECK_LIB(Xrender, XRenderCreatePicture, # [ x_libs=" -lXrender -lXext $x_libs"; # AC_DEFINE(HAVE_RENDER) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/evas-config.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- evas-config.in 2000/08/22 21:25:52 1.4 +++ evas-config.in 2001/01/25 21:56:04 1.5 @@ -46,7 +46,7 @@ ;; --libs) libdirs=-L@libdir@ - echo $libdirs -levas @gl_ldflags@ @gl_libs@ @LDFLAGS@ @X_LIBS@ @X_PRE_LIBS@ @X_EXTRA_LIBS@ @imlib2_libs@ + echo $libdirs -levas @gl_ldflags@ @gl_libs@ @LDFLAGS@ @x_libs@ @x_ldflags@ @imlib2_libs@ ;; *) echo "${usage}" 1>&2 |
From: <enl...@so...> - 2001-02-16 01:32:59
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_gl_routines.c evas_object.c Log Message: ooooops - fix gl engine to handle window resizes..... :) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_gl_routines.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -3 -r1.44 -r1.45 --- evas_gl_routines.c 2001/01/17 21:31:30 1.44 +++ evas_gl_routines.c 2001/02/16 01:33:14 1.45 @@ -246,11 +246,7 @@ if (!glw) return NULL; if (glw != __evas_current) { - double dr, dg, db, da; - __evas_current = glw; - glw->w = w; - glw->h = h; glXMakeCurrent(glw->disp, glw->win, glw->context->context); glShadeModel(GL_FLAT); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); @@ -258,15 +254,6 @@ glEnable(GL_LINE_SMOOTH); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glPixelStorei(GL_PACK_ALIGNMENT, 1); - - glViewport(0, 0, glw->w, h); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glOrtho(0, glw->w, 0, glw->h, -1, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glScalef(1, -1, 1); - glTranslatef(0, - glw->h, 0); if (glw->context->dither) glEnable(GL_DITHER); else glDisable(GL_DITHER); if (glw->context->blend) @@ -293,6 +280,22 @@ glDisable(GL_SCISSOR_TEST); if (glw->context->bound_texture) glBindTexture(GL_TEXTURE_2D, glw->context->bound_texture->texture); + } + if ((glw->w != w) || (glw->h != h)) + { + double dr, dg, db, da; + + glw->w = w; + glw->h = h; + glViewport(0, 0, glw->w, h); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, glw->w, 0, glw->h, -1, 1); + printf("%i %i\n", glw->w, glw->h); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glScalef(1, -1, 1); + glTranslatef(0, - glw->h, 0); } return glw; } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_object.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- evas_object.c 2000/12/27 20:51:39 1.23 +++ evas_object.c 2001/02/16 01:33:14 1.24 @@ -562,6 +562,7 @@ if (!e) return; if (!o) return; if ((o->type == OBJECT_LINE)) return; + if ((x == o->current.x) && (y == o->current.y)) return; if ((o->current.visible) && (_evas_point_in_object(e, o, e->mouse.x, e->mouse.y))) event_update = 1; @@ -607,11 +608,12 @@ if ((o->type == OBJECT_LINE)) return; if ((o->type == OBJECT_TEXT)) return; if ((o->type == OBJECT_POLYGON)) return; + if (w < 0) w = 0; + if (h < 0) h = 0; + if ((w == o->current.w) && (h == o->current.h)) return; if ((o->current.visible) && (_evas_point_in_object(e, o, e->mouse.x, e->mouse.y))) event_update = 1; - if (w < 0) w = 0; - if (h < 0) h = 0; o->current.w = w; o->current.h = h; o->changed = 1; |
From: <enl...@so...> - 2001-02-17 08:09:42
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_render.c Log Message: more optimizations in render function =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_render.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -3 -r1.34 -r1.35 --- evas_render.c 2001/01/25 21:56:04 1.34 +++ evas_render.c 2001/02/17 08:10:30 1.35 @@ -390,6 +390,9 @@ (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 @@ 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 @@ ) 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 @@ (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 @@ (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 @@ (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 @@ (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 @@ (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; |
From: <enl...@so...> - 2001-02-17 08:10:12
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas Modified Files: configure.in Log Message: more optimizations in render function =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/configure.in,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- configure.in 2001/01/25 21:56:04 1.24 +++ configure.in 2001/02/17 08:10:30 1.25 @@ -25,6 +25,19 @@ [ --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 @@ ttf_includes="$CPPFLAGS" ttf_libs="$LIBS_TTF -lm -lttf" +if test x$gl = xyes ; then gl_includes="" #### Find out about OpenGL PREV_CPPFLAGS=$CPPFLAGS @@ -172,6 +186,7 @@ echo "built into Evas. This means much slower rendering perfromance." echo "Please read the config.log file for more information as to why this library" echo "was not found." +fi fi CPPFLAGS=$PREV_CPPFLAGS |
From: <enl...@so...> - 2001-02-17 20:26:07
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: Evas.h Evas_private.h evas_image.c Log Message: load_error now stored and retrievable for image objects :) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/Evas.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -3 -r1.42 -r1.43 --- Evas.h 2001/01/02 23:09:32 1.42 +++ Evas.h 2001/02/17 20:26:57 1.43 @@ -183,6 +183,7 @@ /* image query ops */ void evas_get_image_size(Evas e, Evas_Object o, int *w, int *h); void evas_get_image_border(Evas e, Evas_Object o, int *l, int *r, int *t, int *b); +Imlib_Load_Error evas_get_image_load_error(Evas e, Evas_Object o); /* coordinate space transforms */ int evas_world_x_to_screen(Evas e, double x); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/Evas_private.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- Evas_private.h 2000/12/27 20:51:39 1.6 +++ Evas_private.h 2001/02/17 20:26:57 1.7 @@ -216,6 +216,7 @@ int r, g, b, a; } color; } current, previous; + Imlib_Load_Error load_error; }; struct _Evas_Object_Text =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_image.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- evas_image.c 2000/11/29 04:49:22 1.16 +++ evas_image.c 2001/02/17 20:26:57 1.17 @@ -52,13 +52,15 @@ o->object_free = _evas_free_image; o->object_renderer_data_free = _evas_free_image_renderer_data; + oo->load_error = IMLIB_LOAD_ERROR_NONE; + if (file) { oo->current.file = strdup(file); { Imlib_Image im; - im = imlib_load_image(file); + im = imlib_load_image_with_error_return(file, &oo->load_error); if (im) { imlib_context_set_image(im); @@ -116,7 +118,8 @@ if (!o) return; IF_OBJ(o, OBJECT_IMAGE) return; oo = o; - if ((oo->current.file) && (file) && (strcmp(file, oo->current.file))) + if (((oo->current.file) && (file) && (strcmp(file, oo->current.file))) || + ((!oo->current.file) && (file))) { if (oo->current.file) free(oo->current.file); @@ -125,7 +128,7 @@ { Imlib_Image im; - im = imlib_load_image(file); + im = imlib_load_image_with_error_return(file, &oo->load_error); if (im) { imlib_context_set_image(im); @@ -158,19 +161,22 @@ } else { - if (!file) - { - oo->current.file = NULL; - o->changed = 1; - e->changed = 1; - } - else - { - oo->current.fill.x = 0; - oo->current.fill.y = 0; - oo->current.fill.w = (double)oo->current.image.w; - oo->current.fill.h = (double)oo->current.image.h; - } + if (oo->current.file) + free(oo->current.file); + oo->previous.file = NULL; + oo->current.file = NULL; + oo->current.image.w = 0; + oo->current.image.h = 0; + evas_resize(e, o, + (double)oo->current.image.w, + (double)oo->current.image.h); + oo->current.fill.x = 0; + oo->current.fill.y = 0; + oo->current.fill.w = (double)oo->current.image.w; + oo->current.fill.h = (double)oo->current.image.h; + oo->load_error = IMLIB_LOAD_ERROR_NONE; + o->changed = 1; + e->changed = 1; } } @@ -245,4 +251,17 @@ if (r) *r = oo->current.border.r; if (t) *t = oo->current.border.t; if (b) *b = oo->current.border.b; +} + +Imlib_Load_Error +evas_get_image_load_error(Evas e, Evas_Object o) +{ + Evas_Object_Image oo; + + if (!e) return; + if (!o) return; + IF_OBJ(o, OBJECT_IMAGE) return; + oo = o; + + return oo->load_error; } |
From: <enl...@so...> - 2001-02-17 20:39:02
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_image.c Log Message: oops - minor logic hiccup - fixed.. also imlib2 fix for its load error checking. missed this when adding db style (key in file) loading. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_image.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- evas_image.c 2001/02/17 20:26:57 1.17 +++ evas_image.c 2001/02/17 20:39:53 1.18 @@ -60,7 +60,7 @@ { Imlib_Image im; - im = imlib_load_image_with_error_return(file, &oo->load_error); + im = imlib_load_image_with_error_return(file, &(oo->load_error)); if (im) { imlib_context_set_image(im); @@ -159,7 +159,7 @@ o->changed = 1; e->changed = 1; } - else + else if (!file) { if (oo->current.file) free(oo->current.file); |
From: <enl...@so...> - 2001-02-17 21:51:27
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_image.c Log Message: and handle that other case... =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_image.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- evas_image.c 2001/02/17 20:39:53 1.18 +++ evas_image.c 2001/02/17 21:52:18 1.19 @@ -119,7 +119,10 @@ IF_OBJ(o, OBJECT_IMAGE) return; oo = o; if (((oo->current.file) && (file) && (strcmp(file, oo->current.file))) || - ((!oo->current.file) && (file))) + ((!oo->current.file) && (file)) || + (oo->current.image.w == 0) || + (oo->current.image.h == 0) + ) { if (oo->current.file) free(oo->current.file); @@ -145,6 +148,7 @@ } else { + printf("load failed ->%s<-!\n", file); oo->current.image.w = 0; oo->current.image.h = 0; evas_resize(e, o, @@ -161,6 +165,7 @@ } else if (!file) { + printf("!file\n"); if (oo->current.file) free(oo->current.file); oo->previous.file = NULL; @@ -177,6 +182,9 @@ oo->load_error = IMLIB_LOAD_ERROR_NONE; o->changed = 1; e->changed = 1; + } + else + { } } |
From: <enl...@so...> - 2001-02-17 22:06:51
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_image.c Log Message: get rid of those printfs. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_image.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- evas_image.c 2001/02/17 21:52:18 1.19 +++ evas_image.c 2001/02/17 22:07:42 1.20 @@ -148,7 +148,6 @@ } else { - printf("load failed ->%s<-!\n", file); oo->current.image.w = 0; oo->current.image.h = 0; evas_resize(e, o, @@ -165,7 +164,6 @@ } else if (!file) { - printf("!file\n"); if (oo->current.file) free(oo->current.file); oo->previous.file = NULL; |
From: <enl...@so...> - 2001-02-19 09:27:10
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_render.c Log Message: damnit... the more i use evas the more i optimize it... ok - more optimizations for special cases (rectangles that onyl change size or location have only their detlas redrawn - not the whole rect, and the same with images who share common global tile start and size parapeters for the image...) this is getting quite fast now :) rememeber you only really see the speedups in software.. hardware is so dispicably fast you never notice :( =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_render.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- evas_render.c 2001/02/17 08:10:30 1.35 +++ evas_render.c 2001/02/19 09:27:59 1.36 @@ -398,7 +398,9 @@ (o->current.zoomscale != o->previous.zoomscale) || (o->current.layer != o->previous.layer) || (o->current.stacking)))) - prop_change = 1; + { + prop_change = 1; + } if ((!prop_change) && (o->type == OBJECT_RECTANGLE)) { @@ -407,12 +409,12 @@ (oo->current.b != oo->previous.b) || (oo->current.a != oo->previous.a) ) - prop_change = 1; + { + prop_change = 1; + oo->previous = oo->current; + } } 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) ) @@ -455,10 +457,7 @@ (oo->current.color.a != oo->previous.color.a) ) { - 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) && + if ((oo->current.color.a == oo->previous.color.a) && (oo->current.color.a == 0) ) { @@ -486,10 +485,7 @@ (oo->current.a != oo->previous.a) ) { - 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) && + if ((oo->current.a == oo->previous.a) && (oo->current.a == 0) ) { @@ -513,10 +509,7 @@ (oo->current.a != oo->previous.a) ) { - 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) && + if ((oo->current.a == oo->previous.a) && (oo->current.a == 0) ) { @@ -525,7 +518,7 @@ } else { - real_change = 1; + real_change = 0; prop_change = 1; } } @@ -547,10 +540,7 @@ (oo->current.a != oo->previous.a) ) { - 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) && + if ((oo->current.a == oo->previous.a) && (oo->current.a == 0) ) { @@ -586,10 +576,7 @@ (oo->current.b != oo->previous.b) || (oo->current.a != oo->previous.a)) { - 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) && + if ((oo->current.a == oo->previous.a) && (oo->current.a == 0) ) { @@ -607,12 +594,30 @@ } } } - if (real_change) + if ((real_change) || (prop_change)) { int x, y, w, h; + int img_tile_ch; + img_tile_ch = 1; + if (o->type == OBJECT_IMAGE) + { + Evas_Object_Image oo; + double fx, fy, fxx, fyy; + + oo = o; + fx = oo->current.fill.x + o->current.x; + fy = oo->current.fill.y + o->current.y; + fxx = oo->previous.fill.x + o->previous.x; + fyy = oo->previous.fill.y + o->previous.y; + if ((oo->current.fill.w == oo->previous.fill.w) && + (oo->current.fill.h == oo->previous.fill.h) && + (fx == fxx) && (fy == fyy)) + img_tile_ch = 0; + } + /* special case for rectangle since its all one color */ - if ((o->type == OBJECT_RECTANGLE) && + if (((o->type == OBJECT_RECTANGLE) || (!img_tile_ch)) && (!prop_change) && (RECTS_INTERSECT(o->current.x, o->current.y, o->current.w, o->current.h, |
From: <enl...@so...> - 2001-02-19 19:38:21
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_render.c Log Message: oops- over optimized so that it didnt actually render some changes :) fixed =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_render.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- evas_render.c 2001/02/19 09:27:59 1.36 +++ evas_render.c 2001/02/19 19:38:47 1.37 @@ -366,11 +366,12 @@ for (ll = layer->objects; ll; ll = ll->next) { Evas_Object_Any o; - int real_change, prop_change, clip_change; + int real_change, prop_change, clip_change, fill_change; real_change = 0; prop_change = 0; clip_change = 0; + fill_change = 0; o = ll->data; if (o->delete_me) @@ -447,10 +448,6 @@ (oo->current.border.r != oo->previous.border.r) || (oo->current.border.t != oo->previous.border.t) || (oo->current.border.b != oo->previous.border.b) || - (oo->current.fill.x != oo->previous.fill.x) || - (oo->current.fill.y != oo->previous.fill.y) || - (oo->current.fill.w != oo->previous.fill.w) || - (oo->current.fill.h != oo->previous.fill.h) || (oo->current.color.r != oo->previous.color.r) || (oo->current.color.g != oo->previous.color.g) || (oo->current.color.b != oo->previous.color.b) || @@ -465,8 +462,15 @@ prop_change = 0; } else - real_change = 1; + { + prop_change = 1; + } } + if ((oo->current.fill.x != oo->previous.fill.x) || + (oo->current.fill.y != oo->previous.fill.y) || + (oo->current.fill.w != oo->previous.fill.w) || + (oo->current.fill.h != oo->previous.fill.h)) + fill_change = 1; oo->current.new_data = 0; oo->previous = oo->current; } @@ -493,7 +497,7 @@ prop_change = 0; } else - real_change = 1; + prop_change = 1; } oo->previous = oo->current; } @@ -560,7 +564,7 @@ oo = o; if ((oo->current.new_gradient) || (oo->current.angle != oo->previous.angle)) - real_change = 1; + prop_change = 1; oo->current.new_gradient = 0; oo->previous = oo->current; } @@ -594,13 +598,13 @@ } } } - if ((real_change) || (prop_change)) + if ((real_change) || (prop_change) || (fill_change)) { int x, y, w, h; int img_tile_ch; img_tile_ch = 1; - if (o->type == OBJECT_IMAGE) + if ((o->type == OBJECT_IMAGE) && (!prop_change)) { Evas_Object_Image oo; double fx, fy, fxx, fyy; |
From: <enl...@so...> - 2001-02-20 00:48:19
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_render.c Log Message: oops - again.. over-optimize =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_render.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -3 -r1.37 -r1.38 --- evas_render.c 2001/02/19 19:38:47 1.37 +++ evas_render.c 2001/02/20 00:49:16 1.38 @@ -470,9 +470,13 @@ (oo->current.fill.y != oo->previous.fill.y) || (oo->current.fill.w != oo->previous.fill.w) || (oo->current.fill.h != oo->previous.fill.h)) - fill_change = 1; + { + if (!((oo->current.color.a == oo->previous.color.a) && + (oo->current.color.a == 0))) + fill_change = 1; + } oo->current.new_data = 0; - oo->previous = oo->current; + /*oo->previous = oo->current;*/ } break; case OBJECT_TEXT: @@ -620,6 +624,12 @@ img_tile_ch = 0; } + if (o->type == OBJECT_IMAGE) + { + Evas_Object_Image oo; + oo = o; + oo->previous = oo->current; + } /* special case for rectangle since its all one color */ if (((o->type == OBJECT_RECTANGLE) || (!img_tile_ch)) && (!prop_change) && |
From: <enl...@li...> - 2001-03-02 19:05:52
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: Makefile.am Log Message: 0.0.4 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/Makefile.am,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- Makefile.am 2000/12/29 21:39:19 1.22 +++ Makefile.am 2001/03/02 19:07:20 1.23 @@ -59,4 +59,4 @@ libevas_la_LIBADD = $(LIBS_ALL) libevas_la_DEPENDENCIES = $(top_builddir)/config.h -libevas_la_LDFLAGS = -version-info 0:3:0 +libevas_la_LDFLAGS = -version-info 0:4:0 |
From: <enl...@li...> - 2001-03-02 19:06:22
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas Modified Files: README configure.in evas.spec Log Message: 0.0.4 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/README,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- README 2000/12/30 07:19:54 1.18 +++ README 2001/03/02 19:07:20 1.19 @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- - E V A S - 0.0.3 + E V A S - 0.0.4 ------------------------------------------------------------------------------- This is the ``E Canvas'' - a rip off of some of the other canvas's floating =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/configure.in,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- configure.in 2001/02/17 08:10:30 1.25 +++ configure.in 2001/03/02 19:07:20 1.26 @@ -1,6 +1,6 @@ AC_INIT(src/Evas.h) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(evas, 0.0.3) +AM_INIT_AUTOMAKE(evas, 0.0.4) AC_C_BIGENDIAN AC_PROG_CC AM_PROG_CC_STDC =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/evas.spec,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- evas.spec 2001/01/07 22:02:31 1.8 +++ evas.spec 2001/03/02 19:07:20 1.9 @@ -1,6 +1,6 @@ # this is NOT relocatable, unless you alter the patch! %define name evas -%define ver 0.0.3 +%define ver 0.0.4 %define rel 1 %define prefix /usr @@ -19,7 +19,7 @@ Vendor: The Enlightenment Development Team <e-d...@en...> Source: ftp://ftp.enlightenment.org/enlightenment/%{name}-%{ver}.tar.gz BuildRoot: /var/tmp/%{name}-root -Requires: imlib2 >= 1.0.1 +Requires: imlib2 >= 1.0.2 %description Evas is an advanced canvas library, providing three backends for |
From: <enl...@li...> - 2001-03-15 03:20:09
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Added Files: evas_optimize.c Log Message: err forget it... |
From: <enl...@li...> - 2001-03-15 03:21:12
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Removed Files: evas_optimize.c Log Message: forget that forray into optimizing that... |
From: <enl...@li...> - 2001-03-18 23:19:19
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_imlib_routines.c evas_imlib_routines.h Log Message: cache image scalings... :) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_imlib_routines.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- evas_imlib_routines.c 2001/01/07 21:04:32 1.30 +++ evas_imlib_routines.c 2001/03/18 23:21:35 1.31 @@ -1,10 +1,17 @@ + #include "evas_imlib_routines.h" static void __evas_imlib_image_cache_flush(Display *disp); +static void __evas_imlib_image_cache_clean(void); +static Evas_Imlib_Image *__evas_imlib_image_cache_find(char *file); static int __evas_anti_alias = 1; +static int __evas_image_cache = 8 * 1024 * 1024; +static int __evas_image_cache_used = 0; static Evas_List drawable_list = NULL; +static Evas_List images = NULL; + /* the current clip region and color */ static int __evas_clip = 0; static int __evas_clip_x = 0; @@ -23,11 +30,68 @@ static void __evas_imlib_image_cache_flush(Display *disp) { - int size; + __evas_imlib_image_cache_empty(disp); +} + +static void +__evas_imlib_image_cache_clean(void) +{ + while (__evas_image_cache_used > __evas_image_cache) + { + Evas_Imlib_Image *last; + Evas_List l; + + for (l = images; l; l = l->next) + { + if (!l->next) last = l->data; + } + images = evas_list_remove(images, last); + imlib_context_set_image(last->image); + __evas_image_cache_used -= + imlib_image_get_width() * + imlib_image_get_height() * 4; + if (last->scaled.image) + { + imlib_context_set_image(last->scaled.image); + __evas_image_cache_used -= + imlib_image_get_width() * + imlib_image_get_height() * 4; + } + imlib_free_image(); + free(last->file); + free(last); + } +} + +static Evas_Imlib_Image * +__evas_imlib_image_cache_find(char *file) +{ + Evas_Imlib_Image *im; + Evas_List l; - size = imlib_get_cache_size(); - imlib_set_cache_size(0); - imlib_set_cache_size(size); + for (l = images; l; l = l->next) + { + im = l->data; + if (!strcmp(im->file, file)) + { + im->references++; + images = evas_list_remove(images, im); + images = evas_list_prepend(images, im); + imlib_context_set_image(im->image); + __evas_image_cache_used -= + imlib_image_get_width() * + imlib_image_get_height() * 4; + if (im->scaled.image) + { + imlib_context_set_image(im->scaled.image); + __evas_image_cache_used -= + imlib_image_get_width() * + imlib_image_get_height() * 4; + } + return im; + } + } + return NULL; } /*****************************************************************************/ @@ -36,15 +100,44 @@ Evas_Imlib_Image * __evas_imlib_image_new_from_file(Display *disp, char *file) -{ - return (Evas_Imlib_Image *)imlib_load_image(file); +{ + Evas_Imlib_Image *im; + Imlib_Image image; + + im = __evas_imlib_image_cache_find(file); + if (im) return im; + + image = imlib_load_image(file); + if (!image) return NULL; + im = malloc(sizeof(Evas_Imlib_Image)); + im->file = strdup(file); + im->image = image; + im->scaled.aa = 0; + im->scaled.image = NULL; + im->references = 1; + images = evas_list_prepend(images, im); + return im; } void __evas_imlib_image_free(Evas_Imlib_Image *im) { - imlib_context_set_image((Imlib_Image)im); - imlib_free_image(); + im->references--; + if (im->references == 0) + { + imlib_context_set_image(im->image); + __evas_image_cache_used += + imlib_image_get_width() * + imlib_image_get_height() * 4; + if (im->scaled.image) + { + imlib_context_set_image(im->scaled.image); + __evas_image_cache_used += + imlib_image_get_width() * + imlib_image_get_height() * 4; + } + __evas_imlib_image_cache_clean(); + } } void @@ -52,21 +145,23 @@ { int size; - size = imlib_get_cache_size(); - imlib_set_cache_size(0); - imlib_set_cache_size(size); + size = __evas_image_cache; + __evas_image_cache = 0; + __evas_imlib_image_cache_clean(); + __evas_image_cache = size; } void __evas_imlib_image_cache_set_size(Display *disp, int size) { - imlib_set_cache_size(size); + __evas_image_cache = size; + __evas_imlib_image_cache_clean(); } int __evas_imlib_image_cache_get_size(Display *disp) { - return imlib_get_cache_size(); + return __evas_image_cache; } void @@ -134,16 +229,144 @@ if (__evas_clip) imlib_context_set_cliprect(__evas_clip_x - up->x, __evas_clip_y - up->y, - __evas_clip_w, + __evas_clip_w, __evas_clip_h); else imlib_context_set_cliprect(0, 0, 0, 0); if (!up->image) up->image = imlib_create_image(up->w, up->h); - imlib_context_set_image(up->image); - imlib_blend_image_onto_image(im, 0, - src_x, src_y, src_w, src_h, - dst_x - up->x, dst_y - up->y, dst_w, dst_h); + /* if our src and dest are 1:1 scaling.. use original */ + if ((dst_w == src_w) && (dst_h == src_h)) + { + imlib_context_set_image(up->image); + imlib_blend_image_onto_image(im->image, 0, + src_x, src_y, src_w, src_h, + dst_x - up->x, dst_y - up->y, dst_w, dst_h); + if (im->scaled.image) + { + imlib_context_set_image(im->scaled.image); + imlib_free_image(); + im->scaled.image = NULL; + } + } + /* if we have a scaled image stored... */ + else if ((im->scaled.image) && (im->scaled.aa == __evas_anti_alias)) + { + Imlib_Border bd; + + /* if the image has any border scaling... dont do it */ + imlib_context_set_image(im->image); + imlib_image_get_border(&bd); + if ((bd.left != 0) || + (bd.right != 0) || + (bd.top != 0) || + (bd.bottom != 0)) + { + imlib_context_set_image(up->image); + imlib_blend_image_onto_image(im->image, 0, + src_x, src_y, src_w, src_h, + dst_x - up->x, dst_y - up->y, dst_w, dst_h); + } + else + { + int scw, sch, iw, ih; + + imlib_context_set_image(im->image); + iw = imlib_image_get_width(); + ih = imlib_image_get_height(); + imlib_context_set_image(im->scaled.image); + scw = imlib_image_get_width(); + sch = imlib_image_get_height(); + /* if the scaled image is the same scaled output as needed here use it */ + /* if we are using the WHOLE src image */ + if ((src_x == 0) && (src_y == 0) && + (src_w == iw) && (src_h == ih) && + /* if our destination lies withint the output viewport and clip */ + ((dst_x >= 0) && (dst_y >= 0) && + (dst_w + dst_x <= win_w) && (dst_h + dst_y <= win_h) && + ((!__evas_clip) || + ((dst_x >= __evas_clip_x) && (dst_y >= __evas_clip_y) && + (dst_w + dst_x <= __evas_clip_w) && (dst_h + dst_y <= __evas_clip_h))))) + { + if ((scw == dst_w) && (sch == dst_h)) + { + imlib_context_set_image(up->image); + imlib_blend_image_onto_image(im->scaled.image, 0, + 0, 0, dst_w, dst_h, + dst_x - up->x, dst_y - up->y, dst_w, dst_h); + } + else + { + imlib_context_set_image(im->scaled.image); + imlib_free_image(); + im->scaled.image = NULL; + imlib_context_set_image(im->image); + im->scaled.image = imlib_create_cropped_scaled_image(0, 0, iw, ih, + dst_w, dst_h); + im->scaled.aa = __evas_anti_alias; + imlib_context_set_image(up->image); + imlib_blend_image_onto_image(im->scaled.image, 0, + 0, 0, dst_w, dst_h, + dst_x - up->x, dst_y - up->y, dst_w, dst_h); + } + } + /* just draw normally */ + else + { + imlib_context_set_image(up->image); + imlib_blend_image_onto_image(im->image, 0, + src_x, src_y, src_w, src_h, + dst_x - up->x, dst_y - up->y, dst_w, dst_h); + } + } + } + /* if we dont and the image isnt clipped and its not original size */ + else + { + int iw, ih; + + if (im->scaled.image) + { + int scw, sch; + + imlib_context_set_image(im->scaled.image); + scw = imlib_image_get_width(); + sch = imlib_image_get_height(); + imlib_context_set_image(im->scaled.image); + imlib_free_image(); + im->scaled.image = NULL; + } + imlib_context_set_image(im->image); + iw = imlib_image_get_width(); + ih = imlib_image_get_height(); + + /* if we are using the WHOLE src image */ + if ((src_x == 0) && (src_y == 0) && + (src_w == iw) && (src_h == ih) && + /* if our destination lies withint the output viewport and clip */ + ((dst_x >= 0) && (dst_y >= 0) && + (dst_w + dst_x <= win_w) && (dst_h + dst_y <= win_h) && + ((!__evas_clip) || + ((dst_x >= __evas_clip_x) && (dst_y >= __evas_clip_y) && + (dst_w + dst_x <= __evas_clip_w) && (dst_h + dst_y <= __evas_clip_h))))) + { + imlib_context_set_image(im->image); + im->scaled.image = imlib_create_cropped_scaled_image(0, 0, iw, ih, + dst_w, dst_h); + im->scaled.aa = __evas_anti_alias; + imlib_context_set_image(up->image); + imlib_blend_image_onto_image(im->scaled.image, 0, + 0, 0, dst_w, dst_h, + dst_x - up->x, dst_y - up->y, dst_w, dst_h); + } + else + { + imlib_context_set_image(up->image); + imlib_blend_image_onto_image(im->image, 0, + src_x, src_y, src_w, src_h, + dst_x - up->x, dst_y - up->y, dst_w, dst_h); + } + } } } } @@ -158,14 +381,14 @@ int __evas_imlib_image_get_width(Evas_Imlib_Image *im) { - imlib_context_set_image((Imlib_Image)im); + imlib_context_set_image(im->image); return imlib_image_get_width(); } int __evas_imlib_image_get_height(Evas_Imlib_Image *im) { - imlib_context_set_image((Imlib_Image)im); + imlib_context_set_image(im->image); return imlib_image_get_height(); } @@ -175,7 +398,7 @@ { Imlib_Border bd; - imlib_context_set_image((Imlib_Image)im); + imlib_context_set_image(im->image); bd.left = left; bd.right = right; bd.top = top; @@ -949,8 +1172,6 @@ if (!initted) { imlib_set_color_usage(colors); - imlib_set_font_cache_size(1024 * 1024); - imlib_set_cache_size(8 * 1024 * 1024); initted = 1; } imlib_set_color_usage(colors); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_imlib_routines.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- evas_imlib_routines.h 2000/12/27 20:51:39 1.20 +++ evas_imlib_routines.h 2001/03/18 23:21:35 1.21 @@ -24,13 +24,24 @@ ((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh)))) #endif -typedef void Evas_Imlib_Image; typedef void Evas_Imlib_Font; +typedef struct _evas_imlib_image Evas_Imlib_Image; typedef struct _evas_imlib_drawable Evas_Imlib_Drawable; typedef struct _evas_imlib_update Evas_Imlib_Update; typedef struct _evas_imlib_color Evas_Imlib_Color; typedef struct _evas_imlib_gradient Evas_Imlib_Graident; + +struct _evas_imlib_image +{ + char *file; + Imlib_Image image; + struct { + int aa; + Imlib_Image image; + } scaled; + int references; +}; struct _evas_imlib_drawable { |
From: <enl...@li...> - 2001-03-18 23:20:51
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_imlib_routines.c Log Message: oops missing that.. fix =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_imlib_routines.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -3 -r1.31 -r1.32 --- evas_imlib_routines.c 2001/03/18 23:21:35 1.31 +++ evas_imlib_routines.c 2001/03/18 23:23:07 1.32 @@ -50,14 +50,15 @@ __evas_image_cache_used -= imlib_image_get_width() * imlib_image_get_height() * 4; + imlib_free_image_and_decache(); if (last->scaled.image) { imlib_context_set_image(last->scaled.image); + imlib_free_image_and_decache(); __evas_image_cache_used -= imlib_image_get_width() * imlib_image_get_height() * 4; } - imlib_free_image(); free(last->file); free(last); } |
From: <enl...@li...> - 2001-03-18 23:50:03
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_imlib_routines.c Log Message: ooooooooooooops... fixed :) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_imlib_routines.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- evas_imlib_routines.c 2001/03/18 23:23:07 1.32 +++ evas_imlib_routines.c 2001/03/18 23:52:19 1.33 @@ -54,10 +54,10 @@ if (last->scaled.image) { imlib_context_set_image(last->scaled.image); - imlib_free_image_and_decache(); __evas_image_cache_used -= imlib_image_get_width() * imlib_image_get_height() * 4; + imlib_free_image_and_decache(); } free(last->file); free(last); |
From: <enl...@li...> - 2001-03-20 03:09:12
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_imlib_routines.c evas_imlib_routines.h Log Message: let me just turn off scaled caching for a bit.. i need to think this over a bit more after some more strenuous testing... i think i need to keep some usage metrics on things.. tho i guess i shold just use a bigger cache... :) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_imlib_routines.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- evas_imlib_routines.c 2001/03/18 23:52:19 1.33 +++ evas_imlib_routines.c 2001/03/20 03:11:01 1.34 @@ -1,5 +1,6 @@ + #include "evas_imlib_routines.h" static void __evas_imlib_image_cache_flush(Display *disp); @@ -115,6 +116,7 @@ im->image = image; im->scaled.aa = 0; im->scaled.image = NULL; + im->life = 0; im->references = 1; images = evas_list_prepend(images, im); return im; @@ -207,6 +209,7 @@ imlib_context_set_direction(IMLIB_TEXT_TO_RIGHT); imlib_context_set_anti_alias(__evas_anti_alias); imlib_context_set_blend(1); +/* if (im->life < 65536) im->life++;*/ for(l = drawable_list; l; l = l->next) { Evas_Imlib_Drawable *dr; @@ -237,7 +240,8 @@ if (!up->image) up->image = imlib_create_image(up->w, up->h); /* if our src and dest are 1:1 scaling.. use original */ - if ((dst_w == src_w) && (dst_h == src_h)) + if (((dst_w == src_w) && (dst_h == src_h)) || + (im->life < 2)) { imlib_context_set_image(up->image); imlib_blend_image_onto_image(im->image, 0, =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_imlib_routines.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- evas_imlib_routines.h 2001/03/18 23:21:35 1.21 +++ evas_imlib_routines.h 2001/03/20 03:11:01 1.22 @@ -40,6 +40,7 @@ int aa; Imlib_Image image; } scaled; + int life; int references; }; |
From: <enl...@li...> - 2001-04-06 01:57:49
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_misc.c evas_render.c Log Message: dont allow viewport or render size to be < 1x1 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_misc.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -3 -r1.26 -r1.27 --- evas_misc.c 2000/11/07 20:43:05 1.26 +++ evas_misc.c 2001/04/06 01:57:49 1.27 @@ -111,8 +111,10 @@ memset(e, 0, sizeof(struct _Evas)); e->current.viewport.x = 0.0; e->current.viewport.y = 0.0; - e->current.viewport.w = 0.0; - e->current.viewport.h = 0.0; + e->current.viewport.w = 1.0; + e->current.viewport.h = 1.0; + e->current.drawable_width = 1; + e->current.drawable_height = 1; e->current.render_method = RENDER_METHOD_ALPHA_SOFTWARE; e->current.colors = 216; return e; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_render.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -3 -r1.38 -r1.39 --- evas_render.c 2001/02/20 00:49:16 1.38 +++ evas_render.c 2001/04/06 01:57:49 1.39 @@ -1287,6 +1287,8 @@ evas_set_output_viewport(Evas e, double x, double y, double w, double h) { if (!e) return; + if (w < 1) w = 1; + if (h < 1) h = 1; e->current.viewport.x = x; e->current.viewport.y = y; e->current.viewport.w = w; |
From: <enl...@li...> - 2001-04-07 19:00:50
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: evas_misc.c Log Message: commit :) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_misc.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- evas_misc.c 2001/04/06 01:57:49 1.27 +++ evas_misc.c 2001/04/07 19:00:49 1.28 @@ -113,8 +113,14 @@ e->current.viewport.y = 0.0; e->current.viewport.w = 1.0; e->current.viewport.h = 1.0; + e->previous.viewport.x = 0.0; + e->previous.viewport.y = 0.0; + e->previous.viewport.w = 1.0; + e->previous.viewport.h = 1.0; e->current.drawable_width = 1; e->current.drawable_height = 1; + e->previous.drawable_width = 1; + e->previous.drawable_height = 1; e->current.render_method = RENDER_METHOD_ALPHA_SOFTWARE; e->current.colors = 216; return e; |
From: <enl...@li...> - 2001-04-12 17:54:52
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src Modified Files: Evas.h Makefile.am evas_list.c evas_render.c Log Message: 1. optimize evas lists a bit by keeping a "last" pointer 2. fix rendering - forgot to scale output of primitives other than images when viewport not 1:1 with window 3. up to 0.0.5 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/Evas.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -3 -r1.43 -r1.44 --- Evas.h 2001/02/17 20:26:57 1.43 +++ Evas.h 2001/04/12 17:54:51 1.44 @@ -17,6 +17,8 @@ { Evas_List prev, next; void *data; + /* private members - DONT TOUCH */ + Evas_List last; }; /* enums */ @@ -235,6 +237,7 @@ Evas_List evas_list_append_relative(Evas_List list, void *data, void *relative); Evas_List evas_list_prepend_relative(Evas_List list, void *data, void *relative); Evas_List evas_list_remove(Evas_List list, void *data); +Evas_List evas_list_remove_list(Evas_List list, Evas_List remove_list); void * evas_list_find(Evas_List list, void *data); Evas_List evas_list_free(Evas_List list); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/Makefile.am,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- Makefile.am 2001/03/02 19:07:20 1.23 +++ Makefile.am 2001/04/12 17:54:51 1.24 @@ -59,4 +59,4 @@ libevas_la_LIBADD = $(LIBS_ALL) libevas_la_DEPENDENCIES = $(top_builddir)/config.h -libevas_la_LDFLAGS = -version-info 0:4:0 +libevas_la_LDFLAGS = -version-info 0:5:0 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_list.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- evas_list.c 2000/09/26 19:16:48 1.3 +++ evas_list.c 2001/04/12 17:54:51 1.4 @@ -15,14 +15,31 @@ new_l->next = NULL; new_l->prev = NULL; new_l->data = data; - if (!list) return new_l; - for (l = list; l; l = l->next) + if (!list) + { + new_l->last = new_l; + return new_l; + } + if (list->last) { - if (!l->next) + l = list->last; + l->next = new_l; + new_l->prev = l; + list->last = new_l; + return list; + } + else + + { + for (l = list; l; l = l->next) { - l->next = new_l; - new_l->prev = l; - return list; + if (!l->next) + { + l->next = new_l; + new_l->prev = l; + list->last = new_l; + return list; + } } } return list; @@ -37,9 +54,15 @@ new_l->next = NULL; new_l->prev = NULL; new_l->data = data; - if (!list) return new_l; + if (!list) + { + new_l->last = new_l; + return new_l; + } new_l->next = list; list->prev = new_l; + new_l->last = list->last; + list->last = NULL; return new_l; } @@ -65,6 +88,8 @@ } l->next = new_l; new_l->prev = l; + if (!new_l->next) + list->last = new_l; return list; } } @@ -92,9 +117,22 @@ l->prev->next = new_l; l->prev = new_l; if (new_l->prev) - return list; + { + if (!new_l->next) + list->last = new_l; + return list; + } else - return new_l; + { + if (!new_l->next) + new_l->last = new_l; + else + { + new_l->last = list->last; + list->last = NULL; + } + return new_l; + } } } return evas_list_prepend(list, data); @@ -117,12 +155,43 @@ return_l = list; } else - return_l = l->next; + { + return_l = l->next; + if (return_l) + return_l->last = list->last; + } + if (l == list->last) + list->last = l->prev; free(l); return return_l; } } return list; +} + +Evas_List +evas_list_remove_list(Evas_List list, Evas_List remove_list) +{ + Evas_List return_l; + + if (!remove_list) return list; + if (remove_list->next) + remove_list->next->prev = remove_list->prev; + if (remove_list->prev) + { + remove_list->prev->next = remove_list->next; + return_l = list; + } + else + { + return_l = remove_list->next; + if (return_l) + return_l->last = list->last; + } + if (remove_list == list->last) + list->last = remove_list->prev; + free(remove_list); + return return_l; } void * =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/evas_render.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -3 -r1.39 -r1.40 --- evas_render.c 2001/04/06 01:57:49 1.39 +++ evas_render.c 2001/04/12 17:54:51 1.40 @@ -1004,7 +1004,8 @@ void *fn; oo = o; - fn = func_text_font_new(e->current.display, oo->current.font, oo->current.size); + fn = func_text_font_new(e->current.display, oo->current.font, + (oo->current.size * (double)e->current.drawable_width) / e->current.viewport.w); if (fn) { func_text_draw(fn, @@ -1013,8 +1014,12 @@ e->current.drawable, e->current.drawable_width, e->current.drawable_height, - o->current.x, - o->current.y, + (o->current.x * + (double)e->current.drawable_width) / + e->current.viewport.w, + (o->current.y * + (double)e->current.drawable_height) / + e->current.viewport.h, oo->current.text, oo->current.r, oo->current.g, @@ -1035,10 +1040,18 @@ e->current.drawable, e->current.drawable_width, e->current.drawable_height, - o->current.x, - o->current.y, - o->current.w, - o->current.h, + (o->current.x * + (double)e->current.drawable_width) / + e->current.viewport.w, + (o->current.y * + (double)e->current.drawable_height) / + e->current.viewport.h, + (o->current.w * + (double)e->current.drawable_width) / + e->current.viewport.w, + (o->current.h * + (double)e->current.drawable_height) / + e->current.viewport.h, oo->current.r, oo->current.g, oo->current.b, @@ -1055,10 +1068,18 @@ e->current.drawable, e->current.drawable_width, e->current.drawable_height, - oo->current.x1, - oo->current.y1, - oo->current.x2, - oo->current.y2, + (oo->current.x1 * + (double)e->current.drawable_width) / + e->current.viewport.w, + (oo->current.y1 * + (double)e->current.drawable_height) / + e->current.viewport.h, + (oo->current.x2 * + (double)e->current.drawable_width) / + e->current.viewport.w, + (oo->current.y2 * + (double)e->current.drawable_height) / + e->current.viewport.h, oo->current.r, oo->current.g, oo->current.b, @@ -1077,10 +1098,18 @@ e->current.drawable, e->current.drawable_width, e->current.drawable_height, - o->current.x, - o->current.y, - o->current.w, - o->current.h, + (o->current.x * + (double)e->current.drawable_width) / + e->current.viewport.w, + (o->current.y * + (double)e->current.drawable_height) / + e->current.viewport.h, + (o->current.w * + (double)e->current.drawable_width) / + e->current.viewport.w, + (o->current.h * + (double)e->current.drawable_height) / + e->current.viewport.h, oo->current.angle); } break; @@ -1091,16 +1120,38 @@ oo = o; if (oo->current.points) - func_poly_draw(e->current.display, - e->current.image, - e->current.drawable, - e->current.drawable_width, - e->current.drawable_height, - oo->current.points, - oo->current.r, - oo->current.g, - oo->current.b, - oo->current.a); + { + Evas_List points = NULL, pl; + + for (pl = oo->current.points; pl; pl = pl->next) + { + Evas_Point p1, p2; + + p1 = pl->data; + p2 = malloc(sizeof(struct _Evas_Point)); + + p2->x = (p1->x * + (double)e->current.drawable_width) / + e->current.viewport.w, + p2->y = (p1->y * + (double)e->current.drawable_height) / + e->current.viewport.h, + points = evas_list_append(points, p2); + } + func_poly_draw(e->current.display, + e->current.image, + e->current.drawable, + e->current.drawable_width, + e->current.drawable_height, + points, + oo->current.r, + oo->current.g, + oo->current.b, + oo->current.a); + for (pl = points; pl; pl = pl->next) + free(pl->data); + evas_list_free(points); + } } break; default: |
From: <enl...@li...> - 2001-04-12 17:55:22
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas Modified Files: README configure.in Log Message: 1. optimize evas lists a bit by keeping a "last" pointer 2. fix rendering - forgot to scale output of primitives other than images when viewport not 1:1 with window 3. up to 0.0.5 =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/README,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- README 2001/03/02 19:07:20 1.19 +++ README 2001/04/12 17:54:51 1.20 @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- - E V A S - 0.0.4 + E V A S - 0.0.5 ------------------------------------------------------------------------------- This is the ``E Canvas'' - a rip off of some of the other canvas's floating =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/configure.in,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- configure.in 2001/03/26 13:32:04 1.27 +++ configure.in 2001/04/12 17:54:51 1.28 @@ -1,6 +1,6 @@ AC_INIT(src/Evas.h) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(evas, 0.0.4) +AM_INIT_AUTOMAKE(evas, 0.0.5) AC_C_BIGENDIAN AC_PROG_CC AM_PROG_CC_STDC @@ -183,7 +183,9 @@ else echo "WARNING:......." echo "no OpenGL libraries / headers found. This means no GL support will be" - echo "built into Evas. This means much slower rendering perfromance." + echo "built into Evas. Ifapplications request 3D Hardware rendering from" + echo "evas, they will be forcibly moved back to using software alpha" + ehco "rendering." echo "Please read the config.log file for more information as to why this library" echo "was not found." fi |