I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
- Remove @beta flags,
- Update @since to match stabilization,
- Change methods to properties with keys,
- Use eo_prefix and add filter_ prefix to all properties since
they use very generic names,
The filter API stays under Efl.Gfx since there are other kinds of
filters, and this one is the particular "graphical filter" or
"effect" API.
The EO API mostly not change from an application point of view,
except for "source_get" which now returns a string directly. Also,
state and data can now be queried.
SW async render mode was broken because it was party sync, partly
async (bad hack in a recent commit). This patch fixes that by
using a proper callback for render_post (main loop).
Since the engines and ector now abstract all pixel access functions,
the only difference between GL and SW is the async rendering.
This implements a generic way of scaling buffers, using fake
RGBA_Image wrapping ector buffer maps. The underlying algo is
still the good old linear sw scaler.
Now the filters *should* be back to their previous level of
usability. Performance will probably be even worse than it was
before, for GL, as more glReadPixels may be involved. Optimization
now consists in actually implementing the filters with GL shaders.
This is a major refactoring of the evas filters submodule.
Use Ector.Buffer and the map/unmap methods instead of directly
accessing image buffers with RGBA_Image. RGBA_Image is still
used under the hood, for two reasons:
- Required for the final output (blend onto Evas itself)
- Required for the scaling routines
FIXME:
- Breaks proxy support (ie. all kind of texturing).
- This breaks filters support for the GL engine.
In a rare situation the filter would access an invalid buffer.
Solution: Stop messing with buffer references by properly
referencing and releasing them when not needed, rather
than stealing references and hoping for the best. (There were
flags tracking stolen references, but that was still madness)
If the filtered object (text or image object) was deleted, its
output image (cached inside the filter data) would be freed
immediately. This could cause crashes in case of async rendering.
@fix
Somehow I broke this when introducing the eo mixin.
This is what broke @cedric's work on the snapshot widget!
TODO: Verify that the contents changed, and not just X,Y.
Otherwise there would be conflicts in certain circumstances.
This also requires adding const on many existing functions,
and similar work is necessary in Elementary.
@fix
This flag should be set iif the string passed is to be executed
rather than assigned. This is used to pass complex arguments
as data, like tables (eg. color class).
Deep down internally there was already a name, but no API could
really set it properly.
Here Edje will set the name of the filter based on the part name
or the data item name if relevant.
This creates the new interface
Efl.Gfx.Filter
And the implementation is a mixin (evas_filter_mixin.c):
Evas.Filter
All the filter rendering code has now been moved to this
new file. TODO: Merge image filtering.