hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=72c5b5fb270b0e7b533b52321532663665764196

commit 72c5b5fb270b0e7b533b52321532663665764196
Author: jiin.moon <jiin.m...@samsung.com>
Date:   Fri Aug 7 15:10:02 2015 +0900

    elm_win: add new condition about engine set when generate the elm_win object
    
    Summary:
    Calling the elm_config_accel_preference_get api with "none" as parameter,
    it means user does not want to use acceleration.
    
    Reviewers: Hermet
    
    Reviewed By: Hermet
    
    Differential Revision: https://phab.enlightenment.org/D2920
---
 src/lib/elm_config.h | 1 +
 src/lib/elm_win.c    | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_config.h b/src/lib/elm_config.h
index 786174e..ce1b45c 100644
--- a/src/lib/elm_config.h
+++ b/src/lib/elm_config.h
@@ -919,6 +919,7 @@ EAPI const char *elm_config_accel_preference_get(void);
  * "gl", "opengl" - try use OpenGL.
  * "3d" - try and use a 3d acceleration unit.
  * "hw", "hardware", "accel" - try any acceleration unit (best possible)
+ * "none" - use no acceleration. try use software
  *
  * Since 1.14, it is also possible to specify some GL properties for the GL
  * window surface. This allows applications to use GLView with depth, stencil
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 3fafa50..f27d425 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -3492,8 +3492,12 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, 
const char *name, Elm_Win_
              else
                {
 // add all engines with selected engine first - if any
-                  enginelist[p++] = ENGINE_GET();
-
+                  if (elm_config_preferred_engine_get())
+                    enginelist[p++] = elm_config_preferred_engine_get();
+// add check _elm_gl_preference whether "none" or not
+                  else if (!elm_config_accel_preference_get() ||
+                           strcmp(elm_config_accel_preference_get(),"none"))
+                    enginelist[p++] = elm_config_engine_get();
 // add all engines with gl/accelerated ones first - only engines compiled
 #ifdef HAVE_ELEMENTARY_X
                   enginelist[p++] = ELM_SOFTWARE_X11;

-- 


Reply via email to