On Sat, Dec 15, 2012 at 6:40 PM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > evas/gl - fix the line incorrect position in arm. > > line position is slightly different between gl drivers. > > I have no idea why it is. So added to work differently based on the > manufacturers. > > This work may be based on the renderer. If you can test it with much > drivers then please test and fix. > > Also changed the ENV name from EVAS_GL_LINE_NO_OFFSET_HACK to > EVAS_GL_LINE_OFFSET_HACK_DISABLE. > > > > Author: hermet > Date: 2012-12-15 01:40:47 -0800 (Sat, 15 Dec 2012) > New Revision: 81016 > Trac: http://trac.enlightenment.org/e/changeset/81016 > > Modified: > trunk/efl/ChangeLog trunk/efl/NEWS > trunk/efl/src/modules/evas/engines/gl_common/evas_gl_line.c > > Modified: trunk/efl/ChangeLog > =================================================================== > --- trunk/efl/ChangeLog 2012-12-15 09:03:18 UTC (rev 81015) > +++ trunk/efl/ChangeLog 2012-12-15 09:40:47 UTC (rev 81016) > @@ -170,3 +170,8 @@ > > * Fix EINA_INLIST_FOREACH_SAFE macro to work when inlist is not the > first item in the struct. > + > +2012-09-04 Roberto de Souza <zehortig...@profusion.mobi> > + > + * Fix EINA_INLIST_FOREACH_SAFE macro to work when inlist is not the > + first item in the struct.
Seems like the wrong ChangeLog to me. > Modified: trunk/efl/NEWS > =================================================================== > --- trunk/efl/NEWS 2012-12-15 09:03:18 UTC (rev 81015) > +++ trunk/efl/NEWS 2012-12-15 09:40:47 UTC (rev 81016) > @@ -41,6 +41,7 @@ > * ecore_getopt: add ECORE_GETOPT_ACTION_BREAK > * evas: > - Add ellipsis support in Evas_Object_Text. > + - Add EVAS_GL_LINE_OFFSET_HACK_DISABLE to turn off line shift > correction by evas. > > Deprecations: > * ecore_x: > @@ -80,3 +81,4 @@ > * Fix possible memory corruption in xrandr EDID functions. > * Fix potential segv in software engine native_set code. > * Fix uninitialized data in Evas OpenGL engine. > + * Fix the line drawing clipping problem on arm gl driver. > > Modified: trunk/efl/src/modules/evas/engines/gl_common/evas_gl_line.c > =================================================================== > --- trunk/efl/src/modules/evas/engines/gl_common/evas_gl_line.c 2012-12-15 > 09:03:18 UTC (rev 81015) > +++ trunk/efl/src/modules/evas/engines/gl_common/evas_gl_line.c 2012-12-15 > 09:40:47 UTC (rev 81016) > @@ -1,12 +1,15 @@ > #include "evas_gl_private.h" > > - > void > evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, > int y2) > { > RGBA_Draw_Context *dc; > int r, g, b, a; > int c, cx, cy, cw, ch; > + static int offset_hack = -1; > + const int OFFSET_HACK_OFF = 0; > + const int OFFSET_HACK_DEFAULT = 1; > + const int OFFSET_HACK_ARM = 2; > > dc = gc->dc; > if (dc->mul.use) > @@ -28,17 +31,48 @@ > cx = gc->dc->clip.x; cy = gc->dc->clip.y; > cw = gc->dc->clip.w; ch = gc->dc->clip.h; > > - //Increment pixels since the gl line origin position is slightly > different. > - if ((gc->rot == 0) || (gc->rot == 90)) > + //I have no idea but shift lines/clips since the gl line origin position > and > + //sissor area is slightly different by the gl driver. > + if (offset_hack == -1) > { > - x1++; > - x2++; > + if (!getenv("EVAS_GL_LINE_OFFSET_HACK_DISABLE")) > + { > + const char *vendor_name; > + vendor_name = (char *) glGetString(GL_VENDOR); > + if (vendor_name && !strcmp(vendor_name, "ARM")) > + offset_hack = OFFSET_HACK_ARM; > + else > + offset_hack = OFFSET_HACK_DEFAULT; > + } > + else offset_hack = OFFSET_HACK_OFF; > } > - if ((gc->rot == 90) || (gc->rot == 180)) > + > + if (offset_hack == OFFSET_HACK_DEFAULT) > { > - y1++; > - y2++; > + if ((gc->rot == 0) || (gc->rot == 90)) > + { > + x1++; > + x2++; > + } > + if ((gc->rot == 90) || (gc->rot == 180)) > + { > + y1++; > + y2++; > + } > } > + else if (offset_hack == OFFSET_HACK_ARM) > + { > + if ((gc->rot == 90) || (gc->rot == 180)) > + { > + cx--; > + cw--; > + } > + if ((gc->rot == 180) || (gc->rot == 270)) > + { > + cy--; > + ch--; > + } > + } > > evas_gl_common_context_line_push(gc, x1, y1, x2, y2, > c, cx, cy, cw, ch, > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > -- Cedric BAIL ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel