> the patch itself... why the #ifdef? when checking for extensions, we look for
> strings, and not defined macros.
I think #ifdef is needed because token EGL_Y_INVERTED_NOK might not be declared 
in
EGL headers and then compilation will fail

> also extension checks are done in gl_extn_veto
> () (which lets us go assume an extension is there then veto it if its not and
> save that value). so no need to do it every single time with the query
> string... :)
Ok, I'll fix this and send patch v2

On 11/28/2013 08:21 AM, Carsten Haitzler (The Rasterman) wrote:
> On Wed, 27 Nov 2013 15:39:06 +0400 Stanislav Vorobiov <s.vorob...@samsung.com>
> said:
> 
> the patch itself... why the #ifdef? when checking for extensions, we look for
> strings, and not defined macros. also extension checks are done in 
> gl_extn_veto
> () (which lets us go assume an extension is there then veto it if its not and
> save that value). so no need to do it every single time with the query
> string... :)
> 
>> Instead of hardcoding yinvert=1 we should query for
>> EGL_NOK_texture_from_pixmap extension and if it's present
>> use EGL_Y_INVERTED_NOK value
>> ---
>>  src/modules/evas/engines/gl_x11/evas_engine.c |   17 ++++++++++++++++-
>>  1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c
>> b/src/modules/evas/engines/gl_x11/evas_engine.c index d25610f..da25019 100644
>> --- a/src/modules/evas/engines/gl_x11/evas_engine.c
>> +++ b/src/modules/evas/engines/gl_x11/evas_engine.c
>> @@ -2225,6 +2225,7 @@ eng_image_native_set(void *data, void *image, void
>> *native) EGLConfig egl_config;
>>                int config_attrs[20];
>>                int num_config, i = 0;
>> +              int yinvert = 1;
>>  
>>                eina_hash_add(re->win->gl_context->shared->native_pm_hash,
>> &pmid, im); 
>> @@ -2250,6 +2251,20 @@ eng_image_native_set(void *data, void *image, void
>> *native) if (!eglChooseConfig(re->win->egl_disp, config_attrs,
>>                                     &egl_config, 1, &num_config))
>>                  ERR("eglChooseConfig() failed for pixmap 0x%x, num_config = 
>> %
>> i", (unsigned int)pm, num_config); +#ifdef EGL_NOK_texture_from_pixmap
>> +              else
>> +                {
>> +                  const char *evasglexts = eglQueryString(re->win->egl_disp,
>> EGL_EXTENSIONS); +
>> +                  if (evasglexts && (strstr(evasglexts,
>> "EGL_NOK_texture_from_pixmap") != NULL))
>> +                    {
>> +                      int val;
>> +                      if (eglGetConfigAttrib(re->win->egl_disp, egl_config,
>> +                                             EGL_Y_INVERTED_NOK, &val))
>> +                        yinvert = val;
>> +                    }
>> +                }
>> +#endif
>>                memcpy(&(n->ns), ns, sizeof(Evas_Native_Surface));
>>                n->pixmap = pm;
>>                n->visual = vis;
>> @@ -2263,7 +2278,7 @@ eng_image_native_set(void *data, void *image, void
>> *native) ERR("Try eglCreateImage on EGL with no support");
>>                if (!n->egl_surface)
>>                  ERR("eglCreatePixmapSurface() for 0x%x failed", (unsigned
>> int)pm);
>> -              im->native.yinvert     = 1;
>> +              im->native.yinvert     = yinvert;
>>                im->native.loose       = 0;
>>                im->native.data        = n;
>>                im->native.func.data   = re;
>> -- 
>> 1.7.9.5
>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT 
>> organizations don't have a clear picture of how application performance 
>> affects their revenue. With AppDynamics, you get 100% visibility into your 
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics 
>> Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>> _______________________________________________
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
> 
> 


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to