Hi, sung. I added that code.

If you wonder, then please test this code.

http://pastebin.com/US4nizya


and compare the result gl and software.


Without the fidding line coordinate, you can see the different result.


------------------------------------

-Regards, Hermet-

-----Original Message-----
From: "Enlightenment SVN"<[email protected]> 
To: <[email protected]>; 
Cc: 
Sent: 2012-12-07 (금) 17:28:42
Subject: E SVN: sung IN trunk/efl: . src/modules/evas/engines/gl_common

Log:
Added EVAS_GL_LINE_NO_OFFSET_HACK evn var control to handle
  line coordinate fiddling in gl line drawing code.  This fiddling
  caused issues on some GPU drivers on ARM target.
  
  

Author:       sung
Date:         2012-12-07 00:28:42 -0800 (Fri, 07 Dec 2012)
New Revision: 80417
Trac:         http://trac.enlightenment.org/e/changeset/80417

Modified:
  trunk/efl/ChangeLog 
trunk/efl/src/modules/evas/engines/gl_common/evas_gl_line.c 

Modified: trunk/efl/ChangeLog
===================================================================
--- trunk/efl/ChangeLog 2012-12-07 08:05:17 UTC (rev 80416)
+++ trunk/efl/ChangeLog 2012-12-07 08:28:42 UTC (rev 80417)
@@ -1,3 +1,9 @@
+2012-12-07 Sung W. Park (sung_)
+
+       * Added EVAS_GL_LINE_NO_OFFSET_HACK to turn off the line coordinate
+          fiddling that was originally in the gl backend code. The offset 
+          fiddling caused issues with some ARM target GPU drivers.
+
 2012-12-05  Gustavo Sverzut Barbieri (k-s)
 
        * Removed DirectFB support (both ecore_directfb, evas and ecore_evas).

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-07 
08:05:17 UTC (rev 80416)
+++ trunk/efl/src/modules/evas/engines/gl_common/evas_gl_line.c 2012-12-07 
08:28:42 UTC (rev 80417)
@@ -1,12 +1,19 @@
 #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;
 
+   if (offset_hack == -1) {
+        if (getenv("EVAS_GL_LINE_NO_OFFSET_HACK")) offset_hack = 0;
+        else offset_hack = 1;
+   }
+
    dc = gc->dc;
    if (dc->mul.use)
      {
@@ -27,21 +34,26 @@
    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 (x1 == x2)
+   if (offset_hack)
      {
-        if (gc->rot == 0)
-          x1++;
-     }
+        /* Increment pixels since the gl line origin position is slightly 
different
+           on some platform.  Carsten did this hack.. doesn't remember exactly 
why but
+           it works most drivers. */
+        if (x1 == x2)
+          {
+             if (gc->rot == 0)
+                x1++;
+          }
 
-   if (y1 == y2)
-     {
-        if ((gc->rot == 90) || (gc->rot == 180))
-          y1++;
+        if (y1 == y2)
+          {
+             if ((gc->rot == 90) || (gc->rot == 180))
+                y1++;
+          }
+
+        x2++; y2++;
      }
 
-   x2++; y2++;
-
    evas_gl_common_context_line_push(gc, x1, y1, x2, y2,
                                     c, cx, cy, cw, ch,
                                     r, g, b, a);


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-svn


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to