Re: [E-devel] [EGIT] [core/efl] master 01/01: Revert "evas: allow fuzziness on the texture format returned by GL."

2013-11-27 Thread Cedric BAIL
On Wed, Nov 27, 2013 at 8:43 PM, Rafael Antognolli  wrote:
> On Tue, Nov 26, 2013 at 10:08 PM, Carsten Haitzler  
> wrote:
>> On Tue, 26 Nov 2013 13:46:11 -0200 Rafael Antognolli 
>>> On Tue, Nov 26, 2013 at 12:30 PM, Cedric BAIL  wrote:
>>> > On Tue, Nov 26, 2013 at 2:51 PM, Rafael Antognolli 
>>> > wrote:
>>> >> antognolli pushed a commit to branch master.
>>> >>
>>> >> http://git.enlightenment.org/core/efl.git/commit/?id=87385b05c3117aa8d46fd4029bfdeadf3444a7b9
>>> >>
>>> >> commit 87385b05c3117aa8d46fd4029bfdeadf3444a7b9
>>> >> Author: Rafael Antognolli 
>>> >> Date:   Tue Nov 26 11:41:54 2013 -0200
>>> >>
>>> >> Revert "evas: allow fuzziness on the texture format returned by GL."
>>> >>
>>> >> This reverts commit 2b5b3438e82a9a1bb4086864660942d3c1ddc113.
>>> >>
>>> >> Breaks gl engines when using GLES + EGL.
>>> >
>>> > In what scenario did it break things ? Can you give me the
>>> > intfmt/intfmtret that trigger the issue ? This patch is necessary for
>>> > other platform to actually work.
>>>
>>> It just doesn't build. I didn't try to debug and see if it's just a
>>> missing header or something, and sorry, I wasn't clear in the commit
>>> message.
>>>
>>> Anyway, build log attached.
>>
>> fyi (both of you( GL_RGBA8/4 etc. etc. don't normally exist in GLES... only
>> desktop GL... that's why it breaks. we have to #ifndef + #define these if we
>> want to use them (like many defines that are in gl but not gles). it's
>> harmless to keep the code "fuzz" handling even on gles... but we need to add
>> the defines if not already defined.
>
> Sure, that would work great.
>
> Just to make it clear: I'm not against this change at all, I just
> reverted the change because the Wayland build was broken and I really
> didn't have time to fix it yesterday. I'm totally fine with re-adding
> that code with your suggested fixes. I can even do it later this week
> if Cedric doesn't have enough time, but yesterday this wasn't an
> option for me.

It's already back in and fixed.

> And actually, I think this should be the standard behavior: revert any
> commit that breaks the build if the author is not around to fix it
> quickly.

When not having time to look more closely at the problem, yes, but in
the case of a revert provide at least a clue about the problem you
were facing. Your commit message wasn't really useful :-)
-- 
Cedric BAIL

--
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


Re: [E-devel] [EGIT] [core/efl] master 01/01: Revert "evas: allow fuzziness on the texture format returned by GL."

2013-11-27 Thread Rafael Antognolli
On Tue, Nov 26, 2013 at 10:08 PM, Carsten Haitzler  wrote:
> On Tue, 26 Nov 2013 13:46:11 -0200 Rafael Antognolli 
> said:
>
>> On Tue, Nov 26, 2013 at 12:30 PM, Cedric BAIL  wrote:
>> > On Tue, Nov 26, 2013 at 2:51 PM, Rafael Antognolli 
>> > wrote:
>> >> antognolli pushed a commit to branch master.
>> >>
>> >> http://git.enlightenment.org/core/efl.git/commit/?id=87385b05c3117aa8d46fd4029bfdeadf3444a7b9
>> >>
>> >> commit 87385b05c3117aa8d46fd4029bfdeadf3444a7b9
>> >> Author: Rafael Antognolli 
>> >> Date:   Tue Nov 26 11:41:54 2013 -0200
>> >>
>> >> Revert "evas: allow fuzziness on the texture format returned by GL."
>> >>
>> >> This reverts commit 2b5b3438e82a9a1bb4086864660942d3c1ddc113.
>> >>
>> >> Breaks gl engines when using GLES + EGL.
>> >
>> > In what scenario did it break things ? Can you give me the
>> > intfmt/intfmtret that trigger the issue ? This patch is necessary for
>> > other platform to actually work.
>>
>> It just doesn't build. I didn't try to debug and see if it's just a
>> missing header or something, and sorry, I wasn't clear in the commit
>> message.
>>
>> Anyway, build log attached.
>
> fyi (both of you( GL_RGBA8/4 etc. etc. don't normally exist in GLES... only
> desktop GL... that's why it breaks. we have to #ifndef + #define these if we
> want to use them (like many defines that are in gl but not gles). it's
> harmless to keep the code "fuzz" handling even on gles... but we need to add
> the defines if not already defined.

Sure, that would work great.

Just to make it clear: I'm not against this change at all, I just
reverted the change because the Wayland build was broken and I really
didn't have time to fix it yesterday. I'm totally fine with re-adding
that code with your suggested fixes. I can even do it later this week
if Cedric doesn't have enough time, but yesterday this wasn't an
option for me.

And actually, I think this should be the standard behavior: revert any
commit that breaks the build if the author is not around to fix it
quickly.

>> >> ---
>> >>  ChangeLog  |  4 ---
>> >>  NEWS   |  1 -
>> >>  .../evas/engines/gl_common/evas_gl_texture.c   | 38
>> >> +- 3 files changed, 1 insertion(+), 42 deletions(-)
>> >>
>> >> diff --git a/ChangeLog b/ChangeLog
>> >> index 95ee2ab..ec1db15 100644
>> >> --- a/ChangeLog
>> >> +++ b/ChangeLog
>> >> @@ -7,10 +7,6 @@
>> >>  * ecore anim: Fixed animator not working problem when source_set
>> >> is changed back and forth very fast.
>> >>
>> >> -2013-11-26  Cedric Bail
>> >> -
>> >> -* Evas: Allow fuzziness on the texture format returned by GL.
>> >> -
>> >>  2013-11-25  Tom Hacohen
>> >>
>> >>  * Evas textblock: Fixed wrapping of lines ending with whites.
>> >> diff --git a/NEWS b/NEWS
>> >> index e5a8bbe..856e3f4 100644
>> >> --- a/NEWS
>> >> +++ b/NEWS
>> >> @@ -228,7 +228,6 @@ Improvements:
>> >>   - Use mmap/munmap for image data allocation on system that have 
>> >> mmap.
>> >>   - Add iterator for walking child of smart objects, table and a box.
>> >>   - Use Eina_Spinlock for Evas_ScaleCache, Evas_Async_Events and
>> >> Image_Entry.
>> >> - - Allow fuzziness on the texture format returned by GL.
>> >>  * Ecore:
>> >>   - Use Eina_Spinlock for Ecore_Thread.
>> >>  * Ecore_Con:
>> >> diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c
>> >> b/src/modules/evas/engines/gl_common/evas_gl_texture.c index
>> >> 95cb3a4..1cacce3 100644
>> >> --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
>> >> +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
>> >> @@ -54,42 +54,6 @@ static const struct {
>> >>  #endif
>> >>  };
>> >>
>> >> -static const GLenum matching_rgba[] = { GL_RGBA4, GL_RGBA8, GL_RGBA12,
>> >> GL_RGBA16, 0x0 }; -static const GLenum matching_alpha[] = { GL_ALPHA4,
>> >> GL_ALPHA8, GL_ALPHA12, GL_ALPHA16, 0x0 }; -static const GLenum
>> >> matching_luminance[] = { GL_LUMINANCE4, GL_LUMINANCE8, GL_LUMINANCE12,
>> >> GL_LUMINANCE16, 0x0 }; -static const GLenum matching_luminance_alpha[] =
>> >> { GL_LUMINANCE4_ALPHA4, GL_LUMINANCE8_ALPHA8, GL_LUMINANCE12_ALPHA12,
>> >> GL_LUMINANCE16_ALPHA16, 0x0 }; - -static const struct {
>> >> -   GLenum master;
>> >> -   const GLenum *matching;
>> >> -} matching_fmt[] = {
>> >> -  { GL_RGBA, matching_rgba },
>> >> -  { GL_ALPHA, matching_alpha },
>> >> -  { GL_LUMINANCE, matching_luminance },
>> >> -  { GL_LUMINANCE_ALPHA, matching_luminance_alpha }
>> >> -};
>> >> -
>> >> -static Eina_Bool
>> >> -_evas_gl_texture_match(GLenum intfmt, GLenum intfmtret)
>> >> -{
>> >> -   unsigned int i;
>> >> -
>> >> -   if (intfmt == intfmtret) return EINA_TRUE;
>> >> -
>> >> -   for (i = 0; i < sizeof (matching_fmt) / sizeof (matching_fmt[0]); i++)
>> >> - if (matching_fmt[i].master == intfmt)
>> >> -   {
>> >> -  unsigned int j;
>> >> -
>> >> -  for (j = 0; matching_fmt[i].matc

Re: [E-devel] [EGIT] [core/efl] master 01/01: Revert "evas: allow fuzziness on the texture format returned by GL."

2013-11-26 Thread The Rasterman
On Tue, 26 Nov 2013 13:46:11 -0200 Rafael Antognolli 
said:

> On Tue, Nov 26, 2013 at 12:30 PM, Cedric BAIL  wrote:
> > On Tue, Nov 26, 2013 at 2:51 PM, Rafael Antognolli 
> > wrote:
> >> antognolli pushed a commit to branch master.
> >>
> >> http://git.enlightenment.org/core/efl.git/commit/?id=87385b05c3117aa8d46fd4029bfdeadf3444a7b9
> >>
> >> commit 87385b05c3117aa8d46fd4029bfdeadf3444a7b9
> >> Author: Rafael Antognolli 
> >> Date:   Tue Nov 26 11:41:54 2013 -0200
> >>
> >> Revert "evas: allow fuzziness on the texture format returned by GL."
> >>
> >> This reverts commit 2b5b3438e82a9a1bb4086864660942d3c1ddc113.
> >>
> >> Breaks gl engines when using GLES + EGL.
> >
> > In what scenario did it break things ? Can you give me the
> > intfmt/intfmtret that trigger the issue ? This patch is necessary for
> > other platform to actually work.
> 
> It just doesn't build. I didn't try to debug and see if it's just a
> missing header or something, and sorry, I wasn't clear in the commit
> message.
> 
> Anyway, build log attached.

fyi (both of you( GL_RGBA8/4 etc. etc. don't normally exist in GLES... only
desktop GL... that's why it breaks. we have to #ifndef + #define these if we
want to use them (like many defines that are in gl but not gles). it's
harmless to keep the code "fuzz" handling even on gles... but we need to add
the defines if not already defined.

> >> ---
> >>  ChangeLog  |  4 ---
> >>  NEWS   |  1 -
> >>  .../evas/engines/gl_common/evas_gl_texture.c   | 38
> >> +- 3 files changed, 1 insertion(+), 42 deletions(-)
> >>
> >> diff --git a/ChangeLog b/ChangeLog
> >> index 95ee2ab..ec1db15 100644
> >> --- a/ChangeLog
> >> +++ b/ChangeLog
> >> @@ -7,10 +7,6 @@
> >>  * ecore anim: Fixed animator not working problem when source_set
> >> is changed back and forth very fast.
> >>
> >> -2013-11-26  Cedric Bail
> >> -
> >> -* Evas: Allow fuzziness on the texture format returned by GL.
> >> -
> >>  2013-11-25  Tom Hacohen
> >>
> >>  * Evas textblock: Fixed wrapping of lines ending with whites.
> >> diff --git a/NEWS b/NEWS
> >> index e5a8bbe..856e3f4 100644
> >> --- a/NEWS
> >> +++ b/NEWS
> >> @@ -228,7 +228,6 @@ Improvements:
> >>   - Use mmap/munmap for image data allocation on system that have mmap.
> >>   - Add iterator for walking child of smart objects, table and a box.
> >>   - Use Eina_Spinlock for Evas_ScaleCache, Evas_Async_Events and
> >> Image_Entry.
> >> - - Allow fuzziness on the texture format returned by GL.
> >>  * Ecore:
> >>   - Use Eina_Spinlock for Ecore_Thread.
> >>  * Ecore_Con:
> >> diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c
> >> b/src/modules/evas/engines/gl_common/evas_gl_texture.c index
> >> 95cb3a4..1cacce3 100644
> >> --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
> >> +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
> >> @@ -54,42 +54,6 @@ static const struct {
> >>  #endif
> >>  };
> >>
> >> -static const GLenum matching_rgba[] = { GL_RGBA4, GL_RGBA8, GL_RGBA12,
> >> GL_RGBA16, 0x0 }; -static const GLenum matching_alpha[] = { GL_ALPHA4,
> >> GL_ALPHA8, GL_ALPHA12, GL_ALPHA16, 0x0 }; -static const GLenum
> >> matching_luminance[] = { GL_LUMINANCE4, GL_LUMINANCE8, GL_LUMINANCE12,
> >> GL_LUMINANCE16, 0x0 }; -static const GLenum matching_luminance_alpha[] =
> >> { GL_LUMINANCE4_ALPHA4, GL_LUMINANCE8_ALPHA8, GL_LUMINANCE12_ALPHA12,
> >> GL_LUMINANCE16_ALPHA16, 0x0 }; - -static const struct {
> >> -   GLenum master;
> >> -   const GLenum *matching;
> >> -} matching_fmt[] = {
> >> -  { GL_RGBA, matching_rgba },
> >> -  { GL_ALPHA, matching_alpha },
> >> -  { GL_LUMINANCE, matching_luminance },
> >> -  { GL_LUMINANCE_ALPHA, matching_luminance_alpha }
> >> -};
> >> -
> >> -static Eina_Bool
> >> -_evas_gl_texture_match(GLenum intfmt, GLenum intfmtret)
> >> -{
> >> -   unsigned int i;
> >> -
> >> -   if (intfmt == intfmtret) return EINA_TRUE;
> >> -
> >> -   for (i = 0; i < sizeof (matching_fmt) / sizeof (matching_fmt[0]); i++)
> >> - if (matching_fmt[i].master == intfmt)
> >> -   {
> >> -  unsigned int j;
> >> -
> >> -  for (j = 0; matching_fmt[i].matching[j] != 0x0; j++)
> >> -if (matching_fmt[i].matching[j] == intfmtret)
> >> -  return EINA_TRUE;
> >> -  return EINA_FALSE;
> >> -   }
> >> -
> >> -   return EINA_FALSE;
> >> -}
> >> -
> >>  static int
> >>  _evas_gl_texture_search_format(Eina_Bool alpha, Eina_Bool bgra)
> >>  {
> >> @@ -197,7 +161,7 @@ _tex_2d(Evas_Engine_GL_Context *gc, int intfmt, int w,
> >> int h, int fmt, int type)
> >>
> >>  glGetTexLevelParameteriv(GL_TEXTURE_2D, 0,
> >>   GL_TEXTURE_INTERNAL_FORMAT, &intfmtret);
> >> -if (!_evas_gl_texture_match(intfmt, intfmtret))
> >> +if (intfmtret != intfmt)
> >>{
> >>   ERR(

Re: [E-devel] [EGIT] [core/efl] master 01/01: Revert "evas: allow fuzziness on the texture format returned by GL."

2013-11-26 Thread Rafael Antognolli
On Tue, Nov 26, 2013 at 12:30 PM, Cedric BAIL  wrote:
> On Tue, Nov 26, 2013 at 2:51 PM, Rafael Antognolli  
> wrote:
>> antognolli pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=87385b05c3117aa8d46fd4029bfdeadf3444a7b9
>>
>> commit 87385b05c3117aa8d46fd4029bfdeadf3444a7b9
>> Author: Rafael Antognolli 
>> Date:   Tue Nov 26 11:41:54 2013 -0200
>>
>> Revert "evas: allow fuzziness on the texture format returned by GL."
>>
>> This reverts commit 2b5b3438e82a9a1bb4086864660942d3c1ddc113.
>>
>> Breaks gl engines when using GLES + EGL.
>
> In what scenario did it break things ? Can you give me the
> intfmt/intfmtret that trigger the issue ? This patch is necessary for
> other platform to actually work.

It just doesn't build. I didn't try to debug and see if it's just a
missing header or something, and sorry, I wasn't clear in the commit
message.

Anyway, build log attached.

>> ---
>>  ChangeLog  |  4 ---
>>  NEWS   |  1 -
>>  .../evas/engines/gl_common/evas_gl_texture.c   | 38 
>> +-
>>  3 files changed, 1 insertion(+), 42 deletions(-)
>>
>> diff --git a/ChangeLog b/ChangeLog
>> index 95ee2ab..ec1db15 100644
>> --- a/ChangeLog
>> +++ b/ChangeLog
>> @@ -7,10 +7,6 @@
>>  * ecore anim: Fixed animator not working problem when source_set is
>>  changed back and forth very fast.
>>
>> -2013-11-26  Cedric Bail
>> -
>> -* Evas: Allow fuzziness on the texture format returned by GL.
>> -
>>  2013-11-25  Tom Hacohen
>>
>>  * Evas textblock: Fixed wrapping of lines ending with whites.
>> diff --git a/NEWS b/NEWS
>> index e5a8bbe..856e3f4 100644
>> --- a/NEWS
>> +++ b/NEWS
>> @@ -228,7 +228,6 @@ Improvements:
>>   - Use mmap/munmap for image data allocation on system that have mmap.
>>   - Add iterator for walking child of smart objects, table and a box.
>>   - Use Eina_Spinlock for Evas_ScaleCache, Evas_Async_Events and 
>> Image_Entry.
>> - - Allow fuzziness on the texture format returned by GL.
>>  * Ecore:
>>   - Use Eina_Spinlock for Ecore_Thread.
>>  * Ecore_Con:
>> diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c 
>> b/src/modules/evas/engines/gl_common/evas_gl_texture.c
>> index 95cb3a4..1cacce3 100644
>> --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
>> +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
>> @@ -54,42 +54,6 @@ static const struct {
>>  #endif
>>  };
>>
>> -static const GLenum matching_rgba[] = { GL_RGBA4, GL_RGBA8, GL_RGBA12, 
>> GL_RGBA16, 0x0 };
>> -static const GLenum matching_alpha[] = { GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, 
>> GL_ALPHA16, 0x0 };
>> -static const GLenum matching_luminance[] = { GL_LUMINANCE4, GL_LUMINANCE8, 
>> GL_LUMINANCE12, GL_LUMINANCE16, 0x0 };
>> -static const GLenum matching_luminance_alpha[] = { GL_LUMINANCE4_ALPHA4, 
>> GL_LUMINANCE8_ALPHA8, GL_LUMINANCE12_ALPHA12, GL_LUMINANCE16_ALPHA16, 0x0 };
>> -
>> -static const struct {
>> -   GLenum master;
>> -   const GLenum *matching;
>> -} matching_fmt[] = {
>> -  { GL_RGBA, matching_rgba },
>> -  { GL_ALPHA, matching_alpha },
>> -  { GL_LUMINANCE, matching_luminance },
>> -  { GL_LUMINANCE_ALPHA, matching_luminance_alpha }
>> -};
>> -
>> -static Eina_Bool
>> -_evas_gl_texture_match(GLenum intfmt, GLenum intfmtret)
>> -{
>> -   unsigned int i;
>> -
>> -   if (intfmt == intfmtret) return EINA_TRUE;
>> -
>> -   for (i = 0; i < sizeof (matching_fmt) / sizeof (matching_fmt[0]); i++)
>> - if (matching_fmt[i].master == intfmt)
>> -   {
>> -  unsigned int j;
>> -
>> -  for (j = 0; matching_fmt[i].matching[j] != 0x0; j++)
>> -if (matching_fmt[i].matching[j] == intfmtret)
>> -  return EINA_TRUE;
>> -  return EINA_FALSE;
>> -   }
>> -
>> -   return EINA_FALSE;
>> -}
>> -
>>  static int
>>  _evas_gl_texture_search_format(Eina_Bool alpha, Eina_Bool bgra)
>>  {
>> @@ -197,7 +161,7 @@ _tex_2d(Evas_Engine_GL_Context *gc, int intfmt, int w, 
>> int h, int fmt, int type)
>>
>>  glGetTexLevelParameteriv(GL_TEXTURE_2D, 0,
>>   GL_TEXTURE_INTERNAL_FORMAT, &intfmtret);
>> -if (!_evas_gl_texture_match(intfmt, intfmtret))
>> +if (intfmtret != intfmt)
>>{
>>   ERR("Fail tex alloc %ix%i", w, h);
>>   //XXX send async err to evas
>>
>> --
>>
>>
>>
>
>
>
> --
> Cedric BAIL
>
> --
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> __

Re: [E-devel] [EGIT] [core/efl] master 01/01: Revert "evas: allow fuzziness on the texture format returned by GL."

2013-11-26 Thread Cedric BAIL
On Tue, Nov 26, 2013 at 2:51 PM, Rafael Antognolli  wrote:
> antognolli pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=87385b05c3117aa8d46fd4029bfdeadf3444a7b9
>
> commit 87385b05c3117aa8d46fd4029bfdeadf3444a7b9
> Author: Rafael Antognolli 
> Date:   Tue Nov 26 11:41:54 2013 -0200
>
> Revert "evas: allow fuzziness on the texture format returned by GL."
>
> This reverts commit 2b5b3438e82a9a1bb4086864660942d3c1ddc113.
>
> Breaks gl engines when using GLES + EGL.

In what scenario did it break things ? Can you give me the
intfmt/intfmtret that trigger the issue ? This patch is necessary for
other platform to actually work.

> ---
>  ChangeLog  |  4 ---
>  NEWS   |  1 -
>  .../evas/engines/gl_common/evas_gl_texture.c   | 38 
> +-
>  3 files changed, 1 insertion(+), 42 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index 95ee2ab..ec1db15 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -7,10 +7,6 @@
>  * ecore anim: Fixed animator not working problem when source_set is
>  changed back and forth very fast.
>
> -2013-11-26  Cedric Bail
> -
> -* Evas: Allow fuzziness on the texture format returned by GL.
> -
>  2013-11-25  Tom Hacohen
>
>  * Evas textblock: Fixed wrapping of lines ending with whites.
> diff --git a/NEWS b/NEWS
> index e5a8bbe..856e3f4 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -228,7 +228,6 @@ Improvements:
>   - Use mmap/munmap for image data allocation on system that have mmap.
>   - Add iterator for walking child of smart objects, table and a box.
>   - Use Eina_Spinlock for Evas_ScaleCache, Evas_Async_Events and 
> Image_Entry.
> - - Allow fuzziness on the texture format returned by GL.
>  * Ecore:
>   - Use Eina_Spinlock for Ecore_Thread.
>  * Ecore_Con:
> diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c 
> b/src/modules/evas/engines/gl_common/evas_gl_texture.c
> index 95cb3a4..1cacce3 100644
> --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
> +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
> @@ -54,42 +54,6 @@ static const struct {
>  #endif
>  };
>
> -static const GLenum matching_rgba[] = { GL_RGBA4, GL_RGBA8, GL_RGBA12, 
> GL_RGBA16, 0x0 };
> -static const GLenum matching_alpha[] = { GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, 
> GL_ALPHA16, 0x0 };
> -static const GLenum matching_luminance[] = { GL_LUMINANCE4, GL_LUMINANCE8, 
> GL_LUMINANCE12, GL_LUMINANCE16, 0x0 };
> -static const GLenum matching_luminance_alpha[] = { GL_LUMINANCE4_ALPHA4, 
> GL_LUMINANCE8_ALPHA8, GL_LUMINANCE12_ALPHA12, GL_LUMINANCE16_ALPHA16, 0x0 };
> -
> -static const struct {
> -   GLenum master;
> -   const GLenum *matching;
> -} matching_fmt[] = {
> -  { GL_RGBA, matching_rgba },
> -  { GL_ALPHA, matching_alpha },
> -  { GL_LUMINANCE, matching_luminance },
> -  { GL_LUMINANCE_ALPHA, matching_luminance_alpha }
> -};
> -
> -static Eina_Bool
> -_evas_gl_texture_match(GLenum intfmt, GLenum intfmtret)
> -{
> -   unsigned int i;
> -
> -   if (intfmt == intfmtret) return EINA_TRUE;
> -
> -   for (i = 0; i < sizeof (matching_fmt) / sizeof (matching_fmt[0]); i++)
> - if (matching_fmt[i].master == intfmt)
> -   {
> -  unsigned int j;
> -
> -  for (j = 0; matching_fmt[i].matching[j] != 0x0; j++)
> -if (matching_fmt[i].matching[j] == intfmtret)
> -  return EINA_TRUE;
> -  return EINA_FALSE;
> -   }
> -
> -   return EINA_FALSE;
> -}
> -
>  static int
>  _evas_gl_texture_search_format(Eina_Bool alpha, Eina_Bool bgra)
>  {
> @@ -197,7 +161,7 @@ _tex_2d(Evas_Engine_GL_Context *gc, int intfmt, int w, 
> int h, int fmt, int type)
>
>  glGetTexLevelParameteriv(GL_TEXTURE_2D, 0,
>   GL_TEXTURE_INTERNAL_FORMAT, &intfmtret);
> -if (!_evas_gl_texture_match(intfmt, intfmtret))
> +if (intfmtret != intfmt)
>{
>   ERR("Fail tex alloc %ix%i", w, h);
>   //XXX send async err to evas
>
> --
>
>
>



-- 
Cedric BAIL

--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: Revert "evas: allow fuzziness on the texture format returned by GL."

2013-11-26 Thread Rafael Antognolli
antognolli pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=87385b05c3117aa8d46fd4029bfdeadf3444a7b9

commit 87385b05c3117aa8d46fd4029bfdeadf3444a7b9
Author: Rafael Antognolli 
Date:   Tue Nov 26 11:41:54 2013 -0200

Revert "evas: allow fuzziness on the texture format returned by GL."

This reverts commit 2b5b3438e82a9a1bb4086864660942d3c1ddc113.

Breaks gl engines when using GLES + EGL.
---
 ChangeLog  |  4 ---
 NEWS   |  1 -
 .../evas/engines/gl_common/evas_gl_texture.c   | 38 +-
 3 files changed, 1 insertion(+), 42 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 95ee2ab..ec1db15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,10 +7,6 @@
 * ecore anim: Fixed animator not working problem when source_set is
 changed back and forth very fast.
 
-2013-11-26  Cedric Bail
-
-* Evas: Allow fuzziness on the texture format returned by GL.
-
 2013-11-25  Tom Hacohen
 
 * Evas textblock: Fixed wrapping of lines ending with whites.
diff --git a/NEWS b/NEWS
index e5a8bbe..856e3f4 100644
--- a/NEWS
+++ b/NEWS
@@ -228,7 +228,6 @@ Improvements:
  - Use mmap/munmap for image data allocation on system that have mmap.
  - Add iterator for walking child of smart objects, table and a box.
  - Use Eina_Spinlock for Evas_ScaleCache, Evas_Async_Events and 
Image_Entry.
- - Allow fuzziness on the texture format returned by GL.
 * Ecore:
  - Use Eina_Spinlock for Ecore_Thread.
 * Ecore_Con:
diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c 
b/src/modules/evas/engines/gl_common/evas_gl_texture.c
index 95cb3a4..1cacce3 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -54,42 +54,6 @@ static const struct {
 #endif
 };
 
-static const GLenum matching_rgba[] = { GL_RGBA4, GL_RGBA8, GL_RGBA12, 
GL_RGBA16, 0x0 };
-static const GLenum matching_alpha[] = { GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, 
GL_ALPHA16, 0x0 };
-static const GLenum matching_luminance[] = { GL_LUMINANCE4, GL_LUMINANCE8, 
GL_LUMINANCE12, GL_LUMINANCE16, 0x0 };
-static const GLenum matching_luminance_alpha[] = { GL_LUMINANCE4_ALPHA4, 
GL_LUMINANCE8_ALPHA8, GL_LUMINANCE12_ALPHA12, GL_LUMINANCE16_ALPHA16, 0x0 };
-
-static const struct {
-   GLenum master;
-   const GLenum *matching;
-} matching_fmt[] = {
-  { GL_RGBA, matching_rgba },
-  { GL_ALPHA, matching_alpha },
-  { GL_LUMINANCE, matching_luminance },
-  { GL_LUMINANCE_ALPHA, matching_luminance_alpha }
-};
-
-static Eina_Bool
-_evas_gl_texture_match(GLenum intfmt, GLenum intfmtret)
-{
-   unsigned int i;
-
-   if (intfmt == intfmtret) return EINA_TRUE;
-
-   for (i = 0; i < sizeof (matching_fmt) / sizeof (matching_fmt[0]); i++)
- if (matching_fmt[i].master == intfmt)
-   {
-  unsigned int j;
-
-  for (j = 0; matching_fmt[i].matching[j] != 0x0; j++)
-if (matching_fmt[i].matching[j] == intfmtret)
-  return EINA_TRUE;
-  return EINA_FALSE;
-   }
-
-   return EINA_FALSE;
-}
-
 static int
 _evas_gl_texture_search_format(Eina_Bool alpha, Eina_Bool bgra)
 {
@@ -197,7 +161,7 @@ _tex_2d(Evas_Engine_GL_Context *gc, int intfmt, int w, int 
h, int fmt, int type)
 
 glGetTexLevelParameteriv(GL_TEXTURE_2D, 0,
  GL_TEXTURE_INTERNAL_FORMAT, &intfmtret);
-if (!_evas_gl_texture_match(intfmt, intfmtret))
+if (intfmtret != intfmt)
   {
  ERR("Fail tex alloc %ix%i", w, h);
  //XXX send async err to evas

--