Commit Graph

923 Commits

Author SHA1 Message Date
Cedric BAIL 0dbc99f33a evas: remove software SDL engine, use buffer engine directly.
NOTE: I would like to do the same with software SDL 16bits engine.
But as we don't have a buffer_16 backend, I am likely to just remove
it and use buffer conversion code to match a 16bits target. This
will come with a performance impact, that will make it useless. So
I am just tempted to completly remove it.


SVN revision: 68352
2012-02-23 16:25:07 +00:00
Vincent Torri 4060b7d96e Evas: remove WIN32_CPPFLAGS and WIN32_CFLAGS are there are not used anymore. Move some headers in evas_common.h
SVN revision: 68100
2012-02-18 08:33:00 +00:00
ChunEon Park 839b56769a evas/gl_common - set line color with draw context.
SVN revision: 67870
2012-02-13 05:05:59 +00:00
Carsten Haitzler a3672c0048 let's link to the right libs for wayland shm eh?
SVN revision: 67754
2012-02-08 11:21:05 +00:00
Sung Park 4f4a904816 Fixing my silly mistake before someone else catches it.
I was accessing a variable before it was NULL checked. 
Fixed now.



SVN revision: 67601
2012-01-30 11:21:38 +00:00
Gustavo Sverzut Barbieri 8ca2f1bcaa The polygon drawing code for the DirectFB backend incorrectly casts a
void pointer causing a segfault. The attached patch fixes the issue
and allows an expedite run to complete.

By: Will Newton <will.newton@gmail.com>



SVN revision: 67543
2012-01-25 18:40:22 +00:00
Sung Park 14a94f1a8f Fixed a logic error for Evas GL Direct rendering override
option.

It should have been OR instead of AND operator.

When the image object alpha is on "OR" the rotation angle 
is not "0", direct rendering isn't allowed.  However,  
allow direct rendering if EVAS_GL_DIRECT_OVERRIDE=1 is set. 




SVN revision: 67521
2012-01-25 05:08:23 +00:00
Sung Park 9afd5b3f3f Added Direct Rendering to Evas' window instead of an FBO in Evas_GL.
This optimization is significant for rendering to a large surface 
because it'l save an extra copy overhead as well as an extra rendering pass.

To enable it, you can give EVAS_GL_OPTIONS_DIRECT hint in the surface
config options_bits. The following conditions have to be met in order
for evas to render directly into the Evas' window. If they are not met, the 
engine will fallback to rendering to an FBO as it normally does. 

conditions: 
1.) All the GL calls have to be called using the pixel_get_callback function.
This is necessary for the evas object order to be maintained.
2.) Alpha must be disabled on the image ojbect that renders evas_gl.
3.) No rotation allowed.

One way to override above condition is to set EVAS_GL_DIRECT_OVERRIDE=1 but 
there is no guarantee in its behavior.

Currently, this optimization is added for gl_x11 engine only. 




SVN revision: 67388
2012-01-20 12:29:14 +00:00
Gustavo Sverzut Barbieri 30a5c9e1f7 oopps!
SVN revision: 67354
2012-01-19 16:52:58 +00:00
Gustavo Sverzut Barbieri 9a47bffc98 fix gcc warnings about set-but-unused and shadows of y1.
NOTE: did not touch mess that is jpeg, someone else can deal with it :-P



SVN revision: 67353
2012-01-19 16:49:47 +00:00
Cedric BAIL 54fdc48d6a evas: add double buffer support to buffer engine.
NOTE: This patch is a first step to replace and remove
Evas SDL Software backend.


SVN revision: 67347
2012-01-19 15:17:24 +00:00
Christopher Michael 1a34b86f34 Evas (wayland_egl): Fix 'close' of windows. Basically, we will check
if the eng setup has a NULL surface, and if the RenderEngine has an
existing surface, that means we are hiding/closing the window, and
thus should free the existing RenderEngine Window.



SVN revision: 67160
2012-01-12 23:58:17 +00:00
Sung Park 20b3d52669 Added new Evas GL api called evas_gl_config_new/free()
to ensure backward compatibility.  Previously, the user
simply declared a Evas_GL_Config object but this can
cause problems if more config options are added.  So,
we have Evas allocate the config object for the user
so it can handle addition in the future.

Also, added some safety code around _extensions_init


SVN revision: 67141
2012-01-12 13:54:06 +00:00
Christopher Michael 71e63d268f Evas (wayland_egl): Remove printfs (done debugging that).
SVN revision: 67140
2012-01-12 13:10:53 +00:00
Christopher Michael a75b3126b2 Evas (gl_x11): Move make current so we only have one if.
SVN revision: 67137
2012-01-12 12:25:21 +00:00
Christopher Michael c0dd6f7975 Evas (wayland_egl): Fix egl detection in check_engine. (In theory, the
old version of this w/ the 3 includes Should be working, but I've
tested it on 2 machines now, and it fails on both with those lines in
there, so I am removing them).

Make wayland_egl engine Actually work and draw stuff now (too many
code changes to list them all separately). See http://i.imgur.com/i2eBE.png.




SVN revision: 67128
2012-01-12 09:01:37 +00:00
Christopher Michael dd7d556916 Evas (gl_x11): We cannot call eglMakeCurrent if we have already called
eglTerminate prior (eg: eglTerminate was in the wrong place here).



SVN revision: 67119
2012-01-12 06:06:07 +00:00
Christopher Michael f33a71339c Evas (wayland_egl): Oops, missed one rename on the engine info
structure.



SVN revision: 67102
2012-01-11 23:32:58 +00:00
Christopher Michael 42e82f9092 Evas (wayland_egl): Update code to use more descriptive name for
engine_info_structure.



SVN revision: 67100
2012-01-11 23:28:39 +00:00
Christopher Michael 17b8c59425 Evas (wayland_egl): Use a more descriptive name for the engine info
structure.



SVN revision: 67099
2012-01-11 23:28:01 +00:00
Christopher Michael 34ab2ff6cd Evas (wayland_egl): Destroy the wl_egl_window also when we free.
SVN revision: 67075
2012-01-11 12:58:59 +00:00
Christopher Michael e89e7d8ef5 Evas (wayland_egl): Use proper header name. Remove commented line.
SVN revision: 67074
2012-01-11 12:41:08 +00:00
Christopher Michael ad8ca8457c Evas (wayland_egl): Redo wayland egl engine code to more closely match
gl_x11.

NB: Not fully functional yet, but does build.



SVN revision: 67073
2012-01-11 12:23:44 +00:00
Christopher Michael 98f19e05fe Evas (wayland_egl): Remove obsolete file (replacing in a minute).
SVN revision: 67072
2012-01-11 12:22:36 +00:00
Christopher Michael 0b6f56aa34 Evas (software_generic): Add UNUSED for params that are not used
(where missing).
Remove unused variables.
Comment out functions that were defined but not used.



SVN revision: 67066
2012-01-11 10:40:17 +00:00
Christopher Michael dec27dd7de Evas (gl_common): Remove unused variable.
SVN revision: 67064
2012-01-11 10:35:52 +00:00
Christopher Michael 4e103ad78c Evas (gl_x11): Fix no return value in function that is supposed to
have Something returned.



SVN revision: 67063
2012-01-11 10:34:03 +00:00
Christopher Michael 2e70a02465 Evas (gl_x11 engine): Fix compiler warning about get_time function.
SVN revision: 67058
2012-01-11 09:48:47 +00:00
Youness Alaoui 3cbe46ccc9 Evas: engine for Mac is GL_COCOA not GL_QUARTZ
SVN revision: 66964
2012-01-08 07:21:35 +00:00
Cedric BAIL 8a4dfb08c1 evas: just disable Evas_GL support in software engine when we don't have dlopen.
NOTE: there is many system without dlopen and we do support them. Please keep it
this way in the future.


SVN revision: 66901
2012-01-05 12:59:08 +00:00
Sung Park 2f6b837c7c Added EvasGL support for software backend finally.
* This feature requires libOSMesa to be installed.   

One caveat with OSMesa is that a surface config (ie. Depth Buffer and etc)
is associated with a context rather than a surface, which is the case 
in EvasGL.  So for now, when a user specifies a surface config, it gets 
associated with the first context that the surface does a make current to.
For typical usage case, this shouldn't be a prolem. Will need to fix it 
eventually.




SVN revision: 66896
2012-01-05 07:55:23 +00:00
Carsten Haitzler 3f915e1e3f oops dont enable copy path!
SVN revision: 66727
2012-01-02 03:32:57 +00:00
Carsten Haitzler 8e4391d38b make some more notes for partial swap (copy gabk to front) but still
doesnt work.. just sits there and does nothing. wtf.



SVN revision: 66726
2012-01-02 03:30:23 +00:00
Carsten Haitzler 4273f5846c found nvidia eat-cpu-bug. glXWaitGL() spins using all cpu it can find,
though nvidia fixed the spinning on glXSwapBuffers() long ago, they
didn't fix this one.



SVN revision: 66710
2012-01-01 06:47:16 +00:00
Christopher Michael 26fcca18b7 Evas: Add Wayland EGL engine (still experimental).
SVN revision: 66541
2011-12-26 23:13:52 +00:00
Christopher Michael b6b9744f19 Evas (Wayland Shm Engine): Cleanup of commented out code. Fix
calculation of update region.



SVN revision: 66540
2011-12-26 23:12:50 +00:00
Christopher Michael b560f1fc1a Evas (Wayland_Shm Engine): Check for valid RGBA_Image before trying to
use it. Use correct stride calculation for bytes.



SVN revision: 66539
2011-12-26 23:12:05 +00:00
Michael BOUCHAUD aec13b5d41 evas: forget to overide this in gl, fix evas_object_image_region_support_get
SVN revision: 66480
2011-12-23 12:00:52 +00:00
Sanghee Park 550b8417c7 From: Sanghee Park <sh15.park@samsung.com>
Subject: Drawing objects by pixman

        * Extend pixman support to allow other operations to use
          pixman when doing software rendering. On x86 this isn't useful
          but on ARMv7 with NEON pixman happens to do better with image
          blending and nearest scale blending.
        * Add tiled rotator for 32bit display as an option.



SVN revision: 66478
2011-12-23 11:50:29 +00:00
Carsten Haitzler dbc5afdee2 sorry sungwoo - going to have to back this dlopen/dlsym styuff out.
intel drivers don;'t like it for some odd reason - i'm trying to track
it down but i can't sanely try middlegrounds right now (eg dont
dlopen/dlsym but actually directly assign symbols etc.), so back out
and let's figure this out before it goes back in :(



SVN revision: 66308
2011-12-18 05:03:24 +00:00
Christopher Michael cbbe439629 Evas: Gl_X11: Fix typo? for __UNUSED__ param.
SVN revision: 66224
2011-12-14 18:52:42 +00:00
Christopher Michael 0fccea0dee Evas: Add a Wayland Shared Memory engine (similar to the buffer &
framebuffer engines). Add Evas framespace set/get functions.



SVN revision: 66223
2011-12-14 18:44:20 +00:00
Christopher Michael b3d6859de5 Evas: Software_Generic: Fix typo? for __UNUSED__.
SVN revision: 66222
2011-12-14 18:27:29 +00:00
Michael BOUCHAUD 33eb1e5e79 evas: Add api to know if an evas_object_image could support region
SVN revision: 66170
2011-12-13 16:58:20 +00:00
Christopher Michael 9935288eaa Evas (gl engine): Remove incorrect __UNUSED__ on paramaters that are
actually used.



SVN revision: 65928
2011-12-06 00:44:25 +00:00
Carsten Haitzler c75637b6bf remove warnings!
SVN revision: 65896
2011-12-05 09:26:04 +00:00
Carsten Haitzler e477ff0629 remove warning - bug ready to happen with fastpath. didnt pass
sharedlist or direct down.



SVN revision: 65895
2011-12-05 09:18:05 +00:00
Carsten Haitzler 9f5a8809c7 fix gles/egl bugs/issues in sungwoo's new patch
SVN revision: 65894
2011-12-05 09:05:04 +00:00
Carsten Haitzler 5967841988 I'm attaching a patch for the initial version of the GL Fastpath
addition to evas gl backend.

Working on different mobile devices, we've noticed that the cost of context
switch (MakeCurrent) in GL can be very expensive depending on the driver
implementation.  To minimize the poorly written driver's context switch
overhead, I've implemented a state tracking layer on top of the driver
implemented GL.

Essentially, this layer wraps all the GL/Glue(GLX/EGL) APIs and manages its own
state changes.  Internally, only one real GL context is created and logical
contexts are created every time a user requests context creation.  The logical
contexts keep track of its states and sets only the necessary states
(the ones that are different than the current ones)
when there is a MakeCurrent request.  The real MakeCurrent gets called when
there is a Surface/Window change request.

The GL library is dlopened and all the APIs are dlsym'ed and wrapped
accordingly.  All the GL functions are in evas_gl_core.{h,c}.

Here's a very simply flow of the code.
   - all the APIs are exported as function pointers (*glsym_glBegin),
     (*glsm_eglCreatContext), and etc.
   - all the native GL/Glue(GLX/EGL) APIs are dlsym'ed as _sym_glBegin,
     _sym_eglCreateContext, and etc.
   - all the fastpath APIs are implmemnted as fpgl_glBegin,
     fpgl_eglCreateContext, and etc.
   - if faspath is seletected, the exported APIs are set accordingly
     ie. glsym_glBegin = fpgl_glBegin;
   - default mode is the regular gl symbols are directly set.
     ie. glsym_glBegin = _sym_glBegin;
             
I have an Environment variable where you can set it to three different Modes

EVAS_GL_FASTPATH = 0    // Default mode. Regular GL symbols are directly loaded
EVAS_GL_FASTPATH = 1    // Fastpath mode. Takes the path described above.
EVAS_GL_FASTPATH = 2    // Wrapped mode.  All the regular GL functions are
                           wrapped once.  This can be used for various
purposes

Since all the GL symbols are now loaded in this library, I took out all
the gl symbol loading parts in the evas gl backend as you'll see in the patch.
The changes to the engine and the backend itself is pretty minor.

There are still some known issues to hammer out but I thought we're at a good
place for an initial version so that my source doesn't diverge too much.

Known Issues and To Do's
* Current GL Fastpath version doesn't support multiple threads. Instead of
  having one global real context, I would need to do it for each thread. I'll
  get on this soon.
  
  * Issues running Evas GL on certain conditions.  When running the elementary
  test (with gl engine), if you run ELMGLview test that runs in ON_DEMAND mode,
  everything works fine. BUT, when you run the ELMGLView test in ALWAYS
    mode, the subsequent elm tests shows blank screen. When you destroy the
  GLView window, everything else comes on fine.
  
  * Resource protection code.  This actually applies to Evas GL code in general
  as well. Since all the resources are shared among all the contexts that get
  created, I would like to eventually have a resource protecting mechanism that
  prevents access to resources outside of its context unless specifically
  specified.
  
  I'm attaching three files
     - evas_gl_core.h, evas_gl_core.c, fastpath.patch
     
  To get the code running...
     - copy evas_gl_core.{c,h} to src/modules/engine/gl_common/
     - apply the fastpath.patch
     - compile/install evas
     - to run with fastpath GL (ie. % EVAS_GL_FASTPATH=1 ./evasgl_sample1)



SVN revision: 65891
2011-12-05 08:54:14 +00:00
Christopher Michael f0b80715e4 Evas: Add missing __UNUSED__ in buffer engine.
SVN revision: 65614
2011-11-27 16:27:02 +00:00