Subject: [E-devel] [Review] [Patch] Evas - OpenGL on Evas: surface
texture creation patch
I'm attaching a patch that addresses the awkward usage case. It's something
that didn't bother me initially but the more I look at it, i think
it's a little off. :-)
The initial version of the evas_gl that I've submitted had the
following use case.
evasgl = evas_gl_new(e);
sfc = evas_gl_surface_create(...);
ctx = evas_gl_context_create(...);
// Make current triggers surface texture and FBO to be created
evas_gl_make_current(evasgl, sfc, ctx);
// Then you can do a surface_get to retrieve the proper texture and set it
evas_gl_native_surface_get(evasgl, sfc, &ns);
evas_object_image_native_surface_set(img_obj, &ns);
The unnatural thing about this use case is that you have to call the make_current
one time in order for evas_gl to generate a surface texture. This is because
you need a context to create a texture. Unfortunately, this makes the usage
case really awkward.
So, instead, I've decided to get rid of the need for calling the make_current
by generating a surface texture when evas_gl_surface_create() is called
by using the evas' gl context. This works because the newly created context
shares resources with evas. in fact, this is what i'm currently doing with surface
deletion anyway so I thought this solution was reasonable.
Here's how it looks after you get rid of the make_current:
evasgl = evas_gl_new(e);
sfc = evas_gl_surface_create(...);
ctx = evas_gl_context_create(...);
evas_gl_native_surface_get(evasgl, sfc, &ns);
evas_object_image_native_surface_set(img_obj, &ns);
The patch is pretty small and straightforward.
SVN revision: 58892
Patch from Thierry el Borgi with some rework of myself.
NOTE: I don't have much file to test, so if some don't
contact us with those file and we will fix the loader
if needed.
SVN revision: 58873
This fix is just until we finally split to scripts and cache fi all
the time, i.e in all the possible paths (regular, fribidi and harfbuzz).
SVN revision: 58806
(part of the evas-gl work)
the patch basically checks to see if the current context is evas' gl context
and if it is, it'll call evas_gl_common_context_flush(). I think this
is the proper
SVN revision: 58786
Kerning: We are walking the string visually so we don't need to do
anything special for kerning when in rtl, freetype works with "left" and
"right" which we automatically get.
Rendering bug: Cedric found that in some cases there were missing
characters. This was caused because I forgot to convert the kerning from
16.6 fixed point to int.
SVN revision: 58783
etc. etc. in corner-cases. it also re-factors the image cache code to
be much more manageable and understandable with cache/list management
doing the right thing in the internal calls.
SVN revision: 58779
We don't need to do any tricks anymore because size calculation is now
very fast, as fast as the tricks we did, so it's best to just do what
we really want to do.
SVN revision: 58757
We only really use adavnce for calculating the pen position, so it makes more
sense to just cache the pen_position instead and calculate advance from
that if ever needed.
This means size/advance calculations are now O(1) because we don't need to
walk the strings anymore.
SVN revision: 58756
as there was no cleanup.. and the method of exposing
evas_filter_key_get() was so out of step with any other code i have
ever seen.. letalong evas... fix.
SVN revision: 58747